Skip to content

Commit

Permalink
Enable UseDiamondOperator (#10963)
Browse files Browse the repository at this point in the history
  • Loading branch information
koppor authored Mar 3, 2024
1 parent 54813e5 commit 50249c7
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 7 deletions.
3 changes: 1 addition & 2 deletions rewrite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,6 @@ recipeList:
# - org.openrewrite.staticanalysis.UseAsBuilder
# "Upgrades" too much, deletes fields
# - org.openrewrite.staticanalysis.UseCollectionInterfaces
# Does not work at TreeNode
# - org.openrewrite.staticanalysis.UseDiamondOperator
# States that it gains performance, but the code is more unreable
# - org.openrewrite.staticanalysis.UseForEachRemoveInsteadOfSetRemoveAll
# We voted against it
Expand Down Expand Up @@ -189,6 +187,7 @@ recipeList:
- org.openrewrite.staticanalysis.TypecastParenPad
- org.openrewrite.staticanalysis.UnwrapRepeatableAnnotations
- org.openrewrite.staticanalysis.UpperCaseLiteralSuffixes
- org.openrewrite.staticanalysis.UseDiamondOperator
# - org.openrewrite.staticanalysis.UseJavaStyleArrayDeclarations
- org.openrewrite.staticanalysis.UseLambdaForFunctionalInterface
# - org.openrewrite.staticanalysis.UseListSort
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public MapBasedEditorViewModel(Field field, SuggestionProvider<?> suggestionProv

@Override
public StringConverter<T> getStringConverter() {
return new StringConverter<T>() {
return new StringConverter<>() {
@Override
public String toString(T object) {
if (object == null) {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/jabref/gui/util/DefaultTaskExecutor.java
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ public DelayTaskThrottler createThrottler(int delay) {
}

private <V> Task<V> getJavaFXTask(BackgroundTask<V> task) {
Task<V> javaTask = new Task<V>() {
Task<V> javaTask = new Task<>() {
{
this.updateMessage(task.messageProperty().get());
this.updateTitle(task.titleProperty().get());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public ViewModelTreeTableCellFactory<S> withOnMouseClickedEvent(

@Override
public TreeTableCell<S, S> call(TreeTableColumn<S, S> param) {
return new TreeTableCell<S, S>() {
return new TreeTableCell<>() {
@Override
protected void updateItem(S viewModel, boolean empty) {
super.updateItem(viewModel, empty);
Expand Down
4 changes: 2 additions & 2 deletions src/test/java/org/jabref/model/paging/PageTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ public class PageTest {
public void setup() {
testContent.addAll(Arrays.asList(testStrings));
testContent = Collections.unmodifiableCollection(testContent);
page1 = new Page<String>(testQuery, testPageNumber, testContent);
page2 = new Page<String>(testQuery, testPageNumber);
page1 = new Page<>(testQuery, testPageNumber, testContent);
page2 = new Page<>(testQuery, testPageNumber);
}

@Test
Expand Down

0 comments on commit 50249c7

Please sign in to comment.