Bug 91719 - Work with Oli B to pull in examples of generating all the LINT messages
Summary: Work with Oli B to pull in examples of generating all the LINT messages
Status: RESOLVED FIXED
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: DEVELOPMENT   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: 1.5.0   Edit
Assignee: Andrew Clement CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-04-18 05:21 EDT by Andrew Clement CLA
Modified: 2005-05-04 10:38 EDT (History)
0 users

See Also:


Attachments
tar file with requested sources (1.85 KB, application/octet-stream)
2005-04-21 16:48 EDT, Oliver CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Clement CLA 2005-04-18 05:21:33 EDT
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
Comment 1 Oliver CLA 2005-04-21 16:48:04 EDT
Created attachment 20206 [details]
tar file with requested sources

test sources to proof Xlint warnings
Comment 2 Andrew Clement CLA 2005-05-04 10:38:06 EDT
Integrated into CVS - thanks Oliver!