Skip to content
This repository was archived by the owner on Jul 31, 2022. It is now read-only.

Commit 58ae673

Browse files
committed
Lock super
1 parent 31a3e24 commit 58ae673

File tree

3 files changed

+18
-0
lines changed

3 files changed

+18
-0
lines changed

src/main/java/com/kttdevelopment/simplehttpserver/handler/FileHandler.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import com.kttdevelopment.simplehttpserver.var.HttpCode;
44
import com.kttdevelopment.simplehttpserver.SimpleHttpExchange;
55
import com.kttdevelopment.simplehttpserver.SimpleHttpHandler;
6+
import com.sun.net.httpserver.HttpExchange;
67

78
import java.io.*;
89
import java.nio.file.Files;
@@ -679,6 +680,11 @@ public final void handle(final SimpleHttpExchange exchange) throws IOException{
679680
exchange.close();
680681
}
681682

683+
@Override
684+
public final void handle(final HttpExchange exchange) throws IOException{
685+
SimpleHttpHandler.super.handle(exchange);
686+
}
687+
682688
/**
683689
* Handles a file and gives a response.
684690
*

src/main/java/com/kttdevelopment/simplehttpserver/handler/RedirectHandler.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import com.kttdevelopment.simplehttpserver.var.HttpCode;
44
import com.kttdevelopment.simplehttpserver.SimpleHttpExchange;
55
import com.kttdevelopment.simplehttpserver.SimpleHttpHandler;
6+
import com.sun.net.httpserver.HttpExchange;
67

78
import java.io.IOException;
89

@@ -31,6 +32,11 @@ public RedirectHandler(final String link){
3132
this.link = link;
3233
}
3334

35+
@Override
36+
public final void handle(final HttpExchange exchange) throws IOException{
37+
SimpleHttpHandler.super.handle(exchange);
38+
}
39+
3440
@Override
3541
public final void handle(final SimpleHttpExchange exchange) throws IOException{
3642
exchange.getResponseHeaders().set("Location", link);

src/main/java/com/kttdevelopment/simplehttpserver/handler/SSEHandler.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import com.kttdevelopment.simplehttpserver.SimpleHttpHandler;
55
import com.kttdevelopment.simplehttpserver.var.HttpCode;
66
import com.kttdevelopment.simplehttpserver.var.RequestMethod;
7+
import com.sun.net.httpserver.HttpExchange;
78

89
import java.io.IOException;
910
import java.io.OutputStream;
@@ -26,6 +27,11 @@ public class SSEHandler implements SimpleHttpHandler {
2627
private final AtomicInteger eventId = new AtomicInteger(-1);
2728
private final LinkedList<EventStreamRecord> queue = new LinkedList<>();
2829

30+
@Override
31+
public final void handle(final HttpExchange exchange) throws IOException{
32+
SimpleHttpHandler.super.handle(exchange);
33+
}
34+
2935
@Override
3036
public final void handle(final SimpleHttpExchange exchange) throws IOException{
3137
exchange.getResponseHeaders().add("Access-Control-Allow-Headers", "Content-Type");

0 commit comments

Comments
 (0)