-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Java 21: Pattern Matching + StringTemplate JEP-430 + Unnamed JEP-445
- Loading branch information
Showing
54 changed files
with
2,698 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -56,4 +56,5 @@ generated/ | |
# Blueprint theme | ||
__init__.pyc | ||
|
||
node_modules/ | ||
node_modules/ | ||
target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ntir-java-format/src/test/resources/com/palantir/javaformat/java/testdata/B28788559.input
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import a.A;; | ||
import a.A; | ||
import b.B; | ||
|
||
class Test { | ||
|
1 change: 0 additions & 1 deletion
1
...tir-java-format/src/test/resources/com/palantir/javaformat/java/testdata/B28788559.output
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
import a.A; | ||
; | ||
import b.B; | ||
|
||
class Test { | ||
|
2 changes: 1 addition & 1 deletion
2
...ir-java-format/src/test/resources/com/palantir/javaformat/java/testdata/CL240367479.input
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package foo;; | ||
package foo; | ||
|
||
import com.google.second.Foo; | ||
import com.google.first.Bar; | ||
|
2 changes: 1 addition & 1 deletion
2
...r-java-format/src/test/resources/com/palantir/javaformat/java/testdata/CL240367479.output
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
package foo; | ||
; | ||
|
||
import com.google.second.Foo; | ||
import com.google.first.Bar; | ||
|
||
|
12 changes: 12 additions & 0 deletions
12
palantir-java-format/src/test/resources/com/palantir/javaformat/java/testdata/I960.input
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
public class I960 { | ||
|
||
record Result(String a){} | ||
|
||
public void thisIsNotFormattedCorrectly(Object something){ | ||
|
||
if(something instanceof Result(String somethingAsString) ){ | ||
return; | ||
} | ||
|
||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
palantir-java-format/src/test/resources/com/palantir/javaformat/java/testdata/I960.output
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
public class I960 { | ||
|
||
record Result(String a) {} | ||
|
||
public void thisIsNotFormattedCorrectly(Object something) { | ||
|
||
if (something instanceof Result(String somethingAsString)) { | ||
return; | ||
} | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
palantir-java-format/src/test/resources/com/palantir/javaformat/java/testdata/I961.input
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
public class I961 { | ||
|
||
|
||
public void thisIsNotFormattedCorrectly(Object something){ | ||
|
||
|
||
|
||
switch (something){ | ||
case Integer i when i > 10-> System.out.println(i.toString()); | ||
case Integer i -> System.out.println(i.toString()); | ||
case String s -> System.out.println(s); | ||
default -> System.out.println(something.toString()); | ||
} | ||
|
||
|
||
|
||
|
||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
palantir-java-format/src/test/resources/com/palantir/javaformat/java/testdata/I961.output
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
public class I961 { | ||
|
||
public void thisIsNotFormattedCorrectly(Object something) { | ||
|
||
switch (something) { | ||
case Integer i when i > 10 -> System.out.println(i.toString()); | ||
case Integer i -> System.out.println(i.toString()); | ||
case String s -> System.out.println(s); | ||
default -> System.out.println(something.toString()); | ||
} | ||
} | ||
} |
Oops, something went wrong.