[geotk] Problem with org.geoapi
Brian Schlining
bschlining at gmail.com
Sat May 21 16:53:26 EDT 2011
I found the problem. There is a circular dependency between org.opengis.metadata.Obligation.java and org.opengis.annotation.Obligation.java. The classes that were causing the compiler to bomb were all using the @UML annotation with a parameter that reference fields in the Obligation object (which in turn references the Obligation annotation, which in turn references fields in the Obligation object). I commented out the use of the @UML annotation in both the Obligation source files and the project I posted compiled just fine. Here's the diffs:
Index: geoapi/src/main/java/org/opengis/metadata/Obligation.java
===================================================================
--- geoapi/src/main/java/org/opengis/metadata/Obligation.java (revision 1635)
+++ geoapi/src/main/java/org/opengis/metadata/Obligation.java (working copy)
@@ -46,7 +46,7 @@
* @version 3.0
* @since 2.0
*/
- at UML(identifier="MD_ObligationCode", specification=ISO_19115)
+//@UML(identifier="MD_ObligationCode", specification=ISO_19115)
public final class Obligation extends CodeList<Obligation> {
/**
* Serial number for compatibility with different versions.
@@ -62,19 +62,19 @@
/**
* Element is always required.
*/
- @UML(identifier="mandatory", obligation=org.opengis.annotation.Obligation.CONDITIONAL, specification=ISO_19115)
+ //@UML(identifier="mandatory", obligation=org.opengis.annotation.Obligation.CONDITIONAL, specification=ISO_19115)
public static final Obligation MANDATORY = new Obligation("MANDATORY");
/**
* Element is not required.
*/
- @UML(identifier="optional", obligation=org.opengis.annotation.Obligation.CONDITIONAL, specification=ISO_19115)
+ //@UML(identifier="optional", obligation=org.opengis.annotation.Obligation.CONDITIONAL, specification=ISO_19115)
public static final Obligation OPTIONAL = new Obligation("OPTIONAL");
/**
* Element is required when a specific condition is met.
*/
- @UML(identifier="conditional", obligation=org.opengis.annotation.Obligation.CONDITIONAL, specification=ISO_19115)
+ //@UML(identifier="conditional", obligation=org.opengis.annotation.Obligation.CONDITIONAL, specification=ISO_19115)
public static final Obligation CONDITIONAL = new Obligation("CONDITIONAL");
/**
Index: geoapi/src/main/java/org/opengis/annotation/Obligation.java
===================================================================
--- geoapi/src/main/java/org/opengis/annotation/Obligation.java (revision 1635)
+++ geoapi/src/main/java/org/opengis/annotation/Obligation.java (working copy)
@@ -43,24 +43,24 @@
* @version 3.0
* @since 2.0
*/
- at UML(identifier="MD_ObligationCode", specification=ISO_19115)
+//@UML(identifier="MD_ObligationCode", specification=ISO_19115)
public enum Obligation {
/**
* Element is required when a specific condition is met.
*/
- @UML(identifier="conditional", obligation=CONDITIONAL, specification=ISO_19115)
+ //@UML(identifier="conditional", obligation=CONDITIONAL, specification=ISO_19115)
CONDITIONAL,
/**
* Element is not required.
*/
- @UML(identifier="optional", obligation=CONDITIONAL, specification=ISO_19115)
+ //@UML(identifier="optional", obligation=CONDITIONAL, specification=ISO_19115)
OPTIONAL,
/**
* Element is always required.
*/
- @UML(identifier="mandatory", obligation=CONDITIONAL, specification=ISO_19115)
+ //@UML(identifier="mandatory", obligation=CONDITIONAL, specification=ISO_19115)
MANDATORY,
/**
--
Brian Schlining
On Friday, May 20, 2011 at 3:52 PM, Brian Schlining wrote:
>
> > > Are you doing any bytecode manipulation (via annotations) in 2.3-RC1 that you aren't doing in 2.3-M9?
> > > No, there is no bytecode manipulation. ... I don't remember any significant change between those versions...
> >
> > Given that this is plain ordinary code compiled with latest version of the most standard javac compiler, I wonder if it is a Scala bug...
>
> That's very possible. If you don't see anything I'll file a bug report with the Scala folks.
>
> Cheers.
> --
> ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
> Brian Schlining
> bschlining at gmail.com
>
More information about the Geotoolkit
mailing list