Skip to content

Commit

Permalink
Merge pull request #23 from JaroslavTulach/dbalek/jdk23
Browse files Browse the repository at this point in the history
Upgrading to jdk-23+26.
  • Loading branch information
jtulach authored Jun 13, 2024
2 parents d477afe + 9120aac commit 9855eeb
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 4 deletions.
1 change: 0 additions & 1 deletion build-jdk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ mkdir -p build/test/out/jdk.compiler/com/sun/tools/javac
cp -r make/langtools/netbeans/nb-javac/build/classes/com/sun/tools/javac build/test/out/jdk.compiler/com/sun/tools/
mkdir -p build/test/out/jdk.compiler/com/sun/tools/doclint
cp -r make/langtools/netbeans/nb-javac/build/classes/com/sun/tools/doclint build/test/out/jdk.compiler/com/sun/tools/
cp -r make/langtools/netbeans/nb-javac/build/classes/jdk build/test/out/jdk.compiler/

rm -rf build/test/expanded/jdk.compiler
mkdir -p build/test/expanded/jdk.compiler
Expand Down
5 changes: 2 additions & 3 deletions make/langtools/netbeans/nb-javac/nbproject/project.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
jdk.git.url=https://github.com/openjdk/jdk22u
jdk.git.commit=jdk-22.0.1+8
jdk.git.url=https://github.com/openjdk/jdk
jdk.git.commit=jdk-23+26
nb-javac-ver=${jdk.git.commit}
#nb-javac-ver=jdk-21u

debug.modulepath=\
${run.modulepath}
Expand Down
19 changes: 19 additions & 0 deletions make/langtools/netbeans/nb-javac/src/META-INF/upgrade/nbjavac.hint
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,11 @@ java.util.ServiceLoader :: inClass("com.sun.tools.doclint.DocLint")
nbjavac.ServiceLoaderWrapper
;;

java.util.ServiceLoader :: inClass("com.sun.tools.javac.api.JavacTrees")
=>
nbjavac.ServiceLoaderWrapper
;;

$1.stripTrailing() :: $1 instanceof java.lang.String
=>
$1.replaceAll("\\p{javaWhitespace}+$", "")
Expand Down Expand Up @@ -370,6 +375,10 @@ $coll.toArray($expr) :: inClass("com.sun.tools.javac.comp.Flow") && containsAny(
$coll.toArray(new com.sun.tools.javac.code.Type[0])
;;

$coll.toArray($expr) :: inClass("com.sun.tools.javac.util.Log") && containsAny($expr, "new com.sun.tools.javac.util.JCDiagnostic[$s]")
=>
$coll.toArray(new com.sun.tools.javac.util.JCDiagnostic[0])
;;

Iterable<String> $it;
try {
Expand All @@ -393,3 +402,13 @@ sun.reflect.annotation
=>
java.lang.Object
;;

$stream.flatMap(java.util.Optional::stream) :: $stream instanceof java.util.stream.Stream
=>
$stream.flatMap(opt$$ -> opt$$.isPresent() ? Stream.of(opt$$.get()) : Stream.empty())
;;

$list.getLast() :: $list instanceof java.util.List
=>
$list.get($list.size() - 1)
;;

0 comments on commit 9855eeb

Please sign in to comment.