From 56ff29568fc76232c5372c5a489b38e5b32fcae3 Mon Sep 17 00:00:00 2001 From: Joakim Erdfelt Date: Fri, 30 Jan 2015 11:45:06 -0700 Subject: [PATCH] 458849 - org.eclipse.jetty.util.Uptime.DefaultImpl() not available on GAE --- .../main/java/org/eclipse/jetty/util/Uptime.java | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/jetty-util/src/main/java/org/eclipse/jetty/util/Uptime.java b/jetty-util/src/main/java/org/eclipse/jetty/util/Uptime.java index 4d01aec5444..7de1f4cf221 100644 --- a/jetty-util/src/main/java/org/eclipse/jetty/util/Uptime.java +++ b/jetty-util/src/main/java/org/eclipse/jetty/util/Uptime.java @@ -22,7 +22,7 @@ import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; /** - * Provide for a Uptime class that is compatible with Android and the new Java 8 compact1 and compact2 environments. + * Provide for a Uptime class that is compatible with Android, GAE, and the new Java 8 compact profiles */ public class Uptime { @@ -62,10 +62,15 @@ public class Uptime throw new UnsupportedOperationException("method getUptime() not found"); } } - catch (ClassNotFoundException | NoSuchMethodException | SecurityException | IllegalAccessException | IllegalArgumentException - | InvocationTargetException e) + catch (ClassNotFoundException | + NoClassDefFoundError | + NoSuchMethodException | + SecurityException | + IllegalAccessException | + IllegalArgumentException | + InvocationTargetException e) { - throw new UnsupportedOperationException("Implementation not available",e); + throw new UnsupportedOperationException("Implementation not available in this environment",e); } }