diff --git a/cryostat-core/src/main/java/io/cryostat/core/EventOptionsBuilder.java b/cryostat-core/src/main/java/io/cryostat/core/EventOptionsBuilder.java index 40bec48b..3e105a0b 100644 --- a/cryostat-core/src/main/java/io/cryostat/core/EventOptionsBuilder.java +++ b/cryostat-core/src/main/java/io/cryostat/core/EventOptionsBuilder.java @@ -95,7 +95,8 @@ public static class EventOptionException extends Exception { public static class Factory { public EventOptionsBuilder create(JFRConnection connection) - throws IOException, ServiceNotAvailableException, + throws IOException, + ServiceNotAvailableException, org.openjdk.jmc.flightrecorder.configuration.FlightRecorderException { if (!FlightRecorderServiceV2.isAvailable(connection.getHandle())) { throw new UnsupportedOperationException("Only FlightRecorder V2 is supported"); diff --git a/cryostat-core/src/main/java/io/cryostat/core/EventOptionsCustomizer.java b/cryostat-core/src/main/java/io/cryostat/core/EventOptionsCustomizer.java index b12f03b8..05656961 100644 --- a/cryostat-core/src/main/java/io/cryostat/core/EventOptionsCustomizer.java +++ b/cryostat-core/src/main/java/io/cryostat/core/EventOptionsCustomizer.java @@ -41,7 +41,9 @@ public EventOptionsCustomizer(JFRConnection connection) { } public EventOptionsCustomizer set(String typeId, String option, String value) - throws FlightRecorderException, EventTypeException, EventOptionException, + throws FlightRecorderException, + EventTypeException, + EventOptionException, OptionValueException { if (!isInitialized()) { initialize(); diff --git a/cryostat-core/src/main/java/io/cryostat/core/net/CryostatFlightRecorderService.java b/cryostat-core/src/main/java/io/cryostat/core/net/CryostatFlightRecorderService.java index 3c18ae67..80e7cf2e 100644 --- a/cryostat-core/src/main/java/io/cryostat/core/net/CryostatFlightRecorderService.java +++ b/cryostat-core/src/main/java/io/cryostat/core/net/CryostatFlightRecorderService.java @@ -36,15 +36,27 @@ public interface CryostatFlightRecorderService extends IFlightRecorderService { IRecordingDescriptor start(IConstrainedMap recordingOptions, Template eventTemplate) - throws io.cryostat.core.FlightRecorderException, FlightRecorderException, - ConnectionException, ParseException, IOException, FlightRecorderException, - ServiceNotAvailableException, QuantityConversionException, EventOptionException, + throws io.cryostat.core.FlightRecorderException, + FlightRecorderException, + ConnectionException, + ParseException, + IOException, + FlightRecorderException, + ServiceNotAvailableException, + QuantityConversionException, + EventOptionException, EventTypeException; default IRecordingDescriptor start(IConstrainedMap recordingOptions, String template) - throws io.cryostat.core.FlightRecorderException, FlightRecorderException, - ConnectionException, ParseException, IOException, ServiceNotAvailableException, - QuantityConversionException, EventOptionException, EventTypeException { + throws io.cryostat.core.FlightRecorderException, + FlightRecorderException, + ConnectionException, + ParseException, + IOException, + ServiceNotAvailableException, + QuantityConversionException, + EventOptionException, + EventTypeException { XMLModel model = EventConfiguration.createModel(template); IConstrainedMap eventOptions = new EventConfiguration(model) diff --git a/cryostat-core/src/main/java/io/cryostat/core/net/JFRConnection.java b/cryostat-core/src/main/java/io/cryostat/core/net/JFRConnection.java index 54b9907f..d41e3e02 100644 --- a/cryostat-core/src/main/java/io/cryostat/core/net/JFRConnection.java +++ b/cryostat-core/src/main/java/io/cryostat/core/net/JFRConnection.java @@ -64,14 +64,21 @@ public default T invokeMBeanOperation( Object[] params, String[] signature, Class returnType) - throws MalformedObjectNameException, InstanceNotFoundException, MBeanException, - ReflectionException, IOException, ConnectionException { + throws MalformedObjectNameException, + InstanceNotFoundException, + MBeanException, + ReflectionException, + IOException, + ConnectionException { throw new ConnectionException("Unimplemented"); } public MBeanMetrics getMBeanMetrics() - throws ConnectionException, IOException, InstanceNotFoundException, - IntrospectionException, ReflectionException; + throws ConnectionException, + IOException, + InstanceNotFoundException, + IntrospectionException, + ReflectionException; public boolean isConnected(); diff --git a/cryostat-core/src/main/java/io/cryostat/core/net/JFRJMXConnection.java b/cryostat-core/src/main/java/io/cryostat/core/net/JFRJMXConnection.java index b3aeebe4..59c21e17 100644 --- a/cryostat-core/src/main/java/io/cryostat/core/net/JFRJMXConnection.java +++ b/cryostat-core/src/main/java/io/cryostat/core/net/JFRJMXConnection.java @@ -214,8 +214,12 @@ public T invokeMBeanOperation( Object[] params, String[] signature, Class returnType) - throws MalformedObjectNameException, InstanceNotFoundException, MBeanException, - ReflectionException, IOException, ConnectionException { + throws MalformedObjectNameException, + InstanceNotFoundException, + MBeanException, + ReflectionException, + IOException, + ConnectionException { if (!isConnected()) { connect(); } @@ -275,14 +279,18 @@ private Object parseObject(Object obj) { } private Map getAttributeMap(ObjectName beanName) - throws InstanceNotFoundException, IntrospectionException, ReflectionException, + throws InstanceNotFoundException, + IntrospectionException, + ReflectionException, IOException { return getAttributeMap(beanName, m -> true); } private Map getAttributeMap( ObjectName beanName, Predicate attrPredicate) - throws InstanceNotFoundException, IntrospectionException, ReflectionException, + throws InstanceNotFoundException, + IntrospectionException, + ReflectionException, IOException { Map attrMap = new HashMap<>(); @@ -313,7 +321,9 @@ private Map getAttributeMap( } public synchronized MBeanMetrics getMBeanMetrics() - throws IOException, InstanceNotFoundException, IntrospectionException, + throws IOException, + InstanceNotFoundException, + IntrospectionException, ReflectionException { if (!isConnected()) { connect(); diff --git a/cryostat-core/src/main/java/io/cryostat/core/net/JmxFlightRecorderService.java b/cryostat-core/src/main/java/io/cryostat/core/net/JmxFlightRecorderService.java index 34eb7c3b..4b6a6a7d 100644 --- a/cryostat-core/src/main/java/io/cryostat/core/net/JmxFlightRecorderService.java +++ b/cryostat-core/src/main/java/io/cryostat/core/net/JmxFlightRecorderService.java @@ -230,9 +230,14 @@ public IDescribedMap getDefaultEventOptions() { @Override public IRecordingDescriptor start(IConstrainedMap recordingOptions, Template template) - throws io.cryostat.core.FlightRecorderException, FlightRecorderException, - ConnectionException, IOException, FlightRecorderException, - ServiceNotAvailableException, QuantityConversionException, EventOptionException, + throws io.cryostat.core.FlightRecorderException, + FlightRecorderException, + ConnectionException, + IOException, + FlightRecorderException, + ServiceNotAvailableException, + QuantityConversionException, + EventOptionException, EventTypeException { return tryConnect() .start(recordingOptions, enableEvents(template.getName(), template.getType())); @@ -240,9 +245,14 @@ public IRecordingDescriptor start(IConstrainedMap recordingOptions, Temp private IConstrainedMap enableEvents( String templateName, TemplateType templateType) - throws ConnectionException, IOException, io.cryostat.core.FlightRecorderException, - FlightRecorderException, ServiceNotAvailableException, - QuantityConversionException, EventOptionException, EventTypeException { + throws ConnectionException, + IOException, + io.cryostat.core.FlightRecorderException, + FlightRecorderException, + ServiceNotAvailableException, + QuantityConversionException, + EventOptionException, + EventTypeException { if (templateName.equals("ALL")) { return enableAllEvents(); } @@ -254,8 +264,12 @@ private IConstrainedMap enableEvents( } private IConstrainedMap enableAllEvents() - throws ConnectionException, IOException, FlightRecorderException, - ServiceNotAvailableException, QuantityConversionException, EventOptionException, + throws ConnectionException, + IOException, + FlightRecorderException, + ServiceNotAvailableException, + QuantityConversionException, + EventOptionException, EventTypeException { EventOptionsBuilder builder = new EventOptionsBuilder.Factory().create(conn); diff --git a/cryostat-core/src/main/java/io/cryostat/core/reports/InterruptibleReportGenerator.java b/cryostat-core/src/main/java/io/cryostat/core/reports/InterruptibleReportGenerator.java index 94048483..1608e325 100644 --- a/cryostat-core/src/main/java/io/cryostat/core/reports/InterruptibleReportGenerator.java +++ b/cryostat-core/src/main/java/io/cryostat/core/reports/InterruptibleReportGenerator.java @@ -101,7 +101,9 @@ public Future> generateEvalMapInterruptibly( private Pair, Long> generateResultHelper( InputStream recording, Predicate predicate) - throws InterruptedException, IOException, ExecutionException, + throws InterruptedException, + IOException, + ExecutionException, CouldNotLoadRecordingException { Collection rules = RuleRegistry.getRules().stream().filter(predicate).collect(Collectors.toList());