Skip to content

Commit 17e2739

Browse files
committed
fix bug and improve changelog
1 parent f93eabc commit 17e2739

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1010
### Added
1111

1212
### Changed
13-
- [#110](https://github.com/green-code-initiative/creedengo-java/pull/110) GCI82 - remove false positives with reasignement using this.var
14-
- [#110](https://github.com/green-code-initiative/creedengo-java/pull/110) GCI82 - remove false positives with passing a variable to a function it can be reassinged in
13+
- [#110](https://github.com/green-code-initiative/creedengo-java/pull/110) GCI82 - remove false positives with reassignment using this and with passing a variable to a function it can be reassigned in
1514
- compatibility updates for SonarQube 25.5.0
1615
- upgrade libraries versions
1716
- correction of technical problem with Integration tests (because of Maven format in technical answer to "sonar-orchestrator-junit5" library)

src/main/java/org/greencodeinitiative/creedengo/java/checks/MakeNonReassignedVariablesConstants.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ private static boolean parentIsNonFinalParameter(Tree tree) {
6363
if(tree.parent() == null)
6464
return false;
6565
Arguments arguments = (Arguments) tree.parent();
66-
if (parentIsKind(tree, Kind.METHOD_INVOCATION, Kind.NEW_CLASS)) {
66+
if (parentIsKind(arguments, Kind.METHOD_INVOCATION, Kind.NEW_CLASS)) {
6767
MethodTree methodTree = arguments.parent().is(Kind.METHOD_INVOCATION)
6868
? ((MethodInvocationTree) arguments.parent()).methodSymbol().declaration()
6969
: ((NewClassTree) arguments.parent()).methodSymbol().declaration();

0 commit comments

Comments
 (0)