Fix NPE which accours when Netty was used in an Applet. See #669

This commit is contained in:
Norman Maurer 2012-10-21 19:54:08 +02:00
parent d3c270b0b5
commit d9d8acf331

View File

@ -20,6 +20,7 @@ import java.net.ServerSocket;
import java.security.AccessController; import java.security.AccessController;
import java.security.PrivilegedActionException; import java.security.PrivilegedActionException;
import java.security.PrivilegedExceptionAction; import java.security.PrivilegedExceptionAction;
import java.util.Locale;
import java.util.concurrent.BlockingQueue; import java.util.concurrent.BlockingQueue;
import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicInteger;
@ -40,7 +41,7 @@ public final class DetectionUtil {
private static final boolean IS_ROOT; private static final boolean IS_ROOT;
static { static {
String os = SystemPropertyUtil.get("os.name").toLowerCase(); String os = SystemPropertyUtil.get("os.name", "").toLowerCase(Locale.UK);
// windows // windows
IS_WINDOWS = os.contains("win"); IS_WINDOWS = os.contains("win");