|
1 | 1 | /* |
2 | | - * Copyright (c) 2009, 2021, Oracle and/or its affiliates. All rights reserved. |
| 2 | + * Copyright (c) 2009, 2024, Oracle and/or its affiliates. All rights reserved. |
3 | 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 | 4 | * |
5 | 5 | * This code is free software; you can redistribute it and/or modify it |
@@ -402,7 +402,7 @@ protected CoderResult decodeBufferLoop(ByteBuffer src, CharBuffer dst) { |
402 | 402 | else |
403 | 403 | currentState = SBCS; |
404 | 404 | } else { |
405 | | - char c = UNMAPPABLE_DECODING; |
| 405 | + char c; |
406 | 406 | if (currentState == SBCS) { |
407 | 407 | c = b2cSB[b1]; |
408 | 408 | if (c == UNMAPPABLE_DECODING) |
@@ -452,7 +452,7 @@ public int decode(byte[] src, int sp, int len, char[] dst) { |
452 | 452 | else |
453 | 453 | currentState = SBCS; |
454 | 454 | } else { |
455 | | - char c = UNMAPPABLE_DECODING; |
| 455 | + char c; |
456 | 456 | if (currentState == SBCS) { |
457 | 457 | c = b2cSB[b1]; |
458 | 458 | if (c == UNMAPPABLE_DECODING) |
@@ -503,8 +503,8 @@ public Decoder_DBCSONLY(Charset cs, char[][] b2c, char[] b2cSB, int b2Min, int b |
503 | 503 | // The only thing we need to "override" is to check SS2/SS3 and |
504 | 504 | // return "malformed" if found |
505 | 505 | public static class Decoder_EUC_SIM extends Decoder { |
506 | | - private final int SS2 = 0x8E; |
507 | | - private final int SS3 = 0x8F; |
| 506 | + private static final int SS2 = 0x8E; |
| 507 | + private static final int SS3 = 0x8F; |
508 | 508 |
|
509 | 509 | public Decoder_EUC_SIM(Charset cs, |
510 | 510 | char[][] b2c, char[] b2cSB, int b2Min, int b2Max, |
@@ -556,7 +556,7 @@ public int decode(byte[] src, int sp, int len, char[] dst) { |
556 | 556 | public static class Encoder extends CharsetEncoder |
557 | 557 | implements ArrayEncoder |
558 | 558 | { |
559 | | - protected final int MAX_SINGLEBYTE = 0xff; |
| 559 | + protected static final int MAX_SINGLEBYTE = 0xff; |
560 | 560 | private final char[] c2b; |
561 | 561 | private final char[] c2bIndex; |
562 | 562 | protected Surrogate.Parser sgp; |
@@ -659,7 +659,7 @@ protected CoderResult encodeBufferLoop(CharBuffer src, ByteBuffer dst) { |
659 | 659 | dst.put((byte)(bb)); |
660 | 660 | } else { |
661 | 661 | if (dst.remaining() < 1) |
662 | | - return CoderResult.OVERFLOW; |
| 662 | + return CoderResult.OVERFLOW; |
663 | 663 | dst.put((byte)bb); |
664 | 664 | } |
665 | 665 | mark++; |
|
0 commit comments