From d9d8acf3311590f31197893427c6a24c5fe485ba Mon Sep 17 00:00:00 2001 From: Norman Maurer Date: Sun, 21 Oct 2012 19:54:08 +0200 Subject: [PATCH] Fix NPE which accours when Netty was used in an Applet. See #669 --- common/src/main/java/io/netty/util/internal/DetectionUtil.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common/src/main/java/io/netty/util/internal/DetectionUtil.java b/common/src/main/java/io/netty/util/internal/DetectionUtil.java index c0ba75fe0a..21a06a3c9f 100644 --- a/common/src/main/java/io/netty/util/internal/DetectionUtil.java +++ b/common/src/main/java/io/netty/util/internal/DetectionUtil.java @@ -20,6 +20,7 @@ import java.net.ServerSocket; import java.security.AccessController; import java.security.PrivilegedActionException; import java.security.PrivilegedExceptionAction; +import java.util.Locale; import java.util.concurrent.BlockingQueue; import java.util.concurrent.atomic.AtomicInteger; @@ -40,7 +41,7 @@ public final class DetectionUtil { private static final boolean IS_ROOT; static { - String os = SystemPropertyUtil.get("os.name").toLowerCase(); + String os = SystemPropertyUtil.get("os.name", "").toLowerCase(Locale.UK); // windows IS_WINDOWS = os.contains("win");