From 493be12df664c353a733f547007606da52cbd16c Mon Sep 17 00:00:00 2001
From: Andreas Romeyke <andreas.romeyke@slub-dresden.de>
Date: Thu, 20 Jul 2023 09:31:02 +0200
Subject: [PATCH] - added hints to avoid fallthrough warnings

---
 .../repository/plugin/ValidationResultHandle.java    | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/java/org/slub/rosetta/dps/repository/plugin/ValidationResultHandle.java b/java/org/slub/rosetta/dps/repository/plugin/ValidationResultHandle.java
index eba01a9..8d8a67e 100644
--- a/java/org/slub/rosetta/dps/repository/plugin/ValidationResultHandle.java
+++ b/java/org/slub/rosetta/dps/repository/plugin/ValidationResultHandle.java
@@ -41,12 +41,12 @@ public class ValidationResultHandle {
     }
     public void print( ValidationLevel level ) {
         for (String e: log) {
-            switch ( level) {
-                case debug: if ( e.startsWith("[DEBUG]")) { System.out.println( e); }
-                case info: if ( e.startsWith("[INFO]")) { System.out.println( e); }
-                case warn: if ( e.startsWith("[WARN]")) { System.out.println( e); }
-                case error: if ( e.startsWith("[ERROR]")) { System.out.println( e); }
-                case fatal: if ( e.startsWith("[FATAL]")) { System.out.println( e); }
+            switch ( level) { // fallthrough //NOPMD - suppressed ImplicitSwitchFallThrough - because acts as a filter
+                case debug: if ( e.startsWith("[DEBUG]")) { System.out.println( e); } // fallthrough
+                case info:  if ( e.startsWith("[INFO]" )) { System.out.println( e); } // fallthrough
+                case warn:  if ( e.startsWith("[WARN]" )) { System.out.println( e); } // fallthrough
+                case error: if ( e.startsWith("[ERROR]")) { System.out.println( e); } // fallthrough
+                case fatal: if ( e.startsWith("[FATAL]")) { System.out.println( e); } // fallthrough
             }
         }
     }
-- 
GitLab