Quantcast

[JIRA] (GLAZEDLISTS-600) GroupingList reports wrong old values

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[JIRA] (GLAZEDLISTS-600) GroupingList reports wrong old values

JIRA jira-no-reply@java.net
brands created GLAZEDLISTS-600:
----------------------------------

             Summary: GroupingList reports wrong old values
                 Key: GLAZEDLISTS-600
                 URL: https://java.net/jira/browse/GLAZEDLISTS-600
             Project: glazedlists
          Issue Type: Bug
          Components: core
    Affects Versions: 1.9.1, 1.10.0
            Reporter: brands
            Assignee: jessewilson


Following test fails in ListConsistencyListener.
{code}
    @Test
    public void testGrouperStateChangesABtoB() {
        final TransactionList<String> source = new TransactionList<String>(new BasicEventList<String>());
        final UniqueList<String> uniqueList = new UniqueList<String>(source, String.CASE_INSENSITIVE_ORDER);
        ListConsistencyListener.install(uniqueList);
        source.add("A");
        source.add("A");
        source.add("B");
        assertEquals(GlazedListsTests.stringToList("AB"), uniqueList);
        source.beginEvent();
        source.set(0, "B");
        source.set(1, "B");
        source.commitEvent();
        assertEquals(source, GlazedListsTests.stringToList("BBB"));
        assertEquals(GlazedListsTests.stringToList("B"), uniqueList);
    }
{code}

It fails for me in ListConsistencyListener:
{code}
java.lang.RuntimeException: Failure for ca.odell.glazedlists.UniqueList
        at ca.odell.glazedlists.impl.testing.ListConsistencyListener$ListChangeHandler.listChanged(ListConsistencyListener.java:214)
        at ca.odell.glazedlists.event.ListEventAssembler$ListEventFormat.fire(ListEventAssembler.java:434)
        at ca.odell.glazedlists.event.ListEventAssembler$ListEventFormat.fire(ListEventAssembler.java:1)
        at ca.odell.glazedlists.event.SequenceDependenciesEventPublisher$SubjectAndListener.firePendingEvent(SequenceDependenciesEventPublisher.java:469)
        at ca.odell.glazedlists.event.SequenceDependenciesEventPublisher.fireEvent(SequenceDependenciesEventPublisher.java:365)
        at ca.odell.glazedlists.event.ListEventAssembler.commitEvent(ListEventAssembler.java:326)
        at ca.odell.glazedlists.TransactionList$Context.commit(TransactionList.java:284)
        at ca.odell.glazedlists.TransactionList.commitEvent(TransactionList.java:181)
        at ca.odell.glazedlists.UniqueListTest.testGrouperStateChangesABtoB(UniqueListTest.java:1678)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
        at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
        at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
        at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
        at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
        at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
        at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
        at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
        at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
        at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
        at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)
        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
Caused by: java.lang.IllegalStateException: Assertion failed
        at ca.odell.glazedlists.impl.testing.ListConsistencyListener.assertTrue(ListConsistencyListener.java:111)
        at ca.odell.glazedlists.impl.testing.ListConsistencyListener.assertTrue(ListConsistencyListener.java:106)
        at ca.odell.glazedlists.impl.testing.ListConsistencyListener$ListChangeHandler.listChanged(ListConsistencyListener.java:200)
        ... 33 more
{code}




--
This message was sent by Atlassian JIRA
(v6.2.3#6260)
Loading...