@Test public void deleteAidMultipleSameTest() throws NoSuchFieldException, IllegalAccessException { addItem(AID_BASIC, HASH_BASIC, RULE_BASIC); addItem(AID_BASIC, HASH_BASIC1, RULE_BASIC1); addItem(AID_BASIC, HASH_BASIC2, RULE_BASIC2); addItem(AID_BASIC, HASH_BASIC3, RULE_BASIC3); assertEquals("init length", 4, getLength()); deleteAid(AID_BASIC); assertEquals("length after deletion", 0, getLength()); }
static void deleteAid(byte[] buf, short ofs, byte len) { RuleEntry re = searchAid(buf, ofs, len); while (re != null) { JCSystem.beginTransaction(); re.remove(); re.recycle(); JCSystem.commitTransaction(); re = searchAid(buf, ofs, len); } }
RuleEntry { static void deleteAid(byte[] buf, short ofs, byte len) { RuleEntry re = searchAid(buf, ofs, len); while (re != null) { JCSystem.beginTransaction(); re.remove(); re.recycle(); JCSystem.commitTransaction(); re = searchAid(buf, ofs, len); } } }
RuleEntry { static void deleteAid(byte[] buf, short ofs, byte len) { RuleEntry re = searchAid(buf, ofs, len); while (re != null) { JCSystem.beginTransaction(); re.remove(); re.recycle(); JCSystem.commitTransaction(); re = searchAid(buf, ofs, len); } } private  RuleEntry(); }
RuleEntry { static void deleteAid(byte[] buf, short ofs, byte len) { RuleEntry re = searchAid(buf, ofs, len); while (re != null) { JCSystem.beginTransaction(); re.remove(); re.recycle(); JCSystem.commitTransaction(); re = searchAid(buf, ofs, len); } } 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 deleteAid(byte[] buf, short ofs, byte len) { RuleEntry re = searchAid(buf, ofs, len); while (re != null) { JCSystem.beginTransaction(); re.remove(); re.recycle(); JCSystem.commitTransaction(); re = searchAid(buf, ofs, len); } } 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);  }