Issue #33 new
The current classpath handling in JastAddJ has some problems:
PathPartand its subtypes are mutable
CompilationUnitinstances lack information about which
PathPartthey were loaded from
- The class loading process is not obvious
- Input streams are leaked
The current class loading process:
- Find first source file that can provide the class. This opens an input stream for the file and saves a reference in the corresponding PathPart instance.
- Find first bytecode file that provides the same class. This opens another input stream.
- Select one of the sources based on source file age and precedence.
- Parse from the selected source using the opened input stream. This may leak the input stream for the unused source since it is not closed (at least in the current implementation).