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:
parent
e539d10f76
commit
c4ecd75ecd
|
@ -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 {
|
||||
final int codepoint = Character.codePointAt(input, index);
|
||||
final boolean consumed = translate(codepoint, out);
|
||||
if (consumed) {
|
||||
return 1;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
return consumed ? 1 : 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue