Skip to content

Commit d76a0b2

Browse files
committed
Inline single use local variable before a return
1 parent e34706d commit d76a0b2

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/main/java/org/apache/commons/io/output/FileWriterWithEncoding.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,7 @@ private Object getEncoder() {
128128
if (charsetEncoder != null && getCharset() != null && !charsetEncoder.charset().equals(getCharset())) {
129129
throw new IllegalStateException(String.format("Mismatched Charset(%s) and CharsetEncoder(%s)", getCharset(), charsetEncoder.charset()));
130130
}
131-
final Object encoder = charsetEncoder != null ? charsetEncoder : getCharset();
132-
return encoder;
131+
return charsetEncoder != null ? charsetEncoder : getCharset();
133132
}
134133

135134
/**

0 commit comments

Comments
 (0)