Summary: | AJC1.2 ant task can not be prevented from complaining about unresolved imports (regardless of noimporterror="true|false" setting) | ||
---|---|---|---|
Product: | [Tools] AspectJ | Reporter: | Hristo Stoyanov <hr_stoyanov> |
Component: | Compiler | Assignee: | Adrian Colyer <adrian.colyer> |
Status: | RESOLVED DUPLICATE | QA Contact: | |
Severity: | blocker | ||
Priority: | P3 | ||
Version: | 1.2 | ||
Target Milestone: | 1.2.1 | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Whiteboard: |
Description
Hristo Stoyanov
2004-07-28 19:19:02 EDT
Hi Hristo, The messages you are getting out 'cant find type' are not quite the same as unresolved imports. I believe unresolved imports would make a difference if you were compiling from source and had some 'import XXX' statements where XXX couldn't be found. When binary weaving, 'cant find type' occurs when the weaver is looking for some types in order to do its job. See bug 44191 which has already been raised for the poor message 'cant find type' Anyway, an example. Suppose you specify a pointcut match something like: pointcut p(): call(* someMethod(..)) && this(Foo); where the only type you have passed to the weaver is a subtype of Foo. In order to do correct type analysis and determine if the pointcut matches, the weaver wants to have Foo accessible. It doesnt necessarily want to weave into it, it just wants it around whilst it examines the subclass. What you typically do in these situations is put Foo on the classpath when calling the aspectj compiler. Types on the classpath can be referenced by the weaver but are not candidates for weaving themselves. In your case, you should put entries on the classpath for the Ant call that you put on the classpath when you built me_org.geotools-2.0.jar and me_exceedsoft.aspects-1.0.jar. It looks like you need to put the jar containing org.opengis.pt.* on the classpath for the iajc call. If we didn't put out the message and silently continued you might find that you hadn't woven the places you expected because the weaver hadn't had all the type information around. I'm going to close this as a dup of bug 44191 which is the bug related to 'cant find type' messages - I hope to get to 44191 soon. It could be that some of the 'cant find type' messages that are currently being reported as errors may be relatively harmless (as bug 44191 says, there are about 60 routes into the 'cant find type' logic) - and so these may get downgraded to warnings or ignores. *** This bug has been marked as a duplicate of 44191 *** Fix released as part of AspectJ 1.2.1 |