Not a standard jdk collection?

44 views
Skip to first unread message

Erez

unread,
Feb 28, 2012, 6:54:55 PM2/28/12
to protostuff
I am trying to create a Schema for my class and gets the following
exception :

Caused by: java.lang.RuntimeException: Not a standard jdk collection:
class com.X.Y.MyConcurrentHashSet
at
com.dyuproject.protostuff.runtime.RuntimeCollectionFieldFactory
$8.create(RuntimeCollectionFieldFactory.java:482)
at
com.dyuproject.protostuff.runtime.RuntimeSchema.createFrom(RuntimeSchema.java:
239)
at
com.dyuproject.protostuff.runtime.RuntimeSchema.createFrom(RuntimeSchema.java:
197)
at com.dyuproject.protostuff.runtime.RuntimeSchema
$Lazy.getSchema(RuntimeSchema.java:439)
at
com.dyuproject.protostuff.runtime.RuntimeSchema.getSchema(RuntimeSchema.java:
120)

The class does contain a non-jdk collection called
MyConcurrentHashSet. How do I make this work?

David Yu

unread,
Feb 28, 2012, 7:08:06 PM2/28/12
to proto...@googlegroups.com
You can make it implement com.dyuproject.protostuff.Message and write a schema for it.
Registering custom collections/maps (without explicitly marking it as a message) is still in the works.


--
When the cat is away, the mouse is alone.
- David Yu
Reply all
Reply to author
Forward
0 new messages