4 Replies Latest reply on Dec 21, 2004 2:33 PM by ben.wang

    javassist handling of "unused" import package name



      We have discussed this issue before and last week I was at a customer site running into the same problem when using JBossAop. I thought it'd better to discuss it here.

      The problem is that when running aopc, for example, Javassist will try to examine every class on the import declaration. If it can't find the class somewhere, it throws an exception.


      1. The error message is not verbose enough. Or rather it is cluttered with too many stack traces.

      2. import of a package name not used in the code is actually permitted during javac.

      So what's the solution to this? I am thinking can JBossAop have an aopc flag or something to permit this scenario without throwing exception and stop? That way, when the library path for javac and aopc are different, they don't have to scratch their heads to resolve it.

      Of course, improve the error message can also go a long way. :-)