On 9/1/05, Daniel Perry <[EMAIL PROTECTED]> wrote:

> I'm trying to use the OJB xdoclet module (from 1.0.3 download) with java 5
> generics.
> 
> The following:
>   ArrayList <Integer>generic  = new ArrayList<Integer>();
> 
> gives an error:
> [ojbdoclet] Error parsing File C:\java\pol\src\java\Test.java:Encountered
> "<" at
>  line 11, column 27.
> [ojbdoclet] Was expecting one of:
> 
> Is there a 1.5 compatible version?

This is an problem of XDoclet itself. Basically you need a new
XJavadoc jar (1.5, which you can get from here:
http://sourceforge.net/projects/xdoclet/).
 
> Also, can I use generics for collections in OJB classes?

Well, yes, sort-of. You still need to define the element-class-ref
(XDoclet does not use the generics information), but since the
generics are lost in the bytecode (compiled to normal classes and
casts), they will work.

Tom

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to