Skip to content

Add UseVarForPrimitive#16

Open
Pankraz76 wants to merge 5 commits intomainfrom
UseVarForPrimitive
Open

Add UseVarForPrimitive#16
Pankraz76 wants to merge 5 commits intomainfrom
UseVarForPrimitive

Conversation

@Pankraz76
Copy link
Owner

@Pankraz76 Pankraz76 commented Dec 22, 2025

Add UseVarForPrimitive

related to:

Kindly asking if this is something to consider for junit?

Might want to apply var style like achieved in:

Also wishing you a wonderful Christmas 🎄

@vlsi @marcphilipp @mpkorstanje


I hereby agree to the terms of the JUnit Contributor License Agreement.


Definition of Done

Signed-off-by: Vincent Potucek <vpotucek@me.com>
@Pankraz76 Pankraz76 changed the title Use var for primitive Add UseVarForPrimitive Dec 22, 2025
Copy link
Owner Author

@Pankraz76 Pankraz76 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

initiative.

recipeList:
- org.openrewrite.java.migrate.lang.var.UseVarForGenericsConstructors
- org.openrewrite.java.migrate.lang.var.UseVarForPrimitive
- org.openrewrite.staticanalysis.NoDoubleBraceInitialization
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Pankraz76 Pankraz76 marked this pull request as ready for review December 22, 2025 12:34

AtomicReference<TestExecutionResult> result = new AtomicReference<>();
var result = new AtomicReference<TestExecutionResult>();
var listener = new TestExecutionListener() {
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

already having some var pattern. having this fully align, gives the code proper structure.

Vincent Potucek added 4 commits December 22, 2025 13:56
Signed-off-by: Vincent Potucek <vpotucek@me.com>
Signed-off-by: Vincent Potucek <vpotucek@me.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant