I'm getting exceptions running tests in web mode. The line number in EnumMap_CustomFieldSerializer doesn't make ...
13 years, 6 months ago
(2012-06-07 18:05:46 UTC)
#4
I'm getting exceptions running tests in web mode. The line number in
EnumMap_CustomFieldSerializer doesn't make sense to me, but here is one of them:
3)
testEmptyEnumMap(com.google.gwt.rpc.client.RpcCollectionsTest)java.lang.RuntimeException:
Remote test failed at 10.58.163.225 / Mozilla/5.0 (Windows; U; Windows NT 5.1;
en-US; rv:1.9.0.19) Gecko/2010031422 Firefox/3.0.19
Caused by: java.util.NoSuchElementException
...
at
java.util.NoSuchElementException.NoSuchElementException(NoSuchElementException.java:25)
at java.util.EnumSet$EnumSetImpl$IteratorImpl.$next(EnumSet.java:59)
at java.util.EnumSet.next(EnumSet.java:57)
at
com.google.gwt.user.client.rpc.core.java.util.EnumMap_CustomFieldSerializer.serialize(EnumMap_CustomFieldSerializer.java:65)
at
com.google.gwt.rpc.client.impl.TypeOverrides$SerializeFunction.$serialize(TypeOverrides.java:35)
at
com.google.gwt.rpc.client.impl.CommandClientSerializationStreamWriter.$invokeCustomSerializer(CommandClientSerializationStreamWriter.java:159)
at
com.google.gwt.rpc.client.impl.CommandClientSerializationStreamWriter.makeValue(CommandClientSerializationStreamWriter.java:113)
at
com.google.gwt.rpc.client.impl.CommandSerializationStreamWriterBase.writeObject(CommandSerializationStreamWriterBase.java:64)
at
com.google.gwt.rpc.client.impl.CommandToStringWriter.writeObject(CommandToStringWriter.java:99)
at
com.google.gwt.user.client.rpc.CollectionsTestService_Proxy.echoEmptyEnumMap(CollectionsTestService_Proxy.java:501)
at
com.google.gwt.user.client.rpc.CollectionsTest.$testEmptyEnumMap(CollectionsTest.java:257)
On 2012/06/07 18:05:46, skybrian1 wrote: > I'm getting exceptions running tests in web mode. The ...
13 years, 6 months ago
(2012-06-07 18:38:19 UTC)
#5
On 2012/06/07 18:05:46, skybrian1 wrote:
> I'm getting exceptions running tests in web mode. The line number in
> EnumMap_CustomFieldSerializer doesn't make sense to me, but here is one of
them:
>
> 3)
>
testEmptyEnumMap(com.google.gwt.rpc.client.RpcCollectionsTest)java.lang.RuntimeException:
> Remote test failed at 10.58.163.225 / Mozilla/5.0 (Windows; U; Windows NT 5.1;
> en-US; rv:1.9.0.19) Gecko/2010031422 Firefox/3.0.19
>
>
> Caused by: java.util.NoSuchElementException
> ...
> at
>
java.util.NoSuchElementException.NoSuchElementException(NoSuchElementException.java:25)
> at java.util.EnumSet$EnumSetImpl$IteratorImpl.$next(EnumSet.java:59)
> at java.util.EnumSet.next(EnumSet.java:57)
> at
>
com.google.gwt.user.client.rpc.core.java.util.EnumMap_CustomFieldSerializer.serialize(EnumMap_CustomFieldSerializer.java:65)
> at
>
com.google.gwt.rpc.client.impl.TypeOverrides$SerializeFunction.$serialize(TypeOverrides.java:35)
> at
>
com.google.gwt.rpc.client.impl.CommandClientSerializationStreamWriter.$invokeCustomSerializer(CommandClientSerializationStreamWriter.java:159)
> at
>
com.google.gwt.rpc.client.impl.CommandClientSerializationStreamWriter.makeValue(CommandClientSerializationStreamWriter.java:113)
> at
>
com.google.gwt.rpc.client.impl.CommandSerializationStreamWriterBase.writeObject(CommandSerializationStreamWriterBase.java:64)
> at
>
com.google.gwt.rpc.client.impl.CommandToStringWriter.writeObject(CommandToStringWriter.java:99)
> at
>
com.google.gwt.user.client.rpc.CollectionsTestService_Proxy.echoEmptyEnumMap(CollectionsTestService_Proxy.java:501)
> at
>
com.google.gwt.user.client.rpc.CollectionsTest.$testEmptyEnumMap(CollectionsTest.java:257)
It looks like the tests are using the wrong version of
EnumMap_CustomFieldSerializer. In web mode the supersource version should be
called. There may be a .gwt.xml file somewhere that needs to be modified, but I
didn't find any such reference for the super-sourced
LinkedHashMap_CustomFieldSerializer which I used as a reference.
This is a web mode test and it looks like we're using the right version ...
13 years, 6 months ago
(2012-06-07 21:51:28 UTC)
#6
This is a web mode test and it looks like we're using the right version because
the line number matches up. Here's the line in question:
exemplar = privateKeySet.iterator().next();
So this looks like an actual bug. The exemplar approach doesn't work for an
empty EnumSet (obvious in retrospect), so we'll have to think of something else.
Maybe we could use a generator and choose the exemplar at compile time?
Since the code freeze for GWT 2.5 is tomorrow, I don't think we're going to get
this in. Maybe 2.5.1.
I meant to get the private array that holds the universe of allowed enums. Instead ...
13 years, 6 months ago
(2012-06-12 17:24:35 UTC)
#7
I meant to get the private array that holds the universe of allowed enums.
Instead I grabbed an iterator to the live keySet. This patch should fix that. I
tested it under hosted and web mode, as well as with the junit tests.
Issue 6174044: Custom Field Serializer for EnumMap (Issue 1634804)
Created 13 years, 7 months ago by bradley
Modified 13 years, 6 months ago
Reviewers: jat, skybrian1
Base URL: http://google-web-toolkit.googlecode.com/svn/trunk/
Comments: 7