Refactor Member Ignoring Method smell in CharsetRecog_sbcs class

This commit is contained in:
emaiannone 2020-01-19 16:02:13 +01:00 committed by ligi
parent b47efaf943
commit f26b42214f
No known key found for this signature in database
GPG key ID: 8E81894010ABF23D

View file

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