Community
Participate
Working Groups
Oli on the dev list has written code examples that generate each type of lint warning, work with him to pull them into the codebase. The relevant email is below. Make sure they go via a bugzilla attachment to ensure EPL rules are met. ==== Hi Andrew, for "unresolvableMember" I gave up to find an example. But for the other Xlint warnings you can find my example under http://www.javatux.de/aj/ as compress tarfile (xlint.tgz) or as directory (for online browsing). BTW - I read the announcement from Adrian. There are new Xlint warnings? Which ones? Happy Eastern Oliver Andrew Clement wrote: > > Hi Oli, > > If you can come up with examples that produce all of them, I'd be keen to > include them as testcases in AspectJ where appropriate as I know we don't > properly test some of them. A good place to start would be searching > in the bugzilla database - I'm not sure how accurately that is indexed > by google. Here's a bit of info I've quickly dug up: > > > * invalidWildcardTypeName > Never signalled anywhere in the codebase! (so ignore this one...) > > > * unresolvableMember, > This one is hard to reproduce, see bug 59596 where I've done a bit > of write up about it. > > > * typeNotExposedToWeaver > Should be recreatable by trying to weave into something that is > actually on the classpath rather than the inpath. > > > * shadowNotInStructure > Signalled if the structure model is broken, probably can't happen > right now as we work hard to ensure it is always correct. > > > * unmatchedSuperTypeInCall > These two covariance problems demonstrate this xlint. it is related > to specifying the declaring type in a call() type pattern and it > not matching as you expected... > > CovBaseProgram01.java >>>>> > > class Car {} > > class FastCar extends Car {} > > class Super { > Car getCar() { > return new Car(); > } > } > > class Sub extends Super { > FastCar getCar() { > return new FastCar(); > } > } > > public class CovBaseProgram01 { > public static void main(String[] argv) { > new CovBaseProgram01().run(); > } > > public void run() { > Super instance_super = new Super(); > Sub instance_sub = new Sub(); > > Car c1 = instance_super.getCar(); > Car c2 = instance_sub.getCar(); > } > } > > // FastCar is a subclass of Car. > // Sub is a subclass of Super. > ============== > CovAspect06.aj >>> > > aspect CovAspect06 { > > pointcut p(): call(Car Sub.getCar()); > > @org.aspectj.lang.annotation.SuppressAjWarnings > before(): p() { > System.out.println("[call(Car Sub.getCar()) matched on > '"+thisJoinPoint+":"+thisJoinPoint.getSourceLocation()+"']"); > } > > } > ================ > ajc -1.5 CovAspect06.aj CovBaseProgram01.ja > > > * noInterfaceCtorJoinpoint > related to trying to put advice on constructor execution join point for > an interface I think... > > > hope some of that is useful... > > Andy. > > > > *"Oli B." <boehm@javatux.de>* > Sent by: aspectj-dev-admin@eclipse.org
Created attachment 20206 [details] tar file with requested sources test sources to proof Xlint warnings
Integrated into CVS - thanks Oliver!