Updated the NOTICE and LICENSE files
Project: http://git-wip-us.apache.org/repos/asf/mina/repo Commit: http://git-wip-us.apache.org/repos/asf/mina/commit/0163b5b1 Tree: http://git-wip-us.apache.org/repos/asf/mina/tree/0163b5b1 Diff: http://git-wip-us.apache.org/repos/asf/mina/diff/0163b5b1 Branch: refs/heads/trunk Commit: 0163b5b1b61009bfbfbd4d250fdb38efd01a8cdb Parents: d8095b1 Author: Emmanuel Lécharny <[email protected]> Authored: Thu Jun 20 02:17:48 2013 +0200 Committer: Emmanuel Lécharny <[email protected]> Committed: Thu Jun 20 02:17:48 2013 +0200 ---------------------------------------------------------------------- NOTICE-bin.txt | 37 ++++++++++++++++++-- NOTICE.slf4j.txt | 28 --------------- NOTICE.txt | 34 ++++++++++++++++-- .../mina/transport/nio/AbstractNioSession.java | 5 ++- .../apache/mina/transport/nio/NioTcpServer.java | 12 +++---- 5 files changed, 74 insertions(+), 42 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/mina/blob/0163b5b1/NOTICE-bin.txt ---------------------------------------------------------------------- diff --git a/NOTICE-bin.txt b/NOTICE-bin.txt index 4a15b77..7827fb7 100644 --- a/NOTICE-bin.txt +++ b/NOTICE-bin.txt @@ -4,9 +4,7 @@ Copyright 2007-2013 The Apache Software Foundation. This product includes software developed at The Apache Software Foundation (http://www.apache.org/). -Please refer to each LICENSE.<component>.txt file for the -license terms of the components that Apache MINA depends on. - +----- SLF4J ----- Message logging is provided by the SLF4J library package, which is open source software, written by Ceki Gülcü, and copyright by SLF4J.ORG and QOS.ch. The original software is @@ -14,4 +12,37 @@ available from http://www.slf4j.org/ +----- ProtocolBuffer ----- +Copyright 2008, Google Inc. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +* Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. +* Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. +* Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +Code generated by the Protocol Buffer compiler is owned by the owner +of the input file used when generating it. This code is not +standalone and requires a support library to be linked with it. This +support library is itself covered by the above license. http://git-wip-us.apache.org/repos/asf/mina/blob/0163b5b1/NOTICE.slf4j.txt ---------------------------------------------------------------------- diff --git a/NOTICE.slf4j.txt b/NOTICE.slf4j.txt deleted file mode 100644 index 7b00deb..0000000 --- a/NOTICE.slf4j.txt +++ /dev/null @@ -1,28 +0,0 @@ -Copyright (c) 2004-2013 QOS.ch -All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, and/or sell copies of the Software, and to permit persons -to whom the Software is furnished to do so, provided that the above -copyright notice(s) and this permission notice appear in all copies of -the Software and that both the above copyright notice(s) and this -permission notice appear in supporting documentation. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT -OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR -HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY -SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER -RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF -CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN -CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -Except as contained in this notice, the name of a copyright holder -shall not be used in advertising or otherwise to promote the sale, use -or other dealings in this Software without prior written authorization -of the copyright holder. - http://git-wip-us.apache.org/repos/asf/mina/blob/0163b5b1/NOTICE.txt ---------------------------------------------------------------------- diff --git a/NOTICE.txt b/NOTICE.txt index c95cd52..6228e08 100644 --- a/NOTICE.txt +++ b/NOTICE.txt @@ -4,6 +4,36 @@ Copyright 2007-2013 The Apache Software Foundation. This product includes software developed at The Apache Software Foundation (http://www.apache.org/). -Please refer to each LICENSE.<component>.txt file for the -license terms of the components that Apache MINA depends on. +----- ProtocolBuffer ----- +Copyright 2008, Google Inc. +All rights reserved. + +----- SLF4j ----- +Copyright (c) 2004-2013 QOS.ch +All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, and/or sell copies of the Software, and to permit persons +to whom the Software is furnished to do so, provided that the above +copyright notice(s) and this permission notice appear in all copies of +the Software and that both the above copyright notice(s) and this +permission notice appear in supporting documentation. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY +SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER +RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF +CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN +CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +Except as contained in this notice, the name of a copyright holder +shall not be used in advertising or otherwise to promote the sale, use +or other dealings in this Software without prior written authorization +of the copyright holder. http://git-wip-us.apache.org/repos/asf/mina/blob/0163b5b1/core/src/main/java/org/apache/mina/transport/nio/AbstractNioSession.java ---------------------------------------------------------------------- diff --git a/core/src/main/java/org/apache/mina/transport/nio/AbstractNioSession.java b/core/src/main/java/org/apache/mina/transport/nio/AbstractNioSession.java index 9a93512..f2bc4c2 100644 --- a/core/src/main/java/org/apache/mina/transport/nio/AbstractNioSession.java +++ b/core/src/main/java/org/apache/mina/transport/nio/AbstractNioSession.java @@ -334,10 +334,9 @@ public abstract class AbstractNioSession extends AbstractIoSession { // Reset the flag in IoSession too setNotRegisteredForWrite(); } - } else { - // We have some more data to write : the channel OP_WRITE interest remains - // as it was. } + // if the queue is not empty, that means we have some more data to write : + // the channel OP_WRITE interest remains as it was. } } catch (final IOException e) { LOG.error("Exception while writing : ", e); http://git-wip-us.apache.org/repos/asf/mina/blob/0163b5b1/core/src/main/java/org/apache/mina/transport/nio/NioTcpServer.java ---------------------------------------------------------------------- diff --git a/core/src/main/java/org/apache/mina/transport/nio/NioTcpServer.java b/core/src/main/java/org/apache/mina/transport/nio/NioTcpServer.java index 2031a08..ef5bf4b 100644 --- a/core/src/main/java/org/apache/mina/transport/nio/NioTcpServer.java +++ b/core/src/main/java/org/apache/mina/transport/nio/NioTcpServer.java @@ -151,7 +151,7 @@ public class NioTcpServer extends AbstractTcpServer implements SelectorListener * @return */ public synchronized ServerSocketChannel getServerSocketChannel() { - return this.serverChannel; + return serverChannel; } public synchronized void setServerSocketChannel(final ServerSocketChannel serverChannel) { @@ -170,16 +170,16 @@ public class NioTcpServer extends AbstractTcpServer implements SelectorListener * {@inheritDoc} */ @Override - public synchronized void bind(final SocketAddress localAddress) { + public synchronized void bind(SocketAddress localAddress) { Assert.assertNotNull(localAddress, "localAddress"); // check if the address is already bound - if (this.address != null) { + if (address != null) { throw new IllegalStateException("address " + address + " already bound"); } LOG.info("binding address {}", localAddress); - this.address = localAddress; + address = localAddress; try { serverChannel = ServerSocketChannel.open(); @@ -196,7 +196,7 @@ public class NioTcpServer extends AbstractTcpServer implements SelectorListener idleChecker.start(); // it's the first address bound, let's fire the event - this.fireServiceActivated(); + fireServiceActivated(); } /** @@ -270,7 +270,7 @@ public class NioTcpServer extends AbstractTcpServer implements SelectorListener } } - private void createSession(SocketChannel clientSocket) throws IOException { + private synchronized void createSession(SocketChannel clientSocket) throws IOException { LOG.debug("create session"); SocketChannel socketChannel = clientSocket; TcpSessionConfig config = getSessionConfig();
