You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mina.apache.org by tr...@apache.org on 2007/11/02 01:51:46 UTC
svn commit: r591180 -
/mina/trunk/core/src/main/java/org/apache/mina/filter/codec/textline/TextLineDecoder.java
Author: trustin
Date: Thu Nov 1 17:51:39 2007
New Revision: 591180
URL: http://svn.apache.org/viewvc?rev=591180&view=rev
Log:
Changed TextLineDecoder to use RecoverableProtocolDecoderException
Modified:
mina/trunk/core/src/main/java/org/apache/mina/filter/codec/textline/TextLineDecoder.java
Modified: mina/trunk/core/src/main/java/org/apache/mina/filter/codec/textline/TextLineDecoder.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/filter/codec/textline/TextLineDecoder.java?rev=591180&r1=591179&r2=591180&view=diff
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/filter/codec/textline/TextLineDecoder.java (original)
+++ mina/trunk/core/src/main/java/org/apache/mina/filter/codec/textline/TextLineDecoder.java Thu Nov 1 17:51:39 2007
@@ -28,7 +28,9 @@
import org.apache.mina.common.IoBuffer;
import org.apache.mina.common.IoSession;
import org.apache.mina.filter.codec.ProtocolDecoder;
+import org.apache.mina.filter.codec.ProtocolDecoderException;
import org.apache.mina.filter.codec.ProtocolDecoderOutput;
+import org.apache.mina.filter.codec.RecoverableProtocolDecoderException;
/**
* A {@link ProtocolDecoder} which decodes a text line into a string.
@@ -137,7 +139,7 @@
}
private void decodeAuto(Context ctx, IoBuffer in, ProtocolDecoderOutput out)
- throws CharacterCodingException {
+ throws CharacterCodingException, ProtocolDecoderException {
int matchCount = ctx.getMatchCount();
@@ -185,7 +187,7 @@
} else {
int overflowPosition = ctx.getOverflowPosition();
ctx.reset();
- throw new BufferDataException(
+ throw new RecoverableProtocolDecoderException(
"Line is too long: " + overflowPosition);
}
@@ -202,7 +204,7 @@
}
private void decodeNormal(Context ctx, IoBuffer in, ProtocolDecoderOutput out)
- throws CharacterCodingException {
+ throws CharacterCodingException, ProtocolDecoderException {
int matchCount = ctx.getMatchCount();
@@ -243,7 +245,7 @@
} else {
int overflowPosition = ctx.getOverflowPosition();
ctx.reset();
- throw new BufferDataException(
+ throw new RecoverableProtocolDecoderException(
"Line is too long: " + overflowPosition);
}