Skip to content

Commit b0a107a

Browse files
authored
Make RangeWriter final (#253)
1 parent 7f1c5de commit b0a107a

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

avaje-jex/src/main/java/io/avaje/jex/core/RangeWriter.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
import io.avaje.jex.http.Context;
1111
import io.avaje.jex.http.HttpStatus;
1212

13-
class RangeWriter {
13+
final class RangeWriter {
1414

1515
private static final int DEFAULT_BUFFER_SIZE = 16384;
1616

@@ -62,8 +62,7 @@ static void write(Context ctx, InputStream inputStream, long totalBytes, long ch
6262
}
6363
}
6464

65-
private static void write(OutputStream outputStream, InputStream inputStream, long from, long to)
66-
throws IOException {
65+
private static void write(OutputStream outputStream, InputStream inputStream, long from, long to) throws IOException {
6766
byte[] buffer = new byte[DEFAULT_BUFFER_SIZE];
6867
long toSkip = from;
6968
while (toSkip > 0) {

avaje-jex/src/main/java/io/avaje/jex/core/RoutingHandler.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,8 @@ public void handle(HttpExchange exchange) {
3838
var ctx = new JdkContext(mgr, exchange, uri, Set.of());
3939
ctx.setMode(Mode.EXCHANGE);
4040
mgr.handleException(
41-
ctx,
42-
new NotFoundException(
43-
"No route matching http method %s, with path %s".formatted(routeType.name(), uri)));
41+
ctx,
42+
new NotFoundException("No route matching http method %s, with path %s".formatted(routeType.name(), uri)));
4443
} else {
4544
route.inc();
4645
try {

0 commit comments

Comments
 (0)