Skip to content

Commit

Permalink
Add missing overrides
Browse files Browse the repository at this point in the history
  • Loading branch information
jguerra committed Sep 14, 2023
1 parent c272c65 commit 4b84ed5
Show file tree
Hide file tree
Showing 17 changed files with 35 additions and 0 deletions.
3 changes: 3 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ subprojects {

dependencies {
rewrite(platform("org.openrewrite.recipe:rewrite-recipe-bom:2.2.1"))
rewrite("org.openrewrite.recipe:rewrite-static-analysis:1.0.7")
rewrite("org.openrewrite.recipe:rewrite-logging-frameworks")
rewrite("org.openrewrite.recipe:rewrite-testing-frameworks")
}
Expand All @@ -102,6 +103,8 @@ rewrite {
activeRecipe("org.openrewrite.java.testing.junit5.JUnit5BestPractices")
activeRecipe("org.openrewrite.java.logging.slf4j.Slf4jBestPractices")
//activeRecipe("org.openrewrite.staticanalysis.NeedBraces")
// activeRecipe("org.openrewrite.staticanalysis.MissingOverrideAnnotation")

exclusion(
// Exclude all groovy files
"**/*.groovy")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ public CategorizedThreadFactory(String category) {
this.category = category;
}

@Override
public Thread newThread(final Runnable r) {
final FastThreadLocalThread t = new FastThreadLocalThread(r, category + "-" + num++);
return t;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ protected boolean enabled() {
return logger.isEnabled(level);
}

@Override
public void logData(
Direction direction,
ChannelHandlerContext ctx,
Expand All @@ -75,6 +76,7 @@ public void logData(
}
}

@Override
public void logHeaders(
Direction direction,
ChannelHandlerContext ctx,
Expand All @@ -87,6 +89,7 @@ public void logHeaders(
}
}

@Override
public void logHeaders(
Direction direction,
ChannelHandlerContext ctx,
Expand All @@ -112,6 +115,7 @@ public void logHeaders(
}
}

@Override
public void logPriority(
Direction direction,
ChannelHandlerContext ctx,
Expand All @@ -132,36 +136,42 @@ public void logPriority(
}
}

@Override
public void logRstStream(Direction direction, ChannelHandlerContext ctx, int streamId, long errorCode) {
if (enabled()) {
log(direction, "RST_STREAM", ctx, "streamId=%d, errorCode=%d", streamId, errorCode);
}
}

@Override
public void logSettingsAck(Direction direction, ChannelHandlerContext ctx) {
if (enabled()) {
log(direction, "SETTINGS", ctx, "ack=true");
}
}

@Override
public void logSettings(Direction direction, ChannelHandlerContext ctx, Http2Settings settings) {
if (enabled()) {
log(direction, "SETTINGS", ctx, "ack=false, settings=%s", settings);
}
}

@Override
public void logPing(Direction direction, ChannelHandlerContext ctx, long data) {
if (enabled()) {
log(direction, "PING", ctx, "ack=false, length=%d", data);
}
}

@Override
public void logPingAck(Direction direction, ChannelHandlerContext ctx, long data) {
if (enabled()) {
log(direction, "PING", ctx, "ack=true, length=%d", data);
}
}

@Override
public void logPushPromise(
Direction direction,
ChannelHandlerContext ctx,
Expand All @@ -182,6 +192,7 @@ public void logPushPromise(
}
}

@Override
public void logGoAway(
Direction direction, ChannelHandlerContext ctx, int lastStreamId, long errorCode, ByteBuf debugData) {
if (enabled()) {
Expand All @@ -197,13 +208,15 @@ public void logGoAway(
}
}

@Override
public void logWindowsUpdate(
Direction direction, ChannelHandlerContext ctx, int streamId, int windowSizeIncrement) {
if (enabled()) {
log(direction, "WINDOW_UPDATE", ctx, "streamId=%d, windowSizeIncrement=%d", streamId, windowSizeIncrement);
}
}

@Override
public void logUnknownFrame(
Direction direction,
ChannelHandlerContext ctx,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ void startPoller() {
setDaemon(true);
}

@Override
public void run() {
while (bRunning) {
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ public interface ZuulMessage extends Cloneable {
/**
* Returns a copy of this message.
*/
@Override
ZuulMessage clone();

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ public interface HttpRequestInfo extends ZuulMessage {

String getPathAndQuery();

@Override
Headers getHeaders();

String getClientIp();
Expand All @@ -47,8 +48,10 @@ public interface HttpRequestInfo extends ZuulMessage {

String getServerName();

@Override
int getMaxBodySize();

@Override
String getInfoForLogging();

String getOriginalHost();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ public interface HttpRequestMessage extends HttpRequestInfo {

void setServerName(String serverName);

@Override
ZuulMessage clone();

void storeInboundRequest();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ protected SslContext getClientSslContext(Registry spectatorRegistry) {
*/
protected void addMethodBindingHandler(ChannelPipeline pipeline) {}

@Override
public HttpMetricsChannelHandler getHttpMetricsHandler() {
return httpMetricsHandler;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,7 @@ private ServerGroup(
this.eventLoopGroupMetrics = eventLoopGroupMetrics;

Thread.setDefaultUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() {
@Override
public void uncaughtException(final Thread t, final Throwable e) {
LOG.error("Uncaught throwable", e);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ public void enableSessionTickets(SslContext sslContext) {
// TODO
}

@Override
public void configureOpenSslStatsMetrics(SslContext sslContext, String sslContextId) {
// Setup metrics tracking the OpenSSL stats.
if (sslContext instanceof ReferenceCountedOpenSslContext) {
Expand Down Expand Up @@ -172,6 +173,7 @@ public String[] getProtocols() {
return serverSslConfig.getProtocols();
}

@Override
public List<String> getCiphers() throws NoSuchAlgorithmException {
return serverSslConfig.getCiphers();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ public Promise<PooledConnection> connectToOrigin(
return clientChannelManager.acquire(eventLoop, null, passport, chosenServer, chosenHostAddr);
}

@Override
public int getMaxRetriesForRequest(SessionContext context) {
return config.get(CommonClientConfigKey.MaxAutoRetriesNextServer, 0);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ public String getName() {
/**
* @return the current count
*/
@Override
public long getCount() {
return this.count.get();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ public String getName() {
return routeCode;
}

@Override
public long getCount() {
return count.get();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ public JsonDocument addValue(String key, String value) {
return this;
}

@Override
public String toString() {
return json.toString();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ public class GroovyCompiler implements DynamicCodeCompiler {
* Compiles Groovy code and returns the Class of the compiles code.
*
*/
@Override
public Class<?> compile(String sCode, String sName) {
GroovyClassLoader loader = getGroovyClassLoader();
LOG.warn("Compiling filter: {}", sName);
Expand All @@ -57,6 +58,7 @@ GroovyClassLoader getGroovyClassLoader() {
* Compiles groovy class from a file
*
*/
@Override
public Class<?> compile(File file) throws IOException {
GroovyClassLoader loader = getGroovyClassLoader();
Class<?> groovyClass = loader.parseClass(file);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
* Filters only .groovy files
*/
public class GroovyFileFilter implements FilenameFilter {
@Override
public boolean accept(File dir, String name) {
return name.endsWith(".groovy");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ public class FilterLoaderProvider implements Provider<FilterLoader> {
FILTER_TYPES = Collections.unmodifiableSet(classes);
}

@Override
public FilterLoader get() {
StaticFilterLoader loader = new StaticFilterLoader(new DefaultFilterFactory(), FILTER_TYPES);
return loader;
Expand Down

0 comments on commit 4b84ed5

Please sign in to comment.