mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8339017: Make a couple of fields in DoubleByte static
Reviewed-by: bpb, naoto
This commit is contained in:
parent
723588a4e7
commit
d35ffa4f6a
1 changed files with 7 additions and 7 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2009, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2009, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -402,7 +402,7 @@ public class DoubleByte {
|
|||
else
|
||||
currentState = SBCS;
|
||||
} else {
|
||||
char c = UNMAPPABLE_DECODING;
|
||||
char c;
|
||||
if (currentState == SBCS) {
|
||||
c = b2cSB[b1];
|
||||
if (c == UNMAPPABLE_DECODING)
|
||||
|
@ -452,7 +452,7 @@ public class DoubleByte {
|
|||
else
|
||||
currentState = SBCS;
|
||||
} else {
|
||||
char c = UNMAPPABLE_DECODING;
|
||||
char c;
|
||||
if (currentState == SBCS) {
|
||||
c = b2cSB[b1];
|
||||
if (c == UNMAPPABLE_DECODING)
|
||||
|
@ -503,8 +503,8 @@ public class DoubleByte {
|
|||
// The only thing we need to "override" is to check SS2/SS3 and
|
||||
// return "malformed" if found
|
||||
public static class Decoder_EUC_SIM extends Decoder {
|
||||
private final int SS2 = 0x8E;
|
||||
private final int SS3 = 0x8F;
|
||||
private static final int SS2 = 0x8E;
|
||||
private static final int SS3 = 0x8F;
|
||||
|
||||
public Decoder_EUC_SIM(Charset cs,
|
||||
char[][] b2c, char[] b2cSB, int b2Min, int b2Max,
|
||||
|
@ -556,7 +556,7 @@ public class DoubleByte {
|
|||
public static class Encoder extends CharsetEncoder
|
||||
implements ArrayEncoder
|
||||
{
|
||||
protected final int MAX_SINGLEBYTE = 0xff;
|
||||
protected static final int MAX_SINGLEBYTE = 0xff;
|
||||
private final char[] c2b;
|
||||
private final char[] c2bIndex;
|
||||
protected Surrogate.Parser sgp;
|
||||
|
@ -659,7 +659,7 @@ public class DoubleByte {
|
|||
dst.put((byte)(bb));
|
||||
} else {
|
||||
if (dst.remaining() < 1)
|
||||
return CoderResult.OVERFLOW;
|
||||
return CoderResult.OVERFLOW;
|
||||
dst.put((byte)bb);
|
||||
}
|
||||
mark++;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue