hg: penrose/jigsaw/jdk: Expanded the JSON-based module descriptor support. It should now support

david.bosschaert at gmail.com david.bosschaert at gmail.com
Tue May 15 03:00:40 PDT 2012


Changeset: 8ddc73840820
Author:    davidb
Date:      2012-05-15 10:57 +0100
URL:       http://hg.openjdk.java.net/penrose/jigsaw/jdk/rev/8ddc73840820

Expanded the JSON-based module descriptor support. It should now support
all of the features that module-info.java supports.

Also added encoding detection to the JSON parser code. According to
http://www.ietf.org/rfc/rfc4627.txt section 3 a JSON file should
always be in unicode. The JSON parser can now deal with UTF-8, UTF-16
and UTF-32 (there are test files included to test this functionality
too).

Added, more tests, including a test that shows how a
module-info.json file can be expanded with custom metadata, very much
like what it could look for OSGi.

! src/share/classes/java/lang/module/JSONModuleInfoReader.java
! src/share/classes/java/lang/module/JSONParser.java
! test/java/lang/module/_JSONParser.java
+ test/java/lang/module/_ModuleInfoReader2.java
+ test/java/lang/module/module-info-reader2.sh
+ test/java/lang/module/module-info.json.utf16
+ test/java/lang/module/module-info.json.utf16bom
+ test/java/lang/module/module-info.json.utf32
+ test/java/lang/module/module-info.json.utf8
+ test/org/openjdk/jigsaw/hello-json-custom.sh
! test/org/openjdk/jigsaw/tester.sh



More information about the penrose-dev mailing list