jep511: add the star-import clash demo, java.base export count and a java.time jshell check
TwoStarImports.java, the java.base export count in output/04, the extra LocalDate line in src/imports.jsh and regenerated transcripts. Additive commit. Co-Authored-By: Claude Sonnet 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01TF9JWFvJSNm6HVzswzZU5a
This commit is contained in:
+3
-2
@@ -23,7 +23,7 @@ both() { local fn="$1"; shift; "$fn" "$JDK25" "$@"; echo; "$fn" "$JDK27" "$@"; }
|
||||
{ both cr src/OldWay.java OldWay; echo; both cr src/NewWay.java NewWay; } > "$OUT/01-old-vs-new.txt"
|
||||
|
||||
# 02 - ambiguity: two modules export a class with the same simple name
|
||||
{ both co broken/AmbiguousDate.java; echo; both co broken/AmbiguousList.java; echo; both cr src/FixedDate.java FixedDate; } > "$OUT/02-ambiguity.txt"
|
||||
{ both co broken/AmbiguousDate.java; echo; both co broken/AmbiguousList.java; echo; both co broken/TwoStarImports.java; echo; both cr src/FixedDate.java FixedDate; } > "$OUT/02-ambiguity.txt"
|
||||
|
||||
# 03 - precedence: who wins when several imports offer the same simple name
|
||||
{ both cr src/StarImportWins.java StarImportWins; echo; both cr src/StarImportWinsSql.java StarImportWinsSql; echo
|
||||
@@ -31,7 +31,8 @@ both() { local fn="$1"; shift; "$fn" "$JDK25" "$@"; echo; "$fn" "$JDK27" "$@"; }
|
||||
both cr src/DuplicateImports.java DuplicateImports; } > "$OUT/03-precedence.txt"
|
||||
|
||||
# 04 - what one module import actually brings in
|
||||
{ echo "\$ java --describe-module java.sql ($(t "$JDK25"))"; "$JDK25/bin/java" --describe-module java.sql; echo
|
||||
{ echo "\$ java --describe-module java.base | grep -c '^exports' ($(t "$JDK25"))"; "$JDK25/bin/java" --describe-module java.base | grep -c '^exports'; echo
|
||||
echo "\$ java --describe-module java.sql ($(t "$JDK25"))"; "$JDK25/bin/java" --describe-module java.sql; echo
|
||||
echo "\$ java --describe-module java.se | grep -c 'requires' ($(t "$JDK25"))"; "$JDK25/bin/java" --describe-module java.se | grep -c requires; echo
|
||||
echo "\$ java --describe-module java.se | grep -c exports ($(t "$JDK25"))"; "$JDK25/bin/java" --describe-module java.se | grep -c exports; echo
|
||||
both cr src/Transitive.java Transitive; echo; both co broken/SqlDoesNotGiveBase.java; echo
|
||||
|
||||
Reference in New Issue
Block a user