Skip to content

Instantly share code, notes, and snippets.

Created February 24, 2016 19:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/f19684aa2d1a740751b0 to your computer and use it in GitHub Desktop.
Save anonymous/f19684aa2d1a740751b0 to your computer and use it in GitHub Desktop.
TryCF Gist
<cfscript>
jInt = createObject("java", "java.lang.Integer");
jLong = createObject("java", "java.lang.Long");
writeDump({IntegerMaximum = jInt.MAX_VALUE, LongMaximum=jLong.MAX_VALUE});
// this works, because the result is still within the bounds of java.lang.Integer
writeDump({IntegerDivisionResult = (jInt.MAX_VALUE \ 1)});
// this fails, because the result exceeds the bounds of java.lang.Integer
try {
writeDump({LongResult= (jLong.MAX_VALUE \ 1)});
}
catch(any e) {
writeDump(e);
}
</cfscript>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment