From c57f877c88f64631d6fd63ec255e6ba88914bfe7 Mon Sep 17 00:00:00 2001 From: David DE CARVALHO Date: Thu, 25 Jan 2024 21:54:02 +0100 Subject: [PATCH] add new use case from ISSUE 9 of ecoCode-java repository --- ...MultipleIfElseStatementNoBlockNoIssue.java | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 src/main/java/fr/greencodeinitiative/java/checks/AvoidMultipleIfElseStatementNoBlockNoIssue.java diff --git a/src/main/java/fr/greencodeinitiative/java/checks/AvoidMultipleIfElseStatementNoBlockNoIssue.java b/src/main/java/fr/greencodeinitiative/java/checks/AvoidMultipleIfElseStatementNoBlockNoIssue.java new file mode 100644 index 0000000..b33c3a4 --- /dev/null +++ b/src/main/java/fr/greencodeinitiative/java/checks/AvoidMultipleIfElseStatementNoBlockNoIssue.java @@ -0,0 +1,27 @@ +/* + * ecoCode - Java language - Provides rules to reduce the environmental footprint of your Java programs + * Copyright © 2023 Green Code Initiative (https://www.ecocode.io) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package fr.greencodeinitiative.java.checks; + +class AvoidMultipleIfElseStatementNotBlock { + + public boolean equals(Object obj) { + if (this == obj) + return true; + } + +}