From: Michael Jeanson Date: Mon, 15 Feb 2016 19:29:58 +0000 (-0500) Subject: Fix: Use Java 6 syntax in JUL examples X-Git-Tag: v2.8.0-rc1~30 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=e01dcb2058ac827044e79bdd627497e3ada57f35;p=lttng-ust.git Fix: Use Java 6 syntax in JUL examples Signed-off-by: Michael Jeanson Signed-off-by: Mathieu Desnoyers --- 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; } }