Community
Participate
Working Groups
I'm testing the reflection and weaver tools APIs. When I using following code: PointcutParser parse = new PointcutParser(); String expr = "call(public * main.hello(..)"; PointcutExpression pex = parse.parsePointcutExpression(expr); Whenever I use a full qualified class name in pointcut expression, an exception is throwed out: java.lang.IllegalArgumentException: warning no match for this type name: obj [Xlint:invalidAbsoluteTypeName] I try to turn off this Lint exception. But it seems I must access to world field of PointcutParser. This is inconvenient because world field is not exposed by PointcutParser. The existing PointcutParser interface implicitly creates a World and does not allow any configuration including classpath or lint. But developers may need this kind of control.
look at for RC1.
See also Bug 116229.
I've extended the PointcutParser to support public void setLintProperties(Properties p) and public void setLintProperties(String lintPropertiesResourceFileOnClasspath) The following extract shows how to turn of the warning you are seeing: Properties props = new Properties(); props.add("invalidAbsoluteType","ignore"); parser.setLintProperties(props); Will close this bug report when fix available in a published build.
While this is a nice workaround it is a little cumbersome. Lint already loads XlintDefault.properties as a resource why not allow the user to define "META- INF/Xlint.properties" which would contain overrides. This would work well in both a batch and LTW environment.
For the second case, you can always do: parser.setLintProperties("META-INF/Xlint.properties"); A "magic location" would have to work in all modes, and we'd have to figure out it's interaction with the existing command-line options etc.. That's more work than I want to get into right now. If we get lots of user angst about having to add the above call we could consider defaulting post 1.5.0... Fix now available in published build.