Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-dev] Xlint / invalidWildcardTypeName

Hello,

I simplified the example and put now a Copyright header with the EPL on each file. I hope, it's ok now - or should I submit it as bug (but is only an example, not a bug report)?

Oliver



Wes Isberg wrote:
Thanks for doing this.

If you want to contribute test code to the AspectJ project, the best way is to submit it as a bug, since doing so puts it under the
proper open-source license.  Or you can put headers on all your
code for the Eclipse public license (EPL 1.0).

  http://www.eclipse.org/legal/epl-v10.html

Wes


------------Original Message------------
From: "Oli B." <boehm@xxxxxxxxxx>
To: aspectj-dev@xxxxxxxxxxx
Cc: CLEMAS@xxxxxxxxxx
Date: Fri, Mar-25-2005 6:06 AM
Subject: Re: [aspectj-dev] Xlint / invalidWildcardTypeName

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@xxxxxxxxxx>*
Sent by: aspectj-dev-admin@xxxxxxxxxxx

24/03/2005 09:07
Please respond to
aspectj-dev@xxxxxxxxxxx


	
To
	aspectj-dev@xxxxxxxxxxx
cc
	
Subject
	[aspectj-dev] Xlint / invalidWildcardTypeName


	





Hello,

I want to provide some examples for the meaning of the different

Xlint

properties but have myself problems to understand it. Also I found
nothing in the documentation and also google has no plan.

Could someone provide me an example for an "invalidWildcardTypeName"?

I

tried different things like 'call(Dummy* *.*.World.xxx*xxx(*))' but

with

no success.

Are there any testcases for this property (and also the other ones)
available? I'm interested in examples for
* invalidWildcardTypeName,
* unresolvableMember,
* typeNotExposedToWeaver,
* shadowNotInStructure,
* unmatchedSuperTypeInCall,
* noInterfaceCtorJoinpoint

regards
Oliver
--
Oliver Böhm
http://www.javatux.de

_______________________________________________
aspectj-dev mailing list
aspectj-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/aspectj-dev



--
Oliver Böhm
http://www.javatux.de

_______________________________________________
aspectj-dev mailing list
aspectj-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/aspectj-dev



_______________________________________________
aspectj-dev mailing list
aspectj-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/aspectj-dev



--
Oliver Böhm
http://www.javatux.de



Back to the top