No need for if/then/else w/ 2 returns when a simple ternary expression will do.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1553931 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Gary D. Gregory 2013-12-28 21:24:44 +00:00
parent e539d10f76
commit c4ecd75ecd
1 changed files with 1 additions and 5 deletions

View File

@ -36,11 +36,7 @@ public abstract class CodePointTranslator extends CharSequenceTranslator {
public final int translate(final CharSequence input, final int index, final Writer out) throws IOException { public final int translate(final CharSequence input, final int index, final Writer out) throws IOException {
final int codepoint = Character.codePointAt(input, index); final int codepoint = Character.codePointAt(input, index);
final boolean consumed = translate(codepoint, out); final boolean consumed = translate(codepoint, out);
if (consumed) { return consumed ? 1 : 0;
return 1;
} else {
return 0;
}
} }
/** /**