Skip to content
This repository has been archived by the owner on Jul 16, 2022. It is now read-only.

Commit

Permalink
PDIC: adjust spotbugs warnings
Browse files Browse the repository at this point in the history
Signed-off-by: Hiroshi Miura <miurahr@linux.com>
  • Loading branch information
miurahr committed Sep 28, 2021
1 parent ceaab2b commit 992fcf8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
Expand Up @@ -29,7 +29,6 @@ class PdicInfo {
protected int m_nindex;
protected int m_blocksize;
protected boolean m_match;
protected int m_cachesize; // キャッシュサイズ
protected int m_searchmax; // 最大検索件数
protected String m_dicname; // 辞書名

Expand All @@ -52,7 +51,6 @@ public PdicInfo(File file, int start, int size, int nindex, boolean blockbits, i
m_nindex = nindex;
m_blockbits = (blockbits) ? 4 : 2;
m_blocksize = blocksize;
m_cachesize = 10;
m_searchmax = 10;

mSearchResult = new PdicResult();
Expand Down
Expand Up @@ -179,7 +179,7 @@ public int compare(byte[] aa, int pa, int la, int ptr, int len) {
}

if (address + len < mBlockSize) {
String test = PdicInfo.decodetoCharBuffer(CharsetICU.forNameICU("BOCU-1"), segmentdata, address, len).toString();
PdicInfo.decodetoCharBuffer(CharsetICU.forNameICU("BOCU-1"), segmentdata, address, len);
return compareArrayAsUnsigned(aa, pa, la, segmentdata, address, len);
} else {
int lena = mBlockSize - address;
Expand All @@ -188,7 +188,7 @@ public int compare(byte[] aa, int pa, int la, int ptr, int len) {
leno = lena;
}
int ret = compareArrayAsUnsigned(aa, pa, leno, segmentdata, address, lena);
String test = PdicInfo.decodetoCharBuffer(CharsetICU.forNameICU("BOCU-1"), segmentdata, address, lena).toString();
PdicInfo.decodetoCharBuffer(CharsetICU.forNameICU("BOCU-1"), segmentdata, address, lena);
if (ret != 0) {
return ret;
}
Expand All @@ -197,7 +197,7 @@ public int compare(byte[] aa, int pa, int la, int ptr, int len) {
}
address = 0;
segmentdata = getSegment(segment++);
test = PdicInfo.decodetoCharBuffer(CharsetICU.forNameICU("BOCU-1"), segmentdata, address, len - lena).toString();
PdicInfo.decodetoCharBuffer(CharsetICU.forNameICU("BOCU-1"), segmentdata, address, len - lena);
return compareArrayAsUnsigned(aa, pa + lena, la - lena, segmentdata, address, len - lena);
}
}
Expand Down

0 comments on commit 992fcf8

Please sign in to comment.