Uploaded image for project: 'Commons JCS'
  1. Commons JCS
  2. JCS-102

JCS.getGroupKeys() always triggers a\ ClassCastException

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • jcs-2.0-beta-1
    • jcs-2.0-beta-1
    • Composite Cache
    • None

    Description

      Using SVN version build Dec 20, 2012:

      This code:

      JCS<Long, String> jcs = JCS.getInstance("the region");
      jcs.getGroupKeys("the group");
      jcs.putInGroup(Long.valueOf(1), "the group", "some value");
      jcs.getGroupKeys("the group");
      

      will trigger an exception on the second getGroupKeys() call (when there is actually something in the cache)

      Exception in thread "main" java.lang.ClassCastException: java.lang.Long cannot be cast to org.apache.jcs.engine.control.group.GroupAttrName
           [java] 	at org.apache.jcs.access.GroupCacheAccess.getGroupKeys(GroupCacheAccess.java:205)
           [java] 	at my.sample.code.Main.main(Main.java:108)
      

      Attachments

        Activity

          People

            tv Thomas Vandahl
            rjclark Robert Clark
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: