@Test public void deleteAidHashWrongHashTest() throws NoSuchFieldException, IllegalAccessException { assertEquals("init length", 0, getLength()); addItem(AID_BASIC, HASH_BASIC, RULE_BASIC); assertEquals("length after addition", 1, getLength()); deleteAidHash(TestUtils.concatByteArray(AID_BASIC, HASH_BASIC1), (short) 0, (byte) AID_BASIC.length, (short) AID_BASIC.length, (byte) HASH_BASIC1.length); assertEquals("length after deletion", 1, getLength()); }
static void deleteAidHash(byte[] buf, short aidOfs, byte aidLen, short hashOfs, byte hashLen) { RuleEntry re = searchAidHash(buf, aidOfs, aidLen, hashOfs, hashLen); while (re != null) { JCSystem.beginTransaction(); re.remove(); re.recycle(); JCSystem.commitTransaction(); re = searchAidHash(buf, aidOfs, aidLen, hashOfs, hashLen); } }
RuleEntry { static void deleteAidHash(byte[] buf, short aidOfs, byte aidLen, short hashOfs, byte hashLen) { RuleEntry re = searchAidHash(buf, aidOfs, aidLen, hashOfs, hashLen); while (re != null) { JCSystem.beginTransaction(); re.remove(); re.recycle(); JCSystem.commitTransaction(); re = searchAidHash(buf, aidOfs, aidLen, hashOfs, hashLen); } } }
RuleEntry { static void deleteAidHash(byte[] buf, short aidOfs, byte aidLen, short hashOfs, byte hashLen) { RuleEntry re = searchAidHash(buf, aidOfs, aidLen, hashOfs, hashLen); while (re != null) { JCSystem.beginTransaction(); re.remove(); re.recycle(); JCSystem.commitTransaction(); re = searchAidHash(buf, aidOfs, aidLen, hashOfs, hashLen); } } private  RuleEntry(); }
RuleEntry { static void deleteAidHash(byte[] buf, short aidOfs, byte aidLen, short hashOfs, byte hashLen) { RuleEntry re = searchAidHash(buf, aidOfs, aidLen, hashOfs, hashLen); while (re != null) { JCSystem.beginTransaction(); re.remove(); re.recycle(); JCSystem.commitTransaction(); re = searchAidHash(buf, aidOfs, aidLen, hashOfs, hashLen); } } private  RuleEntry(); static RuleEntry getFirst(); byte getAidLength(); byte getHashLength(); byte getRuleLength(); RuleEntry getNext(); void setAid(byte[] buf, short ofs, byte len); void setHash(byte[] buf, short ofs, byte len); void setRule(byte[] buf, short ofs, byte len); }
RuleEntry { static void deleteAidHash(byte[] buf, short aidOfs, byte aidLen, short hashOfs, byte hashLen) { RuleEntry re = searchAidHash(buf, aidOfs, aidLen, hashOfs, hashLen); while (re != null) { JCSystem.beginTransaction(); re.remove(); re.recycle(); JCSystem.commitTransaction(); re = searchAidHash(buf, aidOfs, aidLen, hashOfs, hashLen); } } private  RuleEntry(); static RuleEntry getFirst(); byte getAidLength(); byte getHashLength(); byte getRuleLength(); RuleEntry getNext(); void setAid(byte[] buf, short ofs, byte len); void setHash(byte[] buf, short ofs, byte len); void setRule(byte[] buf, short ofs, byte len);  }