XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 4.0
    • Fix Version/s: 4.1
    • Component/s: Collection
    • Labels:
      None
    • Environment:

      android

      Description

      the result of trie tree prefixMap function is inconsistent. it would contain a key but the size is 0;
      some unittest codes as below:

      PatriciaTrie<String> aTree =
      new PatriciaTrie<String> ();
      aTree.put("点评", "测试");
      aTree.put("书评", "测试");
      assertTrue(aTree.prefixMap("点").containsKey("点评")); //pass
      assertEquals("测试", aTree.prefixMap("点").get("点评")); //pass
      assertFalse(aTree.prefixMap("点").isEmpty()); //fail
      assertEquals(1, aTree.prefixMap("点").size()); //fail actural 0
      assertEquals(1, aTree.prefixMap("点").keySet().size()); //fail actural 0
      assertEquals(1, aTree.prefixMap("点").entrySet().size()); //fail actural 0
      assertEquals(1, aTree.prefixMap("点评").values().size()); //fail actural 0

        Attachments

        1. 525.patch
          1 kB
          zigler zhang

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                zigler zigler zhang
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: