Default to using channel metadata

This commit is contained in:
fullwall 2022-12-04 03:24:57 +08:00
parent 06230800b9
commit a74e40eb1d
1 changed files with 2 additions and 2 deletions

View File

@ -345,7 +345,7 @@ public class Util {
version = Version.identify().get("netty-all");
}
if (version == null)
return REQUIRES_CHANNEL_METADATA = false;
return REQUIRES_CHANNEL_METADATA = true;
try {
Integer[] parts = StreamSupport
.stream(Splitter.on('.').split(version.artifactVersion()).spliterator(), false).map(string -> {
@ -359,7 +359,7 @@ public class Util {
int major = parts[0];
int minor = parts[1];
int patch = parts[2];
return REQUIRES_CHANNEL_METADATA = major >= 5 || major == 4 && (minor > 1 || patch >= 1);
return REQUIRES_CHANNEL_METADATA = major >= 5 || major == 4 && (minor > 1 || patch >= 25);
} catch (Throwable t) {
t.printStackTrace();
return REQUIRES_CHANNEL_METADATA = true;