From 99698a52726962fd02f4a08354cf605d0ca31cf8 Mon Sep 17 00:00:00 2001 From: Norman Maurer Date: Wed, 24 Oct 2012 18:46:56 +0200 Subject: [PATCH] Fix NPE when System property os.name does not exist. See #669 and #679 --- src/main/java/org/jboss/netty/util/internal/DetectionUtil.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/jboss/netty/util/internal/DetectionUtil.java b/src/main/java/org/jboss/netty/util/internal/DetectionUtil.java index 845156009c..42d0e4369e 100644 --- a/src/main/java/org/jboss/netty/util/internal/DetectionUtil.java +++ b/src/main/java/org/jboss/netty/util/internal/DetectionUtil.java @@ -38,7 +38,7 @@ public final class DetectionUtil { private static final boolean HAS_UNSAFE = hasUnsafe(AtomicInteger.class.getClassLoader()); private static final boolean IS_WINDOWS; static { - String os = SystemPropertyUtil.get("os.name").toLowerCase(); + String os = SystemPropertyUtil.get("os.name", "").toLowerCase(); // windows IS_WINDOWS = os.indexOf("win") >= 0; }