Skip to content

Commit

Permalink
Fix copyright and style
Browse files Browse the repository at this point in the history
  • Loading branch information
Kay Werndli committed Mar 22, 2024
1 parent eee8d02 commit 59cff92
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 19 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022, 2023 Oracle and/or its affiliates.
* Copyright (c) 2022, 2024 Oracle and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -43,7 +43,9 @@ private TyrusRouting(Builder builder) {
}

@Override
public Class<? extends Routing> routingType() { return TyrusRouting.class; }
public Class<? extends Routing> routingType() {
return TyrusRouting.class;
}

/**
* Builder for WebSocket routing.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022, 2023 Oracle and/or its affiliates.
* Copyright (c) 2022, 2024 Oracle and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022, 2023 Oracle and/or its affiliates.
* Copyright (c) 2022, 2024 Oracle and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022, 2023 Oracle and/or its affiliates.
* Copyright (c) 2022, 2024 Oracle and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -26,6 +26,8 @@ public interface Routing extends ServerLifecycle {
*
* @return this routing type
*/
public default Class<? extends Routing> routingType() { return getClass(); }
default Class<? extends Routing> routingType() {
return getClass();
}

}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022, 2023 Oracle and/or its affiliates.
* Copyright (c) 2022, 2024 Oracle and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -39,7 +39,7 @@ public interface HttpRouting extends Routing, Prototype.Api {
*
* @return a new instance
*/
public static Builder builder() {
static Builder builder() {
return HttpRoutingImpl.builder();
}

Expand All @@ -48,7 +48,7 @@ public static Builder builder() {
*
* @return new default router
*/
public static HttpRouting create() {
static HttpRouting create() {
return HttpRouting.builder()
.route(HttpRoute.builder()
.handler((req, res) -> res.send("Helidon WebServer works!"))
Expand All @@ -61,29 +61,31 @@ public static HttpRouting create() {
*
* @return empty routing
*/
public static HttpRouting empty() {
static HttpRouting empty() {
return HttpRoutingImpl.empty();
}

@Override
public default Class<? extends Routing> routingType() { return HttpRouting.class; }
default Class<? extends Routing> routingType() {
return HttpRouting.class;
}


public void route(ConnectionContext ctx, RoutingRequest request, RoutingResponse response);
void route(ConnectionContext ctx, RoutingRequest request, RoutingResponse response);


/**
* Security associated with this routing.
*
* @return security
*/
public HttpSecurity security();
HttpSecurity security();


/**
* Fluent API builder for {@link HttpRouting}.
*/
public interface Builder extends HttpRules, io.helidon.common.Builder<Builder, HttpRouting> {
interface Builder extends HttpRules, io.helidon.common.Builder<Builder, HttpRouting> {
@Override
Builder register(HttpService... service);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022, 2023 Oracle and/or its affiliates.
* Copyright (c) 2022, 2024 Oracle and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -31,7 +31,6 @@
import io.helidon.http.RequestException;
import io.helidon.http.Status;
import io.helidon.webserver.ConnectionContext;
import io.helidon.webserver.Routing;
import io.helidon.webserver.ServerLifecycle;

final class HttpRoutingImpl implements HttpRouting {
Expand Down Expand Up @@ -215,7 +214,8 @@ private static class BuilderImpl implements Builder {
private HttpSecurity security = HttpSecurity.create();
private int maxReRouteCount = 10;

private BuilderImpl() {}
private BuilderImpl() {
}

private BuilderImpl(List<HttpFeature> features, HttpRoutingFeature mainRouting, HttpSecurity security, int maxReroute) {
this.features.addAll(features);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022, 2023 Oracle and/or its affiliates.
* Copyright (c) 2022, 2024 Oracle and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -38,7 +38,9 @@ private WsRouting(Builder builder) {
}

@Override
public Class<? extends Routing> routingType() { return WsRouting.class; }
public Class<? extends Routing> routingType() {
return WsRouting.class;
}

/**
* Builder for WebSocket routing.
Expand Down

0 comments on commit 59cff92

Please sign in to comment.