BZ #187: Needs replacement implementation of VMClassLoader.getPackages()

Status fields:

creation_ts:2013-08-04 18:20
component:vm
version:1.6.1
rep_platform:All
op_sys:All
bug_status:RESOLVED
resolution:FIXED
reporter:stefan@complang.tuwien.ac.at
The reference implementation from GNU classpath just enumerates everything contained in
classpath's main zip file (using getBootPackages). This leads to Class.getPackage()
returning null for almost all custom classes, causing at jruby (1.5.6) startup:

Platform.java:39:in `getPackageName': java.lang.NullPointerException
        from ConstantSet.java:84:in `getEnumClass'
        from ConstantSet.java:60:in `getConstantSet'
        from ConstantResolver.java:181:in `getConstants'
        from ConstantResolver.java:102:in `getConstant'
        from ConstantResolver.java:146:in `intValue'
        from OpenFlags.java:28:in `value'
        from RubyFile.java:254:in `createFileClass'
        from Ruby.java:1273:in `initCore'
        from Ruby.java:1101:in `bootstrap'
        from Ruby.java:1079:in `init'
        from Ruby.java:179:in `newInstance'
        from Main.java:217:in `run'
        from Main.java:128:in `run'
        from Main.java:97:in `main'

Comment #1 by stefan@complang.tuwien.ac.at on 2013-08-04 18:22:48

Originally reported by Kumar Sukhani:
http://c1.complang.tuwien.ac.at/pipermail/cacao/2013-July/001549.html

Comment #2 by stefan@complang.tuwien.ac.at on 2013-08-17 15:29:38

I have preliminary patches which allow it to run.

Comment #3 by stefan@complang.tuwien.ac.at on 2013-10-07 21:07:30

http://mips.complang.tuwien.ac.at/hg/cacao/rev/28031107e370