Skip to content

Commit

Permalink
spotless
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewazores committed Aug 14, 2023
1 parent b21e550 commit 01e7aea
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 12 deletions.
6 changes: 1 addition & 5 deletions src/main/java/io/cryostat/net/AgentClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.ForkJoinPool;
import java.io.InputStream;

import javax.script.ScriptException;

Expand Down Expand Up @@ -133,10 +132,7 @@ Future<IRecordingDescriptor> startRecording(StartRecordingRequest req) {

Future<Buffer> openStream(long id) {
Future<HttpResponse<Buffer>> f =
invoke(
HttpMethod.GET,
"/recordings/" + id,
BodyCodec.buffer());
invoke(HttpMethod.GET, "/recordings/" + id, BodyCodec.buffer());
return f.map(
resp -> {
int statusCode = resp.statusCode();
Expand Down
14 changes: 8 additions & 6 deletions src/main/java/io/cryostat/net/AgentJFRService.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@
import io.cryostat.core.templates.MergedTemplateService;
import io.cryostat.core.templates.Template;
import io.cryostat.core.templates.TemplateType;

import io.vertx.core.Future;
import io.vertx.core.buffer.Buffer;

import org.jsoup.nodes.Document;

class AgentJFRService implements CryostatFlightRecorderService {
Expand Down Expand Up @@ -195,24 +195,26 @@ public InputStream openStream(IRecordingDescriptor descriptor, boolean removeOnC
Future<Buffer> f = client.openStream(descriptor.getId());
try {
Buffer b = f.toCompletionStage().toCompletableFuture().get();
return new BufferedInputStream(
new ByteArrayInputStream(b.getBytes())
);
return new BufferedInputStream(new ByteArrayInputStream(b.getBytes()));
} catch (ExecutionException | InterruptedException e) {
logger.warn(e);
throw new FlightRecorderException("Failed to open remote recording stream", e);
}
}

@Override
public InputStream openStream(IRecordingDescriptor descriptor, IQuantity lastPartDuration, boolean removeOnClose)
public InputStream openStream(
IRecordingDescriptor descriptor, IQuantity lastPartDuration, boolean removeOnClose)
throws FlightRecorderException {
throw new UnimplementedException();
}

@Override
public InputStream openStream(
IRecordingDescriptor descriptor, IQuantity startTime, IQuantity endTime, boolean removeOnClose)
IRecordingDescriptor descriptor,
IQuantity startTime,
IQuantity endTime,
boolean removeOnClose)
throws FlightRecorderException {
throw new UnimplementedException();
}
Expand Down
1 change: 0 additions & 1 deletion src/main/java/io/cryostat/net/web/WebServer.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
import io.cryostat.MainModule;
import io.cryostat.core.log.Logger;
import io.cryostat.core.net.JFRConnection;
import io.cryostat.net.AgentConnection;
import io.cryostat.net.AuthManager;
import io.cryostat.net.HttpServer;
import io.cryostat.net.NetworkConfiguration;
Expand Down

0 comments on commit 01e7aea

Please sign in to comment.