1
0

Fix SpotBugs [ERROR] Medium

Switch statement found in
org.apache.commons.logging.impl.SimpleLog.log(int, Object, Throwable)
where default case is missing
[org.apache.commons.logging.impl.SimpleLog] At SimpleLog.java:[lines
505-522] SF_SWITCH_NO_DEFAULT
This commit is contained in:
Gary Gregory
2023-11-26 14:17:02 -05:00
parent e8a558b708
commit a164386b2a
2 changed files with 7 additions and 0 deletions

View File

@@ -101,6 +101,9 @@ The <action> type attribute can be add,update,fix,remove.
<action type="fix" dev="ggregory" due-to="Piotr P. Karwasz"> <action type="fix" dev="ggregory" due-to="Piotr P. Karwasz">
Set java.logging as optional module #183. Set java.logging as optional module #183.
</action> </action>
<action type="fix" dev="ggregory" due-to="Gary Gregory">
Fix SpotBugs [ERROR] Medium: Switch statement found in org.apache.commons.logging.impl.SimpleLog.log(int, Object, Throwable) where default case is missing [org.apache.commons.logging.impl.SimpleLog] At SimpleLog.java:[lines 505-522] SF_SWITCH_NO_DEFAULT.
</action>
<!-- UPDATE --> <!-- UPDATE -->
<action dev="ggregory" type="update" due-to="Gary Gregory"> <action dev="ggregory" type="update" due-to="Gary Gregory">
Bump Java from 6 to 8. Bump Java from 6 to 8.

View File

@@ -521,6 +521,10 @@ public class SimpleLog implements Log, Serializable {
case SimpleLog.LOG_LEVEL_FATAL: case SimpleLog.LOG_LEVEL_FATAL:
buf.append("[FATAL] "); buf.append("[FATAL] ");
break; break;
default:
// Or throw?
buf.append("[UNDEFINED] ");
break;
} }
// Append the name of the log instance if so configured // Append the name of the log instance if so configured