Compare commits

...

1 commit

Author SHA1 Message Date
emaiannone
f26b42214f
Refactor Member Ignoring Method smell in CharsetRecog_sbcs class 2020-02-16 07:16:34 +01:00

View file

@ -266,11 +266,10 @@ abstract class CharsetRecog_sbcs extends CharsetRecognizer {
return match (det, ngrams, byteMap, (byte)0x20); return match (det, ngrams, byteMap, (byte)0x20);
} }
int match(CharsetDetector det, int[] ngrams, byte[] byteMap, byte spaceChar) static int match(CharsetDetector det, int[] ngrams, byte[] byteMap, byte spaceChar) {
{ NGramParser parser = new NGramParser(ngrams, byteMap);
NGramParser parser = new NGramParser(ngrams, byteMap); return parser.parse(det, spaceChar);
return parser.parse(det, spaceChar); }
}
int matchIBM420(CharsetDetector det, int[] ngrams, byte[] byteMap, @SuppressWarnings("SameParameterValue") byte spaceChar){ int matchIBM420(CharsetDetector det, int[] ngrams, byte[] byteMap, @SuppressWarnings("SameParameterValue") byte spaceChar){
NGramParser_IBM420 parser = new NGramParser_IBM420(ngrams, byteMap); NGramParser_IBM420 parser = new NGramParser_IBM420(ngrams, byteMap);