Author: markt Date: Wed Oct 14 14:37:34 2015 New Revision: 1708607 URL: http://svn.apache.org/viewvc?rev=1708607&view=rev Log: Complete some i18n TODOs
Modified: tomcat/trunk/java/org/apache/coyote/http2/Http2UpgradeHandler.java tomcat/trunk/java/org/apache/coyote/http2/LocalStrings.properties tomcat/trunk/java/org/apache/coyote/http2/Stream.java Modified: tomcat/trunk/java/org/apache/coyote/http2/Http2UpgradeHandler.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http2/Http2UpgradeHandler.java?rev=1708607&r1=1708606&r2=1708607&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/coyote/http2/Http2UpgradeHandler.java (original) +++ tomcat/trunk/java/org/apache/coyote/http2/Http2UpgradeHandler.java Wed Oct 14 14:37:34 2015 @@ -640,9 +640,9 @@ public class Http2UpgradeHandler extends do { synchronized (this) { if (!stream.canWrite()) { - throw new IOException("TODO i18n: Stream not writeable"); + throw new IOException(sm.getString("upgradeHandler.stream.notWritable", + stream.getConnectionId(), stream.getIdentifier())); } - long windowSize = getWindowSize(); if (windowSize < 1 || backLogSize > 0) { // Has this stream been granted an allocation Modified: tomcat/trunk/java/org/apache/coyote/http2/LocalStrings.properties URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http2/LocalStrings.properties?rev=1708607&r1=1708606&r2=1708607&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/coyote/http2/LocalStrings.properties (original) +++ tomcat/trunk/java/org/apache/coyote/http2/LocalStrings.properties Wed Oct 14 14:37:34 2015 @@ -66,8 +66,10 @@ pingManager.roundTripTime=Connection [{0 stream.closed=Connection [{0}], Stream [{1}], Unable to write to stream once it has been closed stream.header.debug=Connection [{0}], Stream [{1}], HTTP header [{2}], Value [{3}] +stream.notWritable=Connection [{0}], Stream [{1}], This stream is not writable stream.reprioritisation.debug=Connection [{0}], Stream [{1}], Exclusive [{2}], Parent [{3}], Weight [{4}] stream.reset.debug=Connection [{0}], Stream [{1}], Reset due to [{2}] +stream.reset.fail=Connection [{0}], Stream [{1}], Failed to reset stream stream.write=Connection [{0}], Stream [{1}] stream.outputBuffer.flush.debug=Connection [{0}], Stream [{1}], flushing output with buffer at position [{2}], writeInProgress [{3}] and closed [{4}] @@ -104,6 +106,7 @@ upgradeHandler.sendPrefaceFail=Failed to upgradeHandler.socketCloseFailed=Error closing socket upgradeHandler.stream.closed=Stream [{0}] has been closed for some time upgradeHandler.stream.even=A new remote stream ID of [{0}] was requested but all remote streams must use odd identifiers +upgradeHandler.stream.notWritable=Connection [{0}], Stream [{1}], This stream is not writable upgradeHandler.stream.old=A new remote stream ID of [{0}] was requested but the most recent stream was [{1}] upgradeHandler.tooManyRemoteStreams=The client attempted to use more than [{0}] active streams upgradeHandler.unexpectedAck=Connection [{0}], Stream [{1}], A settings acknowledgement was received when not expected Modified: tomcat/trunk/java/org/apache/coyote/http2/Stream.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http2/Stream.java?rev=1708607&r1=1708606&r2=1708607&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/coyote/http2/Stream.java (original) +++ tomcat/trunk/java/org/apache/coyote/http2/Stream.java Wed Oct 14 14:37:34 2015 @@ -146,7 +146,8 @@ public class Stream extends AbstractStre long windowSize = getWindowSize(); while (windowSize < 1) { if (!canWrite()) { - throw new IOException("TODO i18n: Stream not writeable"); + throw new IOException(sm.getString("stream.notWritable", getConnectionId(), + getIdentifier())); } try { if (block) { @@ -367,8 +368,8 @@ public class Stream extends AbstractStre try { handler.resetStream((StreamException) http2Exception); } catch (IOException ioe) { - // TODO i18n - ConnectionException ce = new ConnectionException("", Http2Error.PROTOCOL_ERROR); + ConnectionException ce = new ConnectionException( + sm.getString("stream.reset.fail"), Http2Error.PROTOCOL_ERROR); ce.initCause(ioe); handler.closeConnection(ce); } --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org