Fix: Use Java 6 syntax in JUL examples
authorMichael Jeanson <mjeanson@efficios.com>
Mon, 15 Feb 2016 19:29:58 +0000 (14:29 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 15 Feb 2016 19:39:00 +0000 (14:39 -0500)
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
doc/examples/java-jul/ApplicationContextExample.java

index 3da3ac82e22c6574277b1937a9aa60bcb5d68a39..52cef3f216044fa9dbaf313002e7ee6a8b5b8f42 100644 (file)
@@ -67,12 +67,11 @@ public class ApplicationContextExample {
 
                @Override
                public Object retrieveContextInfo(String key) {
-                       switch (key) {
-                       case CONTEXT_NAME_SHORT:
+                       if (CONTEXT_NAME_SHORT.equals(key)) {
                                return (short) 42;
-                       case CONTEXT_NAME_STRING:
+                       } else if (CONTEXT_NAME_STRING.equals(key)) {
                                return "context-value!";
-                       default:
+                       } else {
                                return null;
                        }
                }
This page took 0.025454 seconds and 4 git commands to generate.