Skip to content

Commit

Permalink
qa: Methods should not be empty
Browse files Browse the repository at this point in the history
  • Loading branch information
groldan committed Dec 7, 2023
1 parent 82ffede commit 24d6551
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@
*/
package org.geoserver.cloud.autoconfigure.geotools;

import java.util.List;
import lombok.AccessLevel;
import lombok.Setter;

import org.geotools.http.AbstractHTTPClientFactory;
import org.geotools.http.HTTPBehavior;
import org.geotools.http.HTTPClient;

import lombok.AccessLevel;
import lombok.Setter;
import java.util.List;

/** */
public class SpringEnvironmentAwareGeoToolsHttpClientFactory extends AbstractHTTPClientFactory {

@Setter(value = AccessLevel.PACKAGE)
@Setter(value = AccessLevel.PACKAGE)
private static GeoToolsHttpClientProxyConfigurationProperties proxyConfig =
new GeoToolsHttpClientProxyConfigurationProperties();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,13 +132,10 @@ public void handlePostModifyEvent(CatalogPostModifyEvent event) throws CatalogEx
publish(CatalogInfoModified.createLocal(incrementSequence(), event));
}

/**
* {@inheritDoc}
*
* <p>no-op.
*/
@Override
public void reloaded() {}
public void reloaded() {
// no-op
}
}

@RequiredArgsConstructor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import org.geoserver.catalog.CatalogInfo;
import org.geoserver.catalog.CatalogValidator;
import org.geoserver.catalog.CatalogVisitor;
import org.geoserver.catalog.CatalogVisitorAdapter;
import org.geoserver.catalog.CoverageInfo;
import org.geoserver.catalog.CoverageStoreInfo;
import org.geoserver.catalog.DataStoreInfo;
Expand Down Expand Up @@ -241,7 +242,7 @@ private ValidationResult postValidate(CatalogInfo info, boolean isNew) {
return new ValidationResult(errors);
}

static class CatalogValidatorVisitor implements CatalogVisitor {
static class CatalogValidatorVisitor extends CatalogVisitorAdapter {

CatalogValidator validator;
boolean isNew;
Expand All @@ -251,9 +252,6 @@ static class CatalogValidatorVisitor implements CatalogVisitor {
this.isNew = isNew;
}

@Override
public void visit(Catalog catalog) {}

@Override
public void visit(WorkspaceInfo workspace) {
validator.validate(workspace, isNew);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,28 +37,26 @@ public class SimpleNamingContext implements Context {

private final String contextRoot;

private final ConcurrentMap<String, Object> bindings;
private final ConcurrentMap<String, Object> bindings = new ConcurrentHashMap<>();

private final ConcurrentMap<String, Object> environment = new ConcurrentHashMap<>();

public SimpleNamingContext() {
this(ROOT_NAME, new ConcurrentHashMap<>());
this(ROOT_NAME, Map.of());
}

SimpleNamingContext(@NonNull String root, @NonNull ConcurrentMap<String, Object> env) {
this(root, new ConcurrentHashMap<>(), env);
SimpleNamingContext(@NonNull String root, @NonNull Map<String, Object> env) {
this(root, Map.of(), env);
}

SimpleNamingContext(
@NonNull String root,
@NonNull ConcurrentMap<String, Object> boundObjects,
@NonNull ConcurrentMap<String, Object> env) {
@NonNull Map<String, Object> boundObjects,
@NonNull Map<String, Object> env) {

this.contextRoot = root;
this.bindings = boundObjects;
if (env != null) {
this.environment.putAll(env);
}
this.bindings.putAll(boundObjects);
this.environment.putAll(env);
}

@Override
Expand Down Expand Up @@ -159,7 +157,10 @@ public Object removeFromEnvironment(String propName) {
}

@Override
public void close() {}
public void close() {
this.environment.clear();
this.bindings.clear();
}

/**
* @throws OperationNotSupportedException javax.naming.Name is not supported
Expand Down

0 comments on commit 24d6551

Please sign in to comment.