Skip to content

Commit

Permalink
Refactoring
Browse files Browse the repository at this point in the history
Move several repeating patterns to another class
  • Loading branch information
fedinskiy committed Jan 31, 2023
1 parent 0a0a55d commit 79b2b35
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import java.util.regex.Pattern;

public class Commons {
static Pattern NETTY_HANDLERS=Pattern.compile(".*Could not register io.netty.handler.codec.*"); //https://github.com/quarkusio/quarkus/issues/30508
static Pattern NO_IMAGE = Pattern.compile(".*Tag 22.3-java17 was deleted or has expired.*"); //https://github.com/quarkusio/quarkus/issues/30738
static final Pattern CLOSED_STREAM = Pattern.compile(".*Stream is closed, ignoring and trying to continue.*"); // https://github.com/quarkusio/quarkus/pull/28810
static final Pattern STREAM_ERROR = Pattern.compile(".*java.lang.RuntimeException: Error reading stream.*"); // https://github.com/quarkusio/quarkus/issues/28799 (should be removed once 2.14.0.Final is out)
static Pattern NETTY_HANDLERS = Pattern.compile(".*Could not register io.netty.handler.codec.*"); //https://github.com/quarkusio/quarkus/issues/30508
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,9 @@ public enum WhitelistLogLines {
// https://github.com/quarkusio/quarkus/issues/27307
Pattern.compile(".*Unknown module: org.graalvm.nativeimage.llvm specified to --add-exports.*"),
// https://github.com/quarkusio/quarkus/issues/28799 (should be removed once 2.14.0.Final is out)
Pattern.compile(".*java.lang.RuntimeException: Error reading stream.*"),
// https://github.com/quarkusio/quarkus/pull/28810
Pattern.compile(".*Stream is closed, ignoring and trying to continue.*"),
Commons.STREAM_ERROR,
Commons.CLOSED_STREAM,
Commons.NETTY_HANDLERS,
Commons.NO_IMAGE,
}),
FULL_MICROPROFILE(new Pattern[]{
// Some artifacts names...
Expand All @@ -27,12 +25,9 @@ public enum WhitelistLogLines {
Pattern.compile(".*Closing a class org.jboss.resteasy.client.jaxrs.engines.ApacheHttpClient.*"),
// https://github.com/quarkusio/quarkus/issues/27307
Pattern.compile(".*Unknown module: org.graalvm.nativeimage.llvm specified to --add-exports.*"),
// https://github.com/quarkusio/quarkus/issues/28799 (should be removed once 2.14.0.Final is out)
Pattern.compile(".*java.lang.RuntimeException: Error reading stream.*"),
// https://github.com/quarkusio/quarkus/pull/28810
Pattern.compile(".*Stream is closed, ignoring and trying to continue.*"),
Commons.STREAM_ERROR,
Commons.CLOSED_STREAM,
Commons.NETTY_HANDLERS,
Commons.NO_IMAGE,
}),
GENERATED_SKELETON(new Pattern[]{
// Harmless warning
Expand Down Expand Up @@ -82,11 +77,9 @@ public enum WhitelistLogLines {
// https://github.com/quarkusio/quarkus/issues/27307
Pattern.compile(".*Unknown module: org.graalvm.nativeimage.llvm specified to --add-exports.*"),
// https://github.com/quarkusio/quarkus/issues/28799 (should be removed once 2.14.0.Final is out)
Pattern.compile(".*java.lang.RuntimeException: Error reading stream.*"),
// https://github.com/quarkusio/quarkus/pull/28810
Pattern.compile(".*Stream is closed, ignoring and trying to continue.*"),
Commons.STREAM_ERROR,
Commons.CLOSED_STREAM,
Commons.NETTY_HANDLERS,
Commons.NO_IMAGE,
}),
// Quarkus is not being gratefully shutdown in Windows when running in Dev mode.
// Reported by https://github.com/quarkusio/quarkus/issues/14647.
Expand Down

0 comments on commit 79b2b35

Please sign in to comment.