Skip to content

Commit a168de0

Browse files
committed
add rule GCI94 - correction
1 parent 0a3ce07 commit a168de0

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

src/it/test-projects/creedengo-java-plugin-test-project/src/main/java/org/greencodeinitiative/creedengo/java/checks/UseOptionalOrElseGetVsOrElse.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import java.util.Optional;
2-
31
/*
42
* creedengo - Java language - Provides rules to reduce the environmental footprint of your Java programs
53
* Copyright © 2024 Green Code Initiative (https://green-code-initiative.org/)
@@ -17,6 +15,9 @@
1715
* You should have received a copy of the GNU General Public License
1816
* along with this program. If not, see <http://www.gnu.org/licenses/>.
1917
*/
18+
19+
import java.util.Optional;
20+
2021
class UseOptionalOrElseGetVsOrElse {
2122

2223
private static Optional<String> variable = Optional.empty();

src/test/files/UseOptionalOrElseGetVsOrElse.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import java.util.Optional;
2-
31
/*
42
* creedengo - Java language - Provides rules to reduce the environmental footprint of your Java programs
53
* Copyright © 2024 Green Code Initiative (https://green-code-initiative.org/)
@@ -17,6 +15,9 @@
1715
* You should have received a copy of the GNU General Public License
1816
* along with this program. If not, see <http://www.gnu.org/licenses/>.
1917
*/
18+
19+
import java.util.Optional;
20+
2021
class UseOptionalOrElseGetVsOrElse {
2122

2223
private static Optional<String> variable = Optional.empty();

0 commit comments

Comments
 (0)