public int nextAsInt() throws NumberFormatException { long asLongValue = nextAsLong(); if (asLongValue < Integer.MIN_VALUE) { throw new NumberFormatException(String.format("Token '%d' cannot be interpreted as an integer as its value is less than %d.", asLongValue, Integer.MIN_VALUE)); } else if (asLongValue > Integer.MAX_VALUE) { throw new NumberFormatException(String.format("Token '%d' cannot be interpreted as an integer as its value is greater than %d.", asLongValue, Integer.MAX_VALUE)); } return (int) asLongValue; } public long nextAsLong() throws NumberFormatException {
public int nextAsInt() throws NumberFormatException { long asLongValue = nextAsLong(); if (asLongValue < Integer.MIN_VALUE) { throw new NumberFormatException(String.format("Token '%d' cannot be interpreted as an integer as its value is less than %d.", asLongValue, Integer.MIN_VALUE)); } else if (asLongValue > Integer.MAX_VALUE) { throw new NumberFormatException(String.format("Token '%d' cannot be interpreted as an integer as its value is greater than %d.", asLongValue, Integer.MAX_VALUE)); } return (int) asLongValue; } public long nextAsLong() throws NumberFormatException {
public boolean doDispatch(RequestImpl req, ResponseImpl rsp, Object node) throws IOException, ServletException, IllegalAccessException, InvocationTargetException { if(isAccepted){ long idx = req.tokens.nextAsLong(); Dispatcher.anonymizedTraceEval(req, rsp, node, "%s#%s(long)", ff.getName()); if(traceable()) traceEval(req,rsp,node,ff.getName()+"("+idx+")"); req.getStapler().invoke(req,rsp, ff.invoke(req, rsp, node,idx)); return true; }else{ long idx = req.tokens.nextAsLong(); try{ return webApp.getFilteredGetterTriggerListener().onGetterTrigger(f, req, rsp, node, ff.getName()+"("+idx+")"); } finally{ req.tokens.prev(); } } } public String toString() {
public boolean doDispatch(RequestImpl req, ResponseImpl rsp, Object node) throws IOException, ServletException, IllegalAccessException, InvocationTargetException { long idx = req.tokens.nextAsLong(); Dispatcher.anonymizedTraceEval(req, rsp, node, "%s#%s(long)", ff.getName()); if(traceable()) traceEval(req,rsp,node,ff.getName()+"("+idx+")"); req.getStapler().invoke(req,rsp, ff.invoke(req, rsp, node,idx)); return true; } public String toString() {