[jira] Updated: (COLLECTIONS-363) TransformedMap is Serializable but its superclass doesn't define an accessible void constructor
[ https://issues.apache.org/jira/browse/COLLECTIONS-363?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Igor Saprykin updated COLLECTIONS-363: -- Attachment: (was: COLLECTIONS-363-obj-test.patch) > TransformedMap is Serializable but its superclass doesn't define an > accessible void constructor > --- > > Key: COLLECTIONS-363 > URL: https://issues.apache.org/jira/browse/COLLECTIONS-363 > Project: Commons Collections > Issue Type: Bug > Components: Map >Affects Versions: 3.2 >Reporter: Sebb > Attachments: COLLECTIONS-363-obj-test-fix.patch, > COLLECTIONS-363.patch, TransformedMap.emptyCollection.version3.2.obj, > TransformedMap.fullCollection.version3.2.obj > > > TransformedMap is Serializable but its superclass doesn't define an > accessible void constructor. > For example, the following test fails: > {code} > public void testSerialisation() throws Exception { > TransformedMap map = > TransformedMap.decorate( > new HashMap(), NOPTransformer. > getInstance(), NOPTransformer. getInstance()); > ByteArrayOutputStream bytes = new ByteArrayOutputStream(); > ObjectOutputStream out = new ObjectOutputStream(bytes); > out.writeObject(map); // fails with java.io.InvalidClassException: > org.apache.commons.collections.splitmap.TransformedMap; no valid constructor > out.close(); > } > {code} -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Updated: (COLLECTIONS-363) TransformedMap is Serializable but its superclass doesn't define an accessible void constructor
[ https://issues.apache.org/jira/browse/COLLECTIONS-363?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Igor Saprykin updated COLLECTIONS-363: -- Attachment: TransformedMap.fullCollection.version3.2.obj TransformedMap.emptyCollection.version3.2.obj > TransformedMap is Serializable but its superclass doesn't define an > accessible void constructor > --- > > Key: COLLECTIONS-363 > URL: https://issues.apache.org/jira/browse/COLLECTIONS-363 > Project: Commons Collections > Issue Type: Bug > Components: Map >Affects Versions: 3.2 >Reporter: Sebb > Attachments: COLLECTIONS-363-obj-test-fix.patch, > COLLECTIONS-363.patch, TransformedMap.emptyCollection.version3.2.obj, > TransformedMap.fullCollection.version3.2.obj > > > TransformedMap is Serializable but its superclass doesn't define an > accessible void constructor. > For example, the following test fails: > {code} > public void testSerialisation() throws Exception { > TransformedMap map = > TransformedMap.decorate( > new HashMap(), NOPTransformer. > getInstance(), NOPTransformer. getInstance()); > ByteArrayOutputStream bytes = new ByteArrayOutputStream(); > ObjectOutputStream out = new ObjectOutputStream(bytes); > out.writeObject(map); // fails with java.io.InvalidClassException: > org.apache.commons.collections.splitmap.TransformedMap; no valid constructor > out.close(); > } > {code} -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Updated: (COLLECTIONS-363) TransformedMap is Serializable but its superclass doesn't define an accessible void constructor
[ https://issues.apache.org/jira/browse/COLLECTIONS-363?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Igor Saprykin updated COLLECTIONS-363: -- Attachment: COLLECTIONS-363-obj-test-fix.patch > TransformedMap is Serializable but its superclass doesn't define an > accessible void constructor > --- > > Key: COLLECTIONS-363 > URL: https://issues.apache.org/jira/browse/COLLECTIONS-363 > Project: Commons Collections > Issue Type: Bug > Components: Map >Affects Versions: 3.2 >Reporter: Sebb > Attachments: COLLECTIONS-363-obj-test-fix.patch, > COLLECTIONS-363-obj-test.patch, COLLECTIONS-363.patch > > > TransformedMap is Serializable but its superclass doesn't define an > accessible void constructor. > For example, the following test fails: > {code} > public void testSerialisation() throws Exception { > TransformedMap map = > TransformedMap.decorate( > new HashMap(), NOPTransformer. > getInstance(), NOPTransformer. getInstance()); > ByteArrayOutputStream bytes = new ByteArrayOutputStream(); > ObjectOutputStream out = new ObjectOutputStream(bytes); > out.writeObject(map); // fails with java.io.InvalidClassException: > org.apache.commons.collections.splitmap.TransformedMap; no valid constructor > out.close(); > } > {code} -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Issue Comment Edited: (COLLECTIONS-363) TransformedMap is Serializable but its superclass doesn't define an accessible void constructor
[ https://issues.apache.org/jira/browse/COLLECTIONS-363?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12973281#action_12973281 ] Igor Saprykin edited comment on COLLECTIONS-363 at 12/20/10 1:18 PM: - I attempted to follow your instructions and done a test case which use .obj files (see patch COLLECTIONS-363-obj-test-fix.patch attached). I'm also open for any suggestions about making it better. I wonder why splitmap.TestTransformedMap extends BulkTest, but not a AbstractTestObject like all other containers. was (Author: isaprykin): I attempted to follow your instructions and done a test case which use .obj files (see patch attached). I'm also open for any suggestions about making it better. I wonder why splitmap.TestTransformedMap extends BulkTest, but not a AbstractTestObject like all other containers. > TransformedMap is Serializable but its superclass doesn't define an > accessible void constructor > --- > > Key: COLLECTIONS-363 > URL: https://issues.apache.org/jira/browse/COLLECTIONS-363 > Project: Commons Collections > Issue Type: Bug > Components: Map >Affects Versions: 3.2 >Reporter: Sebb > Attachments: COLLECTIONS-363-obj-test-fix.patch, > COLLECTIONS-363-obj-test.patch, COLLECTIONS-363.patch > > > TransformedMap is Serializable but its superclass doesn't define an > accessible void constructor. > For example, the following test fails: > {code} > public void testSerialisation() throws Exception { > TransformedMap map = > TransformedMap.decorate( > new HashMap(), NOPTransformer. > getInstance(), NOPTransformer. getInstance()); > ByteArrayOutputStream bytes = new ByteArrayOutputStream(); > ObjectOutputStream out = new ObjectOutputStream(bytes); > out.writeObject(map); // fails with java.io.InvalidClassException: > org.apache.commons.collections.splitmap.TransformedMap; no valid constructor > out.close(); > } > {code} -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Issue Comment Edited: (COLLECTIONS-363) TransformedMap is Serializable but its superclass doesn't define an accessible void constructor
[ https://issues.apache.org/jira/browse/COLLECTIONS-363?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12973281#action_12973281 ] Igor Saprykin edited comment on COLLECTIONS-363 at 12/20/10 1:06 PM: - I attempted to follow your instructions and done a test case which use .obj files (see patch attached). I'm also open for any suggestions about making it better. I wonder why splitmap.TestTransformedMap extends BulkTest, but not a AbstractTestObject like all other containers. was (Author: isaprykin): Patch with .obj file and test case > TransformedMap is Serializable but its superclass doesn't define an > accessible void constructor > --- > > Key: COLLECTIONS-363 > URL: https://issues.apache.org/jira/browse/COLLECTIONS-363 > Project: Commons Collections > Issue Type: Bug > Components: Map >Affects Versions: 3.2 >Reporter: Sebb > Attachments: COLLECTIONS-363-obj-test.patch, COLLECTIONS-363.patch > > > TransformedMap is Serializable but its superclass doesn't define an > accessible void constructor. > For example, the following test fails: > {code} > public void testSerialisation() throws Exception { > TransformedMap map = > TransformedMap.decorate( > new HashMap(), NOPTransformer. > getInstance(), NOPTransformer. getInstance()); > ByteArrayOutputStream bytes = new ByteArrayOutputStream(); > ObjectOutputStream out = new ObjectOutputStream(bytes); > out.writeObject(map); // fails with java.io.InvalidClassException: > org.apache.commons.collections.splitmap.TransformedMap; no valid constructor > out.close(); > } > {code} -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Updated: (COLLECTIONS-363) TransformedMap is Serializable but its superclass doesn't define an accessible void constructor
[ https://issues.apache.org/jira/browse/COLLECTIONS-363?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Igor Saprykin updated COLLECTIONS-363: -- Attachment: COLLECTIONS-363-obj-test.patch Patch with .obj file and test case > TransformedMap is Serializable but its superclass doesn't define an > accessible void constructor > --- > > Key: COLLECTIONS-363 > URL: https://issues.apache.org/jira/browse/COLLECTIONS-363 > Project: Commons Collections > Issue Type: Bug > Components: Map >Affects Versions: 3.2 >Reporter: Sebb > Attachments: COLLECTIONS-363-obj-test.patch, COLLECTIONS-363.patch > > > TransformedMap is Serializable but its superclass doesn't define an > accessible void constructor. > For example, the following test fails: > {code} > public void testSerialisation() throws Exception { > TransformedMap map = > TransformedMap.decorate( > new HashMap(), NOPTransformer. > getInstance(), NOPTransformer. getInstance()); > ByteArrayOutputStream bytes = new ByteArrayOutputStream(); > ObjectOutputStream out = new ObjectOutputStream(bytes); > out.writeObject(map); // fails with java.io.InvalidClassException: > org.apache.commons.collections.splitmap.TransformedMap; no valid constructor > out.close(); > } > {code} -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (COLLECTIONS-360) FilterListIterator#hasNext throws exception (associate with JUnit tests)
[ https://issues.apache.org/jira/browse/COLLECTIONS-360?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12970749#action_12970749 ] Igor Saprykin commented on COLLECTIONS-360: --- As far as I understand expression "{{FilterListIterator(var9)}}" resolves into {{FilterListIterator(Predicate predicate)}} constructor. Here's what it's javadoc is saying: {quote}{noformat} Constructs a new FilterListIterator that will not function until {...@link #setListIterator(ListIterator) setListIterator} is invoked. @param predicate the predicate to use.{noformat}{quote} So if a {{ListIterator}} isn't specified than [NullPointerException|http://download.oracle.com/javase/6/docs/api/java/lang/NullPointerException.html](your case) is thrown. I think, you're partialy right - {{FilterListIterator}} implements {{Iterator}} interface and [Iterator.hasNext()|http://download.oracle.com/javase/6/docs/api/java/util/Iterator.html#hasNext()] doesn't specify any exceptions to be thrown. If it's really an issue maybe these two constructors - {{FilterListIterator(Predicate predicate)}} and {{FilterListIterator(ListIterator iterator )}} should be deprecated? > FilterListIterator#hasNext throws exception (associate with JUnit tests) > > > Key: COLLECTIONS-360 > URL: https://issues.apache.org/jira/browse/COLLECTIONS-360 > Project: Commons Collections > Issue Type: Bug >Affects Versions: 3.2 > Environment: ubuntu >Reporter: Sai Zhang > > Hi, > I found the some of the iterator classes does not fulfill the iterator > specification of JDK. > e.g. hasNext() should never throw exception. > Here is an automatically generated junit test (I am now writing a tool) > {code:java} > public void test233() throws Throwable { > java.lang.Integer var6 = new java.lang.Integer(0); > org.apache.commons.collections.list.GrowthList var7 = new > org.apache.commons.collections.list.GrowthList(var6); > org.apache.commons.collections.Predicate var9 = > org.apache.commons.collections.PredicateUtils.anyPredicate((java.util.Collection)var7); > java.lang.Long var10 = new java.lang.Long(10L); > org.apache.commons.collections.iterators.FilterListIterator var13 = new > org.apache.commons.collections.iterators.FilterListIterator(var9); > //this line throws exception! > var13.hasNext(); > } > {code} > could you please check it to confirm whether it is bug or I misunderstand the > specification of apache common collections? > thanks, -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Updated: (COLLECTIONS-363) TransformedMap is Serializable but its superclass doesn't define an accessible void constructor
[ https://issues.apache.org/jira/browse/COLLECTIONS-363?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Igor Saprykin updated COLLECTIONS-363: -- Attachment: COLLECTIONS-363.patch > TransformedMap is Serializable but its superclass doesn't define an > accessible void constructor > --- > > Key: COLLECTIONS-363 > URL: https://issues.apache.org/jira/browse/COLLECTIONS-363 > Project: Commons Collections > Issue Type: Bug > Components: Map >Affects Versions: 3.2 >Reporter: Sebb > Attachments: COLLECTIONS-363.patch > > > TransformedMap is Serializable but its superclass doesn't define an > accessible void constructor. > For example, the following test fails: > {code} > public void testSerialisation() throws Exception { > TransformedMap map = > TransformedMap.decorate( > new HashMap(), NOPTransformer. > getInstance(), NOPTransformer. getInstance()); > ByteArrayOutputStream bytes = new ByteArrayOutputStream(); > ObjectOutputStream out = new ObjectOutputStream(bytes); > out.writeObject(map); // fails with java.io.InvalidClassException: > org.apache.commons.collections.splitmap.TransformedMap; no valid constructor > out.close(); > } > {code} -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (COLLECTIONS-363) TransformedMap is Serializable but its superclass doesn't define an accessible void constructor
[ https://issues.apache.org/jira/browse/COLLECTIONS-363?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12970728#action_12970728 ] Igor Saprykin commented on COLLECTIONS-363: --- Hello. It seems to me that addition of constructor really solves the problem. (look COLLECTIONS-363.patch attached) > TransformedMap is Serializable but its superclass doesn't define an > accessible void constructor > --- > > Key: COLLECTIONS-363 > URL: https://issues.apache.org/jira/browse/COLLECTIONS-363 > Project: Commons Collections > Issue Type: Bug > Components: Map >Affects Versions: 3.2 >Reporter: Sebb > > TransformedMap is Serializable but its superclass doesn't define an > accessible void constructor. > For example, the following test fails: > {code} > public void testSerialisation() throws Exception { > TransformedMap map = > TransformedMap.decorate( > new HashMap(), NOPTransformer. > getInstance(), NOPTransformer. getInstance()); > ByteArrayOutputStream bytes = new ByteArrayOutputStream(); > ObjectOutputStream out = new ObjectOutputStream(bytes); > out.writeObject(map); // fails with java.io.InvalidClassException: > org.apache.commons.collections.splitmap.TransformedMap; no valid constructor > out.close(); > } > {code} -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.