-
Notifications
You must be signed in to change notification settings - Fork 111
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change "insert space" setting for type parameters based on Java version
Change `insert_space_after_closing_angle_bracket_in_type_parameters` setting when Java 8 is used so that a space is inserted after the parameter type. Later versions of the Eclipse formatter can use `do not insert` and they will correctly format classes. Earlier versions need to use `insert` otherwise the space disappears. This commit effectively reverts commit b11499d for Java 8 only. This shouldn't be a problem since records were introduced in Java 14. Fixes gh-363
- Loading branch information
Showing
6 changed files
with
47 additions
and
6 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
8 changes: 8 additions & 0 deletions
8
spring-javaformat/spring-javaformat-formatter-tests/src/test/resources/expected/generics.txt
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,8 @@ | ||
package simple; | ||
|
||
/** | ||
* gh-363. | ||
*/ | ||
class SpectatorToDoubleGauge<T> extends AbstractMeter<T> implements Gauge { | ||
|
||
} |
File renamed without changes.
11 changes: 11 additions & 0 deletions
11
.../spring-javaformat-formatter-tests/src/test/resources/expected/v8/record-with-generic.txt
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 @@ | ||
package simple; | ||
|
||
/** | ||
* Record with generic. | ||
* | ||
* @author Andy Wilkinson | ||
* @since 1.0.0 | ||
*/ | ||
public record SomeRecord<T> (T item) { | ||
|
||
} |
8 changes: 8 additions & 0 deletions
8
spring-javaformat/spring-javaformat-formatter-tests/src/test/resources/source/generics.txt
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,8 @@ | ||
package simple; | ||
|
||
/** | ||
* gh-363. | ||
*/ | ||
class SpectatorToDoubleGauge<T> extends AbstractMeter<T> implements Gauge { | ||
|
||
} |
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