James Server
  1. James Server
  2. JAMES-721

MBoxMailRepository.remove(String key) causes ClassCastException

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.2.0, 2.3.0
    • Fix Version/s: 2.3.1
    • Labels:
      None

      Description

      It calls
      ArrayList keys = new ArrayList();
      keys.add(key);
      this.remove(keys);
      although remove(Collection) expects Mail objects

      02/12/06 20:25:14 ERROR pop3server: Some deleted messages were not removed: java.lang.String
      java.lang.ClassCastException: java.lang.String
      at org.apache.james.mailrepository.MBoxMailRepository$3.messageAction(MBoxMailRepository.java:702)
      at org.apache.james.mailrepository.MBoxMailRepository.parseMboxFile(MBoxMailRepository.java:277)
      at org.apache.james.mailrepository.MBoxMailRepository.remove(MBoxMailRepository.java:691)
      at org.apache.james.mailrepository.MBoxMailRepository.remove(MBoxMailRepository.java:767)

      public void remove(Mail mail)

      { // Convert the message into a key Vector delVec = new Vector(); delVec.addElement(mail); remove(delVec); }

      Works, but the comment is wrong.

        Activity

        Joachim Draeger created issue -
        Joachim Draeger made changes -
        Field Original Value New Value
        Summary MBoxMailRepository.remove(String key) does not work MBoxMailRepository.remove(String key) causes ClassCastException
        Norman Maurer made changes -
        Resolution Fixed [ 1 ]
        Assignee Norman Maurer [ norman ]
        Status Open [ 1 ] Resolved [ 5 ]
        Norman Maurer made changes -
        Affects Version/s 2.3.0b1 [ 12311920 ]
        Affects Version/s 2.3.0a2 [ 12310795 ]
        Affects Version/s 2.3.0rc5 [ 12312049 ]
        Fix Version/s 2.3.1-dev [ 12312150 ]
        Affects Version/s 2.3.0b2 [ 12311974 ]
        Affects Version/s 2.3.0a1 [ 10690 ]
        Fix Version/s Next Major [ 10427 ]
        Affects Version/s 2.3.0 [ 12312103 ]
        Affects Version/s 2.3.0rc4 [ 12312082 ]
        Affects Version/s 2.3.0rc1 [ 12312000 ]
        Affects Version/s 2.2.0 [ 10747 ]
        Affects Version/s 2.3.0rc3 [ 12310796 ]
        Affects Version/s 2.3.0rc2 [ 12312012 ]
        Affects Version/s 2.3.0b3 [ 12311981 ]
        Affects Version/s Trunk [ 12312135 ]
        Affects Version/s 2.3.0a3 [ 12311010 ]
        Danny Angus made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Mark Thomas made changes -
        Workflow jira [ 12391293 ] Default workflow, editable Closed status [ 12566883 ]
        Mark Thomas made changes -
        Workflow Default workflow, editable Closed status [ 12566883 ] jira [ 12581928 ]

          People

          • Assignee:
            Norman Maurer
            Reporter:
            Joachim Draeger
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development