[ http://issues.apache.org/jira/browse/OJB-61?page=all ]
Thomas Dudziak resolved OJB-61:
-------------------------------
Resolution: Fixed
There was a tiny bug related to this issue (use of the unqualified name for
finding a class when the qualified name was required) which is fixed.
The issue itself has been fixed by checking whether the declared field type (T
in your sample) can be found (source or in the classpath). If not, a warning
will be issued and the check for whether the class-ref type is assignable to
the variable type, will not be performed. Eg. in your case you will get a
warning that T cannot be found, but other than that, it will run through.
> xdoclet ojb.reference property class-ref doesn't work with generics
> -------------------------------------------------------------------
>
> Key: OJB-61
> URL: http://issues.apache.org/jira/browse/OJB-61
> Project: OJB
> Type: Bug
> Versions: 1.1 CVS, 1.0.3
> Environment: java version: 1.5.0 (build 1.5.0_02-b09)
> Reporter: Krzysztof Bia?ek
> Assignee: Thomas Dudziak
> Priority: Minor
> Fix For: 1.0.x CVS, 1.1 CVS
> Attachments: ReferenceDescriptorConstraints.java
>
> There is bug inside xdoclet-ojb-module, which cause it to crash when parsing
> classes using generics feature.
> Here is example code:
> package some.package;
> /**
> * @ojb.class
> */
> class Foo {
> }
> /**
> * @ojb.class
> */
> class Bar<T extends Foo> {
> /**
> * @ojb.reference class-ref="some.package.Foo"
> * foreignkey="someReferenceId"
> * database-foreignkey="false"
> * auto-retrieve="true"
> * auto-update="none"
> * auto-delete="none"
> */
> private T someReference;
> /**
> * @ojb.field
> */
> private Integer someReferenceId;
> }
> I skiped some elements, to make this example shorten.
> xdoclet craches when tries to find T class, which doesn't exist of course.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]