From e01dcb2058ac827044e79bdd627497e3ada57f35 Mon Sep 17 00:00:00 2001 From: Michael Jeanson Date: Mon, 15 Feb 2016 14:29:58 -0500 Subject: [PATCH] Fix: Use Java 6 syntax in JUL examples Signed-off-by: Michael Jeanson Signed-off-by: Mathieu Desnoyers --- doc/examples/java-jul/ApplicationContextExample.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/doc/examples/java-jul/ApplicationContextExample.java b/doc/examples/java-jul/ApplicationContextExample.java index 3da3ac82..52cef3f2 100644 --- a/doc/examples/java-jul/ApplicationContextExample.java +++ b/doc/examples/java-jul/ApplicationContextExample.java @@ -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; } } -- 2.34.1