Skip to content

Commit

Permalink
The makeClone removed
Browse files Browse the repository at this point in the history
- it wasn't used

Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
  • Loading branch information
dmatej committed Sep 18, 2022
1 parent 1801789 commit f93b7d9
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2229,7 +2229,6 @@ ClassMethod makeJDOSetFieldMethod(final ClassAction ca,
/**
* Build the clone method for the class.
*/
//@olsen: subst: makeClone -> makeJDOClone
ClassMethod makeJDOClone(final ClassAction ca,
final String methodName) {
//@olsen: added variable
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/*
* Copyright (c) 2022 Contributors to the Eclipse Foundation
* Copyright (c) 1997, 2018 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
Expand Down Expand Up @@ -92,13 +93,6 @@ public interface JavaEEResource {
*/
ResourceProperty getProperty(String propertyName);

/**
* Create a new resource with the given name
* that has the same attribute and property
* settings as the invoked object.
*/
JavaEEResource makeClone(ResourceInfo resourceInfo);

// START OF IASRI #4626188
void setEnabled(boolean value);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;

import org.glassfish.resourcebase.resources.api.ResourceInfo;
Expand Down Expand Up @@ -103,19 +102,6 @@ public ResourceProperty getProperty(String propertyName) {
return properties.get(propertyName);
}

@Override
public JavaEEResource makeClone(ResourceInfo resourceInfo) {
JavaEEResource clone = doClone(resourceInfo);
Collection<ResourceProperty> props = properties.values();
for (ResourceProperty next : props) {
ResourceProperty propClone = new ResourcePropertyImpl(next.getName());
propClone.setValue(next.getValue());
clone.addProperty(propClone);
}
clone.setEnabled(isEnabled());
clone.setDescription(getDescription());
return clone;
}

protected abstract JavaEEResource doClone(ResourceInfo resourceInfo);
}

0 comments on commit f93b7d9

Please sign in to comment.