Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
csowada committed Mar 25, 2023
2 parents d59f7f1 + 4b82db0 commit d9345e7
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ protected EBusCommand parseTelegramConfiguration(@NonNull IEBusCommandCollection
for (EBusCommandValue commandValue : templateCollection) {

// clone the original value
EBusCommandValue clone = commandValue.clone();
EBusCommandValue clone = commandValue.getClonedInstance();
clone.setParent(commandMethod);

overwritePropertiesFromTemplate(clone, valueDto);
Expand Down Expand Up @@ -479,7 +479,7 @@ protected EBusCommand parseTelegramConfiguration(@NonNull IEBusCommandCollection
if (templateCollection != null && !templateCollection.isEmpty()) {
for (EBusCommandValue commandValue : templateCollection) {

EBusCommandValue clone = commandValue.clone();
EBusCommandValue clone = commandValue.getClonedInstance();
clone.setParent(commandMethod);

overwritePropertiesFromTemplate(clone, valueDto);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@ protected EBusCommandNestedValue createInstance() {
}

@Override
public @NonNull EBusCommandValue clone() {
EBusCommandNestedValue clone = (EBusCommandNestedValue) super.clone();
public @NonNull EBusCommandValue getClonedInstance() {
EBusCommandNestedValue clone = (EBusCommandNestedValue) super.getClonedInstance();

// deep clone list
for (IEBusValue value : list) {
clone.add(value.clone());
clone.add(value.getClonedInstance());
}

return clone;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/de/csdev/ebus/command/EBusCommandValue.java
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ protected EBusCommandValue createInstance() {
}

@Override
public @NonNull EBusCommandValue clone() {
public @NonNull EBusCommandValue getClonedInstance() {

EBusCommandValue clone = createInstance();
clone.defaultValue = this.defaultValue;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/de/csdev/ebus/command/IEBusValue.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
*/

@NonNullByDefault
public interface IEBusValue extends Cloneable {
public interface IEBusValue {

/**
* Returns the type of this value
Expand Down Expand Up @@ -117,5 +117,5 @@ public interface IEBusValue extends Cloneable {
*
* @return
*/
public @NonNull IEBusValue clone();
public IEBusValue getClonedInstance();
}

0 comments on commit d9345e7

Please sign in to comment.