Polishing in CharBufferDecoder

This commit is contained in:
rstoyanchev
2026-02-04 11:37:52 +00:00
parent 7c2159fbe9
commit db9045ae28
@@ -74,8 +74,8 @@ public final class CharBufferDecoder extends AbstractCharSequenceDecoder<CharBuf
* @param stripDelimiter whether to remove delimiters from the resulting input strings
*/
public static CharBufferDecoder textPlainOnly(List<String> delimiters, boolean stripDelimiter) {
var textPlain = new MimeType("text", "plain", DEFAULT_CHARSET);
return new CharBufferDecoder(delimiters, stripDelimiter, textPlain);
MimeType mimeType = new MimeType("text", "plain", DEFAULT_CHARSET);
return new CharBufferDecoder(delimiters, stripDelimiter, mimeType);
}
/**
@@ -91,8 +91,8 @@ public final class CharBufferDecoder extends AbstractCharSequenceDecoder<CharBuf
* @param stripDelimiter whether to remove delimiters from the resulting input strings
*/
public static CharBufferDecoder allMimeTypes(List<String> delimiters, boolean stripDelimiter) {
var textPlain = new MimeType("text", "plain", DEFAULT_CHARSET);
return new CharBufferDecoder(delimiters, stripDelimiter, textPlain, MimeTypeUtils.ALL);
MimeType mimeType = new MimeType("text", "plain", DEFAULT_CHARSET);
return new CharBufferDecoder(delimiters, stripDelimiter, mimeType, MimeTypeUtils.ALL);
}
}