Uploaded image for project: 'Commons Collections'
  1. Commons Collections
  2. COLLECTIONS-721

functors.InvokerTransformer backward incompatibility bug

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Not A Bug
    • 4.1, 4.2, 4.3
    • None
    • None
    • Important

    Description

      The following code snippets throw a NotSerializableException. It works well before commons-collections4 4.0 and commons-collection3. When I update it to 4.1 or newer versions, it failed.

      	@Test
      	public void Demo() throws IOException{
      		InvokerTransformer transformer = new InvokerTransformer("toString", new Class[]{}, new Object[]{});
              Queue priorityQueue = new PriorityQueue(2, new TransformingComparator(transformer));
              priorityQueue.add(1);
              
              ByteArrayOutputStream bout = new ByteArrayOutputStream();
              ObjectOutputStream out = new ObjectOutputStream(bout);
              out.writeObject(priorityQueue);
      		
      		}
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              lingchao xia0c
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: