From 9475f9aeeadd5052bdf1dc16c643c46b8b5fb6f4 Mon Sep 17 00:00:00 2001 From: Trustin Lee Date: Fri, 8 Feb 2013 22:14:38 +0900 Subject: [PATCH] Add a system property that disables Javassist --- .../main/java/io/netty/util/internal/PlatformDependent.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/common/src/main/java/io/netty/util/internal/PlatformDependent.java b/common/src/main/java/io/netty/util/internal/PlatformDependent.java index a51543f1db..6194f2e909 100644 --- a/common/src/main/java/io/netty/util/internal/PlatformDependent.java +++ b/common/src/main/java/io/netty/util/internal/PlatformDependent.java @@ -285,6 +285,11 @@ public final class PlatformDependent { } private static boolean hasJavassist0() { + boolean noJavassist = SystemPropertyUtil.getBoolean("io.netty.noJavassist", false); + if (noJavassist) { + return false; + } + try { JavassistTypeParameterMatcherGenerator.generate(Object.class, PlatformDependent.class.getClassLoader()); return true;