Bug 6918: Edit ErrorSeverity and ErrorType from() method to accept lowercase strings 50/46750/2
authorAndrej Mak <andrej.mak@pantheon.tech>
Tue, 11 Oct 2016 07:38:03 +0000 (09:38 +0200)
committerAndrej Mak <andrej.mak@pantheon.tech>
Tue, 11 Oct 2016 08:08:21 +0000 (08:08 +0000)
Change-Id: Ifbf4e3447ccd65bf476df3477e63c95748d52493
Signed-off-by: Andrej Mak <andrej.mak@pantheon.tech>
opendaylight/config/config-util/src/main/java/org/opendaylight/controller/config/util/xml/DocumentedException.java

index 09b82f1a967eac7057497daa448ce69246d1a9a4..736a4fc035eff377863c2d60e7683194f2477ff8 100644 (file)
@@ -71,7 +71,7 @@ public class DocumentedException extends Exception {
 
         public static ErrorType from( String text ) {
             try {
-                return valueOf( text );
+                return valueOf( text.toUpperCase() );
             }
             catch( Exception e ) {
                 return APPLICATION;
@@ -131,7 +131,7 @@ public class DocumentedException extends Exception {
 
         public static ErrorSeverity from( String text ) {
             try {
-                return valueOf( text );
+                return valueOf( text.toUpperCase() );
             }
             catch( Exception e ) {
                 return ERROR;