Bug 121395 - invalid aspectj path throws filenotfoundexception
Summary: invalid aspectj path throws filenotfoundexception
Status: RESOLVED FIXED
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: DEVELOPMENT   Edit
Hardware: Macintosh Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: 1.5.1   Edit
Assignee: Andrew Clement CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-12-19 06:28 EST by Frank Stolle CLA
Modified: 2006-01-31 09:19 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Frank Stolle CLA 2005-12-19 06:28:40 EST
An invalid aspectj path (missing jar file) throws an filenotfoundexception:

java.io.FileNotFoundException
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:106)
at org.aspectj.weaver.bcel.BcelWeaver.addAspectsFromJarFile(BcelWeaver.java:202)
at org.aspectj.weaver.bcel.BcelWeaver.addLibraryJarFile(BcelWeaver.java:192)
at org.aspectj.ajdt.internal.core.builder.AjBuildManager.initBcelWorld(AjBuildManager.java:623)
at org.aspectj.ajdt.internal.core.builder.AjBuildManager.doBuild(AjBuildManager.java:209)
at org.aspectj.ajdt.internal.core.builder.AjBuildManager.doBuild(AjBuildManager.java:185)
at org.aspectj.ajdt.internal.core.builder.AjBuildManager.incrementalBuild(AjBuildManager.java:163)
at org.aspectj.ajde.internal.CompilerAdapter.compile(CompilerAdapter.java:117)
at org.aspectj.ajde.internal.AspectJBuildManager$CompilerThread.run(AspectJBuildManager.java:191)

FileNotFoundException thrown: /Users/frankstolle/Documents/workspace/lib_aspects/deploy/lib_aspects.jar (No such file or directory)



should generate an problem entry in the problems-list.
Comment 1 Sian January CLA 2005-12-20 06:29:21 EST
This seems to be ok on the command line - you get a message saying "Bad aspectpath ...".  In the AJDT environment we'd like the compiler to return a compile problem rather than throw an exception.
Comment 2 Andrew Clement CLA 2006-01-27 07:28:50 EST
command line verification is done in BuildArgParser.  AJDT takes a different route into the weaver. I've changed AjBuildManager to report a problem for entries on the aspectpath that don't exist.

I also upgraded the AJDT-like test harness we had to allow setting of an aspectpath for a project.

fix checked in, waiting on build.
Comment 3 Andrew Clement CLA 2006-01-31 09:19:40 EST
fix available.