Minor Improvements (#701)
* Minor Improvement: * Add final variable.try to make the code read-only * inline Variable. Simplify code * Update UnicodeUnpairedSurrogateRemover.java Better comment. Co-authored-by: Gary Gregory <garydgregory@users.noreply.github.com>
This commit is contained in:
parent
556b744c27
commit
02ff51e504
|
@ -34,12 +34,9 @@ public class UnicodeUnpairedSurrogateRemover extends CodePointTranslator {
|
|||
*/
|
||||
@Override
|
||||
public boolean translate(final int codepoint, final Writer out) throws IOException {
|
||||
if (codepoint >= Character.MIN_SURROGATE && codepoint <= Character.MAX_SURROGATE) {
|
||||
// It's a surrogate. Write nothing and say we've translated.
|
||||
return true;
|
||||
}
|
||||
// true: It's a surrogate. Write nothing and say we've translated.
|
||||
return codepoint >= Character.MIN_SURROGATE && codepoint <= Character.MAX_SURROGATE;
|
||||
// It's not a surrogate. Don't translate it.
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -820,8 +820,8 @@ public class FastDateParser implements DateParser, Serializable {
|
|||
private final Map<String, TzInfo> tzNames= new HashMap<>();
|
||||
|
||||
private static class TzInfo {
|
||||
TimeZone zone;
|
||||
int dstOffset;
|
||||
final TimeZone zone;
|
||||
final int dstOffset;
|
||||
|
||||
TzInfo(final TimeZone tz, final boolean useDst) {
|
||||
zone = tz;
|
||||
|
|
Loading…
Reference in New Issue