458849 - org.eclipse.jetty.util.Uptime.DefaultImpl() not available on GAE

This commit is contained in:
Joakim Erdfelt 2015-01-30 11:45:06 -07:00
parent 4c751e10e1
commit 56ff29568f
1 changed files with 9 additions and 4 deletions

View File

@ -22,7 +22,7 @@ import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method; 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 public class Uptime
{ {
@ -62,10 +62,15 @@ public class Uptime
throw new UnsupportedOperationException("method getUptime() not found"); throw new UnsupportedOperationException("method getUptime() not found");
} }
} }
catch (ClassNotFoundException | NoSuchMethodException | SecurityException | IllegalAccessException | IllegalArgumentException catch (ClassNotFoundException |
| InvocationTargetException e) NoClassDefFoundError |
NoSuchMethodException |
SecurityException |
IllegalAccessException |
IllegalArgumentException |
InvocationTargetException e)
{ {
throw new UnsupportedOperationException("Implementation not available",e); throw new UnsupportedOperationException("Implementation not available in this environment",e);
} }
} }