# HG changeset patch # User michaelm # Date 1381405002 -3600 # Node ID 58e09973dcc16a90388d4550fcce508691f8f613 # Parent d94cb38041e6d0baf48d427b21be0efdfc1b126c 7076487: (sctp) SCTP API classes does not exist in JDK for Mac Reviewed-by: alanb, chegar diff -r d94cb38041e6 -r 58e09973dcc1 jdk/makefiles/CompileJavaClasses.gmk --- a/jdk/makefiles/CompileJavaClasses.gmk Thu Oct 10 09:57:50 2013 +0100 +++ b/jdk/makefiles/CompileJavaClasses.gmk Thu Oct 10 12:36:42 2013 +0100 @@ -268,7 +268,10 @@ $(JDK_TOPDIR)/src/solaris/classes/java/net/DefaultInterface.java \ $(JDK_TOPDIR)/src/solaris/classes/java/lang/ClassLoaderHelper.java \ $(JDK_TOPDIR)/src/solaris/classes/sun/util/locale/provider/HostLocaleProviderAdapterImpl.java \ - $(JDK_TOPDIR)/src/solaris/classes/sun/nio/fs/GnomeFileTypeDetector.java + $(JDK_TOPDIR)/src/solaris/classes/sun/nio/fs/GnomeFileTypeDetector.java \ + $(JDK_TOPDIR)/src/solaris/classes/sun/nio/ch/sctp/SctpChannelImpl.java \ + $(JDK_TOPDIR)/src/solaris/classes/sun/nio/ch/sctp/SctpMultiChannelImpl.java \ + $(JDK_TOPDIR)/src/solaris/classes/sun/nio/ch/sctp/SctpServerChannelImpl.java # JObjC.jar contains 1.5 byte-code...so skip it here :-( # MACOSX_SRC_DIRS += $(JDK_TOPDIR)/src/macosx/native/jobjc/src diff -r d94cb38041e6 -r 58e09973dcc1 jdk/makefiles/CreateJars.gmk --- a/jdk/makefiles/CreateJars.gmk Thu Oct 10 09:57:50 2013 +0100 +++ b/jdk/makefiles/CreateJars.gmk Thu Oct 10 12:36:42 2013 +0100 @@ -216,11 +216,6 @@ oracle/jrockit/jfr \ jdk/jfr -ifeq ($(OPENJDK_TARGET_OS), macosx) - RT_JAR_EXCLUDES += com/sun/nio/sctp \ - sun/nio/ch/sctp -endif - # Find all files in the classes dir to use as dependencies. This could be more fine granular. ALL_FILES_IN_CLASSES := $(call not-containing,_the.,$(filter-out %javac_state,\ $(call CacheFind,$(JDK_OUTPUTDIR)/classes))) diff -r d94cb38041e6 -r 58e09973dcc1 jdk/src/macosx/classes/sun/nio/ch/sctp/SctpChannelImpl.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jdk/src/macosx/classes/sun/nio/ch/sctp/SctpChannelImpl.java Thu Oct 10 12:36:42 2013 +0100 @@ -0,0 +1,150 @@ +/* + * Copyright (c) 2009, 2012, 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. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package sun.nio.ch.sctp; + +import java.net.SocketAddress; +import java.net.InetAddress; +import java.io.IOException; +import java.util.Set; +import java.nio.ByteBuffer; +import java.nio.channels.spi.SelectorProvider; +import com.sun.nio.sctp.Association; +import com.sun.nio.sctp.MessageInfo; +import com.sun.nio.sctp.NotificationHandler; +import com.sun.nio.sctp.SctpChannel; +import com.sun.nio.sctp.SctpSocketOption; + +/** + * Unimplemented. + */ +public class SctpChannelImpl extends SctpChannel +{ + private static final String message = "SCTP not supported on this platform"; + + public SctpChannelImpl(SelectorProvider provider) { + super(provider); + throw new UnsupportedOperationException(message); + } + + @Override + public Association association() { + throw new UnsupportedOperationException(message); + } + + @Override + public SctpChannel bind(SocketAddress local) + throws IOException { + throw new UnsupportedOperationException(message); + } + + @Override + public SctpChannel bindAddress(InetAddress address) + throws IOException { + throw new UnsupportedOperationException(message); + } + + @Override + public SctpChannel unbindAddress(InetAddress address) + throws IOException { + throw new UnsupportedOperationException(message); + } + + @Override + public boolean connect(SocketAddress remote) throws IOException { + throw new UnsupportedOperationException(message); + } + + @Override + public boolean connect(SocketAddress remote, int maxOutStreams, + int maxInStreams) throws IOException { + throw new UnsupportedOperationException(message); + } + + @Override + public boolean isConnectionPending() { + throw new UnsupportedOperationException(message); + } + + @Override + public boolean finishConnect() throws IOException { + throw new UnsupportedOperationException(message); + } + + @Override + public Set getAllLocalAddresses() + throws IOException { + throw new UnsupportedOperationException(message); + } + + @Override + public Set getRemoteAddresses() + throws IOException { + throw new UnsupportedOperationException(message); + } + + @Override + public SctpChannel shutdown() throws IOException { + throw new UnsupportedOperationException(message); + } + + @Override + public T getOption(SctpSocketOption name) + throws IOException { + throw new UnsupportedOperationException(message); + } + + @Override + public SctpChannel setOption(SctpSocketOption name, T value) + throws IOException { + throw new UnsupportedOperationException(message); + } + + @Override + public Set> supportedOptions() { + throw new UnsupportedOperationException(message); + } + + @Override + public MessageInfo receive(ByteBuffer dst, T attachment, + NotificationHandler handler) throws IOException { + throw new UnsupportedOperationException(message); + } + + @Override + public int send(ByteBuffer src, MessageInfo messageInfo) + throws IOException { + throw new UnsupportedOperationException(message); + } + + @Override + protected void implConfigureBlocking(boolean block) throws IOException { + throw new UnsupportedOperationException(message); + } + + @Override + public void implCloseSelectableChannel() throws IOException { + throw new UnsupportedOperationException(message); + } +} diff -r d94cb38041e6 -r 58e09973dcc1 jdk/src/macosx/classes/sun/nio/ch/sctp/SctpMultiChannelImpl.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jdk/src/macosx/classes/sun/nio/ch/sctp/SctpMultiChannelImpl.java Thu Oct 10 12:36:42 2013 +0100 @@ -0,0 +1,137 @@ +/* + * Copyright (c) 2009, 2012, 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. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package sun.nio.ch.sctp; + +import java.net.SocketAddress; +import java.net.InetAddress; +import java.io.IOException; +import java.util.Set; +import java.nio.ByteBuffer; +import java.nio.channels.spi.SelectorProvider; +import com.sun.nio.sctp.Association; +import com.sun.nio.sctp.SctpChannel; +import com.sun.nio.sctp.MessageInfo; +import com.sun.nio.sctp.NotificationHandler; +import com.sun.nio.sctp.SctpMultiChannel; +import com.sun.nio.sctp.SctpSocketOption; + +/** + * Unimplemented. + */ +public class SctpMultiChannelImpl extends SctpMultiChannel +{ + private static final String message = "SCTP not supported on this platform"; + + public SctpMultiChannelImpl(SelectorProvider provider) { + super(provider); + throw new UnsupportedOperationException(message); + } + + @Override + public Set associations() { + throw new UnsupportedOperationException(message); + } + + @Override + public SctpMultiChannel bind(SocketAddress local, + int backlog) throws IOException { + throw new UnsupportedOperationException(message); + } + + @Override + public SctpMultiChannel bindAddress(InetAddress address) + throws IOException { + throw new UnsupportedOperationException(message); + } + + @Override + public SctpMultiChannel unbindAddress(InetAddress address) + throws IOException { + throw new UnsupportedOperationException(message); + } + + @Override + public Set getAllLocalAddresses() + throws IOException { + throw new UnsupportedOperationException(message); + } + + @Override + public Set getRemoteAddresses + (Association association) throws IOException { + throw new UnsupportedOperationException(message); + } + + @Override + public SctpMultiChannel shutdown(Association association) + throws IOException { + throw new UnsupportedOperationException(message); + } + + @Override + public T getOption(SctpSocketOption name, + Association association) throws IOException { + throw new UnsupportedOperationException(message); + } + + @Override + public SctpMultiChannel setOption(SctpSocketOption name, + T value, Association association) throws IOException { + throw new UnsupportedOperationException(message); + } + + @Override + public Set> supportedOptions() { + throw new UnsupportedOperationException(message); + } + + @Override + public MessageInfo receive(ByteBuffer buffer, T attachment, + NotificationHandler handler) throws IOException { + throw new UnsupportedOperationException(message); + } + + @Override + public int send(ByteBuffer buffer, MessageInfo messageInfo) + throws IOException { + throw new UnsupportedOperationException(message); + } + + @Override + public SctpChannel branch(Association association) + throws IOException { + throw new UnsupportedOperationException(message); + } + + @Override + protected void implConfigureBlocking(boolean block) throws IOException { + throw new UnsupportedOperationException(message); + } + + @Override + public void implCloseSelectableChannel() throws IOException { + throw new UnsupportedOperationException(message); + } +} diff -r d94cb38041e6 -r 58e09973dcc1 jdk/src/macosx/classes/sun/nio/ch/sctp/SctpServerChannelImpl.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jdk/src/macosx/classes/sun/nio/ch/sctp/SctpServerChannelImpl.java Thu Oct 10 12:36:42 2013 +0100 @@ -0,0 +1,102 @@ +/* + * Copyright (c) 2009, 2012, 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. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package sun.nio.ch.sctp; + +import java.net.SocketAddress; +import java.net.InetAddress; +import java.io.IOException; +import java.util.Set; +import java.nio.channels.spi.SelectorProvider; +import com.sun.nio.sctp.SctpChannel; +import com.sun.nio.sctp.SctpServerChannel; +import com.sun.nio.sctp.SctpSocketOption; + +/** + * Unimplemented. + */ +public class SctpServerChannelImpl extends SctpServerChannel +{ + private static final String message = "SCTP not supported on this platform"; + + public SctpServerChannelImpl(SelectorProvider provider) { + super(provider); + throw new UnsupportedOperationException(message); + } + + @Override + public SctpChannel accept() throws IOException { + throw new UnsupportedOperationException(message); + } + + @Override + public SctpServerChannel bind(SocketAddress local, + int backlog) throws IOException { + throw new UnsupportedOperationException(message); + } + + @Override + public SctpServerChannel bindAddress(InetAddress address) + throws IOException { + throw new UnsupportedOperationException(message); + } + + @Override + public SctpServerChannel unbindAddress(InetAddress address) + throws IOException { + throw new UnsupportedOperationException(message); + } + + @Override + public Set getAllLocalAddresses() + throws IOException { + throw new UnsupportedOperationException(message); + } + + @Override + public T getOption(SctpSocketOption name) throws IOException { + throw new UnsupportedOperationException(message); + } + + @Override + public SctpServerChannel setOption(SctpSocketOption name, + T value) throws IOException { + throw new UnsupportedOperationException(message); + } + + @Override + public Set> supportedOptions() { + throw new UnsupportedOperationException(message); + } + + @Override + protected void implConfigureBlocking(boolean block) throws IOException { + throw new UnsupportedOperationException(message); + } + + @Override + public void implCloseSelectableChannel() throws IOException { + throw new UnsupportedOperationException(message); + } +}