Skip to content

Commit

Permalink
Moving classes and methods, javadocs, fixed logging nullpointers
Browse files Browse the repository at this point in the history
- most of issues were more visible when I caused some inconsistency
- the commit is unfortunately huge, but necessary
- the architecture of the DOL is broken, always was - depends on reflection
  across modules and packages

Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
  • Loading branch information
dmatej committed Mar 19, 2023
1 parent 11bff77 commit 0deee93
Show file tree
Hide file tree
Showing 61 changed files with 2,572 additions and 3,440 deletions.
Expand Up @@ -440,10 +440,6 @@ public ResourceReferenceDescriptor getResourceReferenceByName(String name) {
new Object[]{getRegistrationName(), name}));
}

/**
* Returns the environment property object searching on the supplied key.
* throws an illegal argument exception if no such environment property exists.
*/
@Override
public EnvironmentProperty getEnvironmentPropertyByName(String name) {
for (EnvironmentProperty ev : this.getEnvironmentProperties()) {
Expand All @@ -457,9 +453,6 @@ public EnvironmentProperty getEnvironmentPropertyByName(String name) {
new Object[]{getRegistrationName(), name}));
}

/**
* Return a copy of the structure holding the environment properties.
*/
@Override
public Set<EnvironmentProperty> getEnvironmentProperties() {
return environmentProperties;
Expand All @@ -470,14 +463,9 @@ public void addEnvironmentProperty(EnvironmentProperty environmentProperty) {
this.environmentProperties.add(environmentProperty);
}

/**
* Removes the given environment property from me.
*/

@Override
public void removeEnvironmentProperty(EnvironmentProperty environmentProperty) {
this.getEnvironmentProperties().remove(environmentProperty);

}


Expand Down
Expand Up @@ -36,6 +36,12 @@ public abstract class CommonResourceDescriptor extends Descriptor {
protected CommonResourceDescriptor() {
}


/**
* The copy constructor.
*
* @param other the source descriptor
*/
protected CommonResourceDescriptor(Descriptor other) {
super(other);
}
Expand Down
Expand Up @@ -22,25 +22,24 @@
import java.util.Objects;

import org.glassfish.api.naming.SimpleJndiName;
import org.glassfish.deployment.common.Descriptor;

/**
* @author naman, date: 24/5/12
*/
public class CommonResourceValidator {

private final Descriptor descriptor;
private final ResourceDescriptor descriptor;
private final SimpleJndiName jndiName;
private final List<String> scope;

public CommonResourceValidator(Descriptor descriptor, SimpleJndiName jndiName, String scope) {
public CommonResourceValidator(ResourceDescriptor descriptor, SimpleJndiName jndiName, String scope) {
this.descriptor = descriptor;
this.jndiName = Objects.requireNonNull(jndiName, "jndiName");
this.scope = new ArrayList<>();
this.scope.add(scope);
}

public Descriptor getDescriptor() {
public ResourceDescriptor getDescriptor() {
return descriptor;
}

Expand Down

0 comments on commit 0deee93

Please sign in to comment.