test/com/sun/nio/sctp/SctpMultiChannel/SocketOptionTests.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. --- 1,7 ---- /* ! * Copyright (c) 2009, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation.
*** 45,61 **** import com.sun.nio.sctp.SctpChannel; import com.sun.nio.sctp.SctpMultiChannel; import com.sun.nio.sctp.SctpServerChannel; import com.sun.nio.sctp.SctpSocketOption; import java.security.AccessController; ! import sun.security.action.GetPropertyAction; import static com.sun.nio.sctp.SctpStandardSocketOptions.*; import static java.lang.System.out; public class SocketOptionTests { final String osName = AccessController.doPrivileged( ! new GetPropertyAction("os.name")); <T> void checkOption(SctpMultiChannel smc, SctpSocketOption<T> name, T expectedValue) throws IOException { T value = smc.getOption(name, null); check(value.equals(expectedValue), name + ": value (" + value + --- 45,61 ---- import com.sun.nio.sctp.SctpChannel; import com.sun.nio.sctp.SctpMultiChannel; import com.sun.nio.sctp.SctpServerChannel; import com.sun.nio.sctp.SctpSocketOption; import java.security.AccessController; ! import java.security.PrivilegedAction; import static com.sun.nio.sctp.SctpStandardSocketOptions.*; import static java.lang.System.out; public class SocketOptionTests { final String osName = AccessController.doPrivileged( ! (PrivilegedAction<String>)() -> System.getProperty("os.name")); <T> void checkOption(SctpMultiChannel smc, SctpSocketOption<T> name, T expectedValue) throws IOException { T value = smc.getOption(name, null); check(value.equals(expectedValue), name + ": value (" + value +