Skip to content

Commit

Permalink
add rule GCI94 - correction
Browse files Browse the repository at this point in the history
  • Loading branch information
dedece35 committed Jan 2, 2025
1 parent 0a3ce07 commit a168de0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import java.util.Optional;

/*
* creedengo - Java language - Provides rules to reduce the environmental footprint of your Java programs
* Copyright © 2024 Green Code Initiative (https://green-code-initiative.org/)
Expand All @@ -17,6 +15,9 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

import java.util.Optional;

class UseOptionalOrElseGetVsOrElse {

private static Optional<String> variable = Optional.empty();
Expand Down
5 changes: 3 additions & 2 deletions src/test/files/UseOptionalOrElseGetVsOrElse.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import java.util.Optional;

/*
* creedengo - Java language - Provides rules to reduce the environmental footprint of your Java programs
* Copyright © 2024 Green Code Initiative (https://green-code-initiative.org/)
Expand All @@ -17,6 +15,9 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

import java.util.Optional;

class UseOptionalOrElseGetVsOrElse {

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

0 comments on commit a168de0

Please sign in to comment.