-
Notifications
You must be signed in to change notification settings - Fork 38.4k
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
apply UnusedLocalVariable
#34489
Draft
pankratz76
wants to merge
42
commits into
spring-projects:main
Choose a base branch
from
pankratz76:UnusedLocalVariable-apply_RemoveUnusedPrivateFields
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+55
−96
Draft
apply UnusedLocalVariable
#34489
Changes from 40 commits
Commits
Show all changes
42 commits
Select commit
Hold shift + click to select a range
9135e97
fix import
pinguin3245678 17bfeaa
fix dry AvoidStarImport
pinguin3245678 26660e0
add unused import to check CS
pinguin3245678 0e9bd82
break ci
pinguin3245678 5a4df03
wip
pinguin3245678 8b7fc53
wip
pinguin3245678 f3bb11e
doc
pinguin3245678 9a0245f
apply VariableDeclarationUsageDistance
pinguin3245678 71b56e7
wip
pinguin3245678 e42192a
RemoveUnusedPrivateFields
pinguin3245678 d0be958
RemoveUnusedPrivateMethods
pinguin3245678 67ee894
RemoveUnusedPrivateMethods
pinguin3245678 33af2ec
fix /ServiceLocatorFactoryBeanTests.java:130:17: Unused local variabl…
pinguin3245678 24c4d91
SpelCompilationCoverageTests.java:7148:25: Unused local variable 'out…
pinguin3245678 19bdae2
add assertion
pinguin3245678 413d322
unused
pinguin3245678 d23950e
UnusedLocalVariable
pinguin3245678 96d31fe
UnusedLocalVariable
pinguin3245678 2055377
form
pinguin3245678 d505077
dead code
pinguin3245678 f6ff1f6
form
pinguin3245678 b435f48
fix import
pinguin3245678 867fcc2
align format
pinguin3245678 bd11e5c
sort imoprt
pinguin3245678 199648f
fix sort
pinguin3245678 dbc528b
align .editorconfig
pinguin3245678 504b6c3
doc
pinguin3245678 a1e4d0a
check test
pinguin3245678 bf1da9a
inline
pinguin3245678 be7cc10
doc
pinguin3245678 e59c700
EmptyStatement
pinguin3245678 a9e09bf
apply EmptyStatement
pinguin3245678 ed592ce
VariableDeclarationUsageDistance
pinguin3245678 4e441b3
unused UnusedLocalMethod
pinguin3245678 8b5c797
undo
pinguin3245678 7842977
add UnusedLocalVariable"
pinguin3245678 423200b
ignore
pinguin3245678 71be520
ignore
pinguin3245678 c08f7c1
ignored as
pinguin3245678 4ddde8d
sort
pinguin3245678 bd7eb42
undo
pinguin3245678 520a35a
undo
pinguin3245678 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
root = true | ||
|
||
[*.{adoc,bat,groovy,html,java,js,jsp,kt,kts,md,properties,py,rb,sh,sql,svg,txt,xml,xsd}] | ||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
|
||
[*.{groovy,java,kt,kts,xml,xsd}] | ||
indent_style = tab | ||
indent_size = 4 | ||
continuation_indent_size = 8 | ||
end_of_line = lf |
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
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
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 |
---|---|---|
|
@@ -16,25 +16,19 @@ | |
|
||
package org.springframework.aot.test; | ||
|
||
import java.lang.reflect.Method; | ||
|
||
/** | ||
* @author Brian Clozel | ||
* @since 6.0 | ||
*/ | ||
public class SampleReflection { | ||
|
||
@SuppressWarnings("unused") | ||
public void sample() { | ||
String value = "Sample"; | ||
Method[] methods = String.class.getMethods(); | ||
String.class.getMethods(); | ||
} | ||
|
||
@SuppressWarnings("unused") | ||
public void multipleCalls() { | ||
String value = "Sample"; | ||
Method[] methods = String.class.getMethods(); | ||
methods = Integer.class.getMethods(); | ||
// String.class.getMethods(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Here, I'm wondering if the field is required for the test or if just the method call triggers the hint. I was not able to run it locally—it seems to be special because of the annotation. |
||
Integer.class.getMethods(); | ||
} | ||
|
||
} |
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
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
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
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just for clarification, is the intent to not make this the default?
I have never seen it otherwise, only globally, with the most common encoding being UTF-8.
This is new to me—my previous knowledge was that properties files were the only files not normally encoded in UTF-8, but now even they have switched.