Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenRewrite: Enable UseDiamondOperator #10963

Merged
merged 1 commit into from
Mar 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading