Skip to content

Commit 800eecf

Browse files
committed
Merge branch 'main' into elasticity
2 parents ea48421 + 5dbaec8 commit 800eecf

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

core/src/main/java/org/apache/accumulo/core/clientImpl/ClientContext.java

+1-4
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
import static java.util.concurrent.TimeUnit.SECONDS;
2727

2828
import java.lang.Thread.UncaughtExceptionHandler;
29-
import java.lang.reflect.InvocationTargetException;
3029
import java.net.URL;
3130
import java.nio.file.Path;
3231
import java.util.Collection;
@@ -206,9 +205,7 @@ public String getGroup() {
206205
}
207206
});
208207
return scanServerSelector;
209-
} catch (ClassNotFoundException | InstantiationException | IllegalAccessException
210-
| IllegalArgumentException | InvocationTargetException | NoSuchMethodException
211-
| SecurityException e) {
208+
} catch (ReflectiveOperationException | IllegalArgumentException | SecurityException e) {
212209
throw new RuntimeException("Error creating ScanServerSelector implementation: " + clazz, e);
213210
}
214211
}

server/base/src/main/java/org/apache/accumulo/server/metrics/MetricsInfoImpl.java

+2-5
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020

2121
import static org.apache.hadoop.util.StringUtils.getTrimmedStrings;
2222

23-
import java.lang.reflect.InvocationTargetException;
2423
import java.time.Duration;
2524
import java.util.ArrayList;
2625
import java.util.Arrays;
@@ -263,8 +262,7 @@ public DistributionStatisticConfig configure(Meter.Id id,
263262
registry.config().commonTags(commonTags.values());
264263
registry.config().meterFilter(replicationFilter);
265264
addRegistry(registry);
266-
} catch (ClassNotFoundException | NoSuchMethodException | InvocationTargetException
267-
| InstantiationException | IllegalAccessException ex) {
265+
} catch (ReflectiveOperationException ex) {
268266
LOG.warn("Could not load registry {}", factoryName, ex);
269267
}
270268
}
@@ -284,8 +282,7 @@ public DistributionStatisticConfig configure(Meter.Id id,
284282

285283
@VisibleForTesting
286284
static MeterRegistry getRegistryFromFactory(final String factoryName, final ServerContext context)
287-
throws ClassNotFoundException, NoSuchMethodException, InvocationTargetException,
288-
InstantiationException, IllegalAccessException {
285+
throws ReflectiveOperationException {
289286
try {
290287
LOG.info("look for meter spi registry factory {}", factoryName);
291288
Class<? extends MeterRegistryFactory> clazz =

0 commit comments

Comments
 (0)