Skip to content

Commit

Permalink
chore(jsoup): remove useless Document type from method signature (#403)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewazores authored Jun 3, 2024
1 parent 4ae15eb commit 035e894
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,33 +32,20 @@
import io.cryostat.core.EventOptionsBuilder.EventOptionException;
import io.cryostat.core.EventOptionsBuilder.EventTypeException;
import io.cryostat.core.templates.Template;
import io.cryostat.core.templates.TemplateType;

import org.jsoup.nodes.Document;

public interface CryostatFlightRecorderService extends IFlightRecorderService {

IRecordingDescriptor start(
IConstrainedMap<String> recordingOptions,
String templateName,
TemplateType preferredTemplateType)
IRecordingDescriptor start(IConstrainedMap<String> recordingOptions, Template eventTemplate)
throws io.cryostat.core.FlightRecorderException, FlightRecorderException,
ConnectionException, IOException, FlightRecorderException,
ConnectionException, ParseException, IOException, FlightRecorderException,
ServiceNotAvailableException, QuantityConversionException, EventOptionException,
EventTypeException;

default IRecordingDescriptor start(
IConstrainedMap<String> recordingOptions, Template eventTemplate)
default IRecordingDescriptor start(IConstrainedMap<String> recordingOptions, String template)
throws io.cryostat.core.FlightRecorderException, FlightRecorderException,
ConnectionException, IOException, FlightRecorderException,
ServiceNotAvailableException, QuantityConversionException, EventOptionException,
EventTypeException {
return start(recordingOptions, eventTemplate.getName(), eventTemplate.getType());
}

default IRecordingDescriptor start(IConstrainedMap<String> recordingOptions, Document template)
throws FlightRecorderException, ParseException, IOException {
XMLModel model = EventConfiguration.createModel(template.toString());
ConnectionException, ParseException, IOException, ServiceNotAvailableException,
QuantityConversionException, EventOptionException, EventTypeException {
XMLModel model = EventConfiguration.createModel(template);
IConstrainedMap<EventOptionID> eventOptions =
new EventConfiguration(model)
.getEventOptions(getDefaultEventOptions().emptyWithSameConstraints());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -229,16 +229,13 @@ public IDescribedMap<EventOptionID> getDefaultEventOptions() {
}

@Override
public IRecordingDescriptor start(
IConstrainedMap<String> recordingOptions,
String templateName,
TemplateType preferredTemplateType)
public IRecordingDescriptor start(IConstrainedMap<String> recordingOptions, Template template)
throws io.cryostat.core.FlightRecorderException, FlightRecorderException,
ConnectionException, IOException, FlightRecorderException,
ServiceNotAvailableException, QuantityConversionException, EventOptionException,
EventTypeException {
return tryConnect()
.start(recordingOptions, enableEvents(templateName, preferredTemplateType));
.start(recordingOptions, enableEvents(template.getName(), template.getType()));
}

private IConstrainedMap<EventOptionID> enableEvents(
Expand Down

0 comments on commit 035e894

Please sign in to comment.