You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2015/11/26 21:30:46 UTC
svn commit: r1716763 - in /tomcat/trunk: java/org/apache/tomcat/websocket/
java/org/apache/tomcat/websocket/server/
test/org/apache/catalina/connector/ test/org/apache/catalina/tribes/demos/
Author: markt
Date: Thu Nov 26 20:30:46 2015
New Revision: 1716763
URL: http://svn.apache.org/viewvc?rev=1716763&view=rev
Log:
Fix various TODOs
Modified:
tomcat/trunk/java/org/apache/tomcat/websocket/AsyncChannelWrapperSecure.java
tomcat/trunk/java/org/apache/tomcat/websocket/LocalStrings.properties
tomcat/trunk/java/org/apache/tomcat/websocket/WsRemoteEndpointImplBase.java
tomcat/trunk/java/org/apache/tomcat/websocket/server/LocalStrings.properties
tomcat/trunk/java/org/apache/tomcat/websocket/server/WsHttpUpgradeHandler.java
tomcat/trunk/test/org/apache/catalina/connector/TestCoyoteOutputStream.java
tomcat/trunk/test/org/apache/catalina/tribes/demos/EchoRpcTest.java
Modified: tomcat/trunk/java/org/apache/tomcat/websocket/AsyncChannelWrapperSecure.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/AsyncChannelWrapperSecure.java?rev=1716763&r1=1716762&r2=1716763&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/websocket/AsyncChannelWrapperSecure.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/websocket/AsyncChannelWrapperSecure.java Thu Nov 26 20:30:46 2015
@@ -403,8 +403,9 @@ public class AsyncChannelWrapperSecure i
handshaking = false;
break;
}
- default: {
- throw new SSLException("TODO");
+ case NOT_HANDSHAKING: {
+ throw new SSLException(
+ sm.getString("asyncChannelWrapperSecure.notHandshaking"));
}
}
}
@@ -424,13 +425,14 @@ public class AsyncChannelWrapperSecure i
if (resultStatus != Status.OK &&
(wrap || resultStatus != Status.BUFFER_UNDERFLOW)) {
- throw new SSLException("TODO");
+ throw new SSLException(
+ sm.getString("asyncChannelWrapperSecure.check.notOk", resultStatus));
}
if (wrap && result.bytesConsumed() != 0) {
- throw new SSLException("TODO");
+ throw new SSLException(sm.getString("asyncChannelWrapperSecure.check.wrap"));
}
if (!wrap && result.bytesProduced() != 0) {
- throw new SSLException("TODO");
+ throw new SSLException(sm.getString("asyncChannelWrapperSecure.check.unwrap"));
}
}
}
Modified: tomcat/trunk/java/org/apache/tomcat/websocket/LocalStrings.properties
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/LocalStrings.properties?rev=1716763&r1=1716762&r2=1716763&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/websocket/LocalStrings.properties (original)
+++ tomcat/trunk/java/org/apache/tomcat/websocket/LocalStrings.properties Thu Nov 26 20:30:46 2015
@@ -16,9 +16,13 @@
asyncChannelGroup.createFail=Unable to create dedicated AsynchronousChannelGroup for WebSocket clients which is required to prevent memory leaks in complex class loader environments like JavaEE containers
asyncChannelWrapperSecure.closeFail=Failed to close channel cleanly
+asyncChannelWrapperSecure.check.notOk=TLS handshake returned an unexpected status [{0}]
+asyncChannelWrapperSecure.check.unwrap=Bytes were written to the output during a read
+asyncChannelWrapperSecure.check.wrap=Bytes were consumed from the input during a write
asyncChannelWrapperSecure.concurrentRead=Concurrent read operations are not permitted
asyncChannelWrapperSecure.concurrentWrite=Concurrent write operations are not permitted
asyncChannelWrapperSecure.eof=Unexpected end of stream
+asyncChannelWrapperSecure.notHandshaking=Unexpected state [NOT_HANDSHAKING] during TLS handshake
asyncChannelWrapperSecure.readOverflow=Buffer overflow. [{0}] bytes to write into a [{1}] byte buffer that already contained [{2}] bytes.
asyncChannelWrapperSecure.statusUnwrap=Unexpected Status of SSLEngineResult after an unwrap() operation
asyncChannelWrapperSecure.statusWrap=Unexpected Status of SSLEngineResult after a wrap() operation
@@ -75,10 +79,11 @@ wsRemoteEndpoint.concurrentMessageSend=M
wsRemoteEndpoint.flushOnCloseFailed=Batched messages still enabled after session has been closed. Unable to flush remaining batched message.
wsRemoteEndpoint.invalidEncoder=The specified encoder of type [{0}] could not be instantiated
wsRemoteEndpoint.noEncoder=No encoder specified for object of class [{0}]
-wsRemoteEndpoint.wrongState=The remote endpoint was in state [{0}] which is an invalid state for called method
wsRemoteEndpoint.nullData=Invalid null data argument
wsRemoteEndpoint.nullHandler=Invalid null handler argument
+wsRemoteEndpoint.sendInterupt=The current thread was interrupted while waiting for a blocking send to complete
wsRemoteEndpoint.tooMuchData=Ping or pong may not send more than 125 bytes
+wsRemoteEndpoint.wrongState=The remote endpoint was in state [{0}] which is an invalid state for called method
# Note the following message is used as a close reason in a WebSocket control
# frame and therefore must be 123 bytes (not characters) or less in length.
Modified: tomcat/trunk/java/org/apache/tomcat/websocket/WsRemoteEndpointImplBase.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/WsRemoteEndpointImplBase.java?rev=1716763&r1=1716762&r2=1716763&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/websocket/WsRemoteEndpointImplBase.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/websocket/WsRemoteEndpointImplBase.java Thu Nov 26 20:30:46 2015
@@ -294,8 +294,7 @@ public abstract class WsRemoteEndpointIm
throw new SocketTimeoutException();
}
} catch (InterruptedException e) {
- // TODO i18n
- throw new IOException(e);
+ throw new IOException(sm.getString("wsRemoteEndpoint.sendInterupt"), e);
}
for (MessagePart mp : messageParts) {
Modified: tomcat/trunk/java/org/apache/tomcat/websocket/server/LocalStrings.properties
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/server/LocalStrings.properties?rev=1716763&r1=1716762&r2=1716763&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/websocket/server/LocalStrings.properties (original)
+++ tomcat/trunk/java/org/apache/tomcat/websocket/server/LocalStrings.properties Thu Nov 26 20:30:46 2015
@@ -33,5 +33,6 @@ uriTemplate.invalidSegment=The segment [
wsHttpUpgradeHandler.destroyFailed=Failed to close WebConnection while destroying the WebSocket HttpUpgradeHandler
wsHttpUpgradeHandler.noPreInit=The preInit() method must be called to configure the WebSocket HttpUpgradeHandler before the container calls init(). Usually, this means the Servlet that created the WsHttpUpgradeHandler instance should also call preInit()
+wsHttpUpgradeHandler.serverStop=The server is stopping
wsRemoteEndpointServer.closeFailed=Failed to close the ServletOutputStream connection cleanly
\ No newline at end of file
Modified: tomcat/trunk/java/org/apache/tomcat/websocket/server/WsHttpUpgradeHandler.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/server/WsHttpUpgradeHandler.java?rev=1716763&r1=1716762&r2=1716763&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/websocket/server/WsHttpUpgradeHandler.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/websocket/server/WsHttpUpgradeHandler.java Thu Nov 26 20:30:46 2015
@@ -163,8 +163,8 @@ public class WsHttpUpgradeHandler implem
wsRemoteEndpointServer.onWritePossible(false);
break;
case STOP:
- // TODO i18n
- CloseReason cr = new CloseReason(CloseCodes.GOING_AWAY, "");
+ CloseReason cr = new CloseReason(CloseCodes.GOING_AWAY,
+ sm.getString("wsHttpUpgradeHandler.serverStop"));
try {
wsSession.close(cr);
} catch (IOException ioe) {
Modified: tomcat/trunk/test/org/apache/catalina/connector/TestCoyoteOutputStream.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/connector/TestCoyoteOutputStream.java?rev=1716763&r1=1716762&r2=1716763&view=diff
==============================================================================
--- tomcat/trunk/test/org/apache/catalina/connector/TestCoyoteOutputStream.java (original)
+++ tomcat/trunk/test/org/apache/catalina/connector/TestCoyoteOutputStream.java Thu Nov 26 20:30:46 2015
@@ -218,7 +218,8 @@ public class TestCoyoteOutputStream exte
@Override
public void onError(Throwable throwable) {
- // TODO Auto-generated method stub
+ // Not expected.
+ throwable.printStackTrace();
}
}
}
Modified: tomcat/trunk/test/org/apache/catalina/tribes/demos/EchoRpcTest.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/tribes/demos/EchoRpcTest.java?rev=1716763&r1=1716762&r2=1716763&view=diff
==============================================================================
--- tomcat/trunk/test/org/apache/catalina/tribes/demos/EchoRpcTest.java (original)
+++ tomcat/trunk/test/org/apache/catalina/tribes/demos/EchoRpcTest.java Thu Nov 26 20:30:46 2015
@@ -53,8 +53,6 @@ public class EchoRpcTest implements RpcC
*
* @param msg Serializable
* @param sender Member
- * TODO Implement this org.apache.catalina.tribes.tipis.RpcCallback
- * method
*/
@Override
public void leftOver(Serializable msg, Member sender) {
@@ -66,8 +64,6 @@ public class EchoRpcTest implements RpcC
* @param msg Serializable
* @param sender Member
* @return Serializable - null if no reply should be sent
- * TODO Implement this org.apache.catalina.tribes.tipis.RpcCallback
- * method
*/
@Override
public Serializable replyRequest(Serializable msg, Member sender) {
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org