Skip to content

Commit

Permalink
Linting
Browse files Browse the repository at this point in the history
  • Loading branch information
ianopolous committed Sep 16, 2024
1 parent 1e8e65d commit b0adef5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
8 changes: 3 additions & 5 deletions src/main/java/org/peergos/EmbeddedIpfs.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@
import org.peergos.protocol.ipns.*;
import org.peergos.util.Logging;

import java.io.*;
import java.net.*;
import java.nio.file.*;
import java.sql.Connection;
import java.sql.DriverManager;
Expand Down Expand Up @@ -145,7 +143,7 @@ public void start() {
try {
this.stop().join();
} catch (Exception ex) {
ex.printStackTrace();
LOG.info(ex.getMessage());
}
});
Runtime.getRuntime().addShutdownHook(shutdownHook);
Expand Down Expand Up @@ -179,14 +177,14 @@ public void start() {
});
mdns.start();

blockProvider.ifPresent(p -> p.start());
blockProvider.ifPresent(PeriodicBlockProvider::start);
}

public CompletableFuture<Void> stop() throws Exception {
if (records != null) {
records.close();
}
blockProvider.ifPresent(b -> b.stop());
blockProvider.ifPresent(PeriodicBlockProvider::stop);
dht.stopBootstrapThread();
for (MDnsDiscovery m : mdns) {
m.stop();
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/org/peergos/HttpProxyTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public void p2pProxyRequest() throws IOException {

ByteArrayOutputStream bout = new ByteArrayOutputStream();
resp.content().readBytes(bout, resp.headers().getInt("content-length"));
Assert.assertTrue(resp.headers().get(headerName).equals(headerValue));
Assert.assertEquals(resp.headers().get(headerName), headerValue);
resp.release();
byte[] replyBody = bout.toByteArray();
equal(replyBody, httpReply);
Expand Down

0 comments on commit b0adef5

Please # to comment.