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 09b82f1..736a4fc 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;

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.