test/com/sun/nio/sctp/SctpChannel/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.
*** 37,53 ****
import java.nio.channels.ClosedChannelException;
import com.sun.nio.sctp.SctpChannel;
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(SctpChannel sc, SctpSocketOption<T> name,
T expectedValue) throws IOException {
T value = sc.getOption(name);
check(value.equals(expectedValue), name + ": value (" + value +
--- 37,53 ----
import java.nio.channels.ClosedChannelException;
import com.sun.nio.sctp.SctpChannel;
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(SctpChannel sc, SctpSocketOption<T> name,
T expectedValue) throws IOException {
T value = sc.getOption(name);
check(value.equals(expectedValue), name + ": value (" + value +