Skip to content

Commit

Permalink
Revert "insert space" setting for type parameters
Browse files Browse the repository at this point in the history
Change `insert_space_after_closing_angle_bracket_in_type_parameters`
back to `insert` to ensure generics are always formatted correctly.

This commit reverts commit b11499d as which we no longer need thanks
to eclipse-jdt/eclipse.jdt.core#443

Fixes gh-363
  • Loading branch information
philwebb committed Feb 22, 2023
1 parent 8e9ac6e commit 786df17
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package simple;

/**
* gh-363.
*/
public class UnresolvedGenericProperties<B extends Number, C> extends AbstractGenericProperties<String, B, C> {

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package simple;

/**
* gh-363.
*/
public class UnresolvedGenericProperties<B extends Number, C> extends AbstractGenericProperties<String, B, C> {

}
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
import java.util.Properties;

import io.spring.javaformat.config.IndentationStyle;
import io.spring.javaformat.config.JavaBaseline;
import io.spring.javaformat.config.JavaFormatConfig;

/**
Expand Down Expand Up @@ -68,9 +67,6 @@ private void applyConfig(Map<String, String> properties, JavaFormatConfig javaFo
if (javaFormatConfig.getIndentationStyle() == IndentationStyle.SPACES) {
properties.put(coreFormatter + "tabulation.char", "space");
}
if (javaFormatConfig.getJavaBaseline() == JavaBaseline.V8) {
properties.put(coreFormatter + "insert_space_after_closing_angle_bracket_in_type_parameters", "insert");
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ core.formatter.insert_space_after_at_in_annotation_type_declaration=do not inser
core.formatter.insert_space_after_binary_operator=insert
core.formatter.insert_space_after_bitwise_operator=insert
core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=do not insert
core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=do not insert
core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
core.formatter.insert_space_after_closing_brace_in_block=insert
core.formatter.insert_space_after_closing_paren_in_cast=insert
core.formatter.insert_space_after_colon_in_assert=insert
Expand Down

0 comments on commit 786df17

Please sign in to comment.