String flashPath = (String)request.getAttribute("flashPath");
String flashPathPath = flashPath.toString();
Sathya improved on it by adding checks
String flashPath = (String)request.getAttribute("flashPath");
If (flashPath instance of java.lang.String){
String flashPathPath = flashPath.toString();
}
So let's work on this some more
String flashPath = (String)request.getAttribute("flashPath");
If (flashPath instance of java.lang.String){
try{
String flashPathPath = (String) flashPath.toString(); //Let's cast it once more to be sure, if it escaped the first time, it'll surely get caught here.
}
catch (ClassCastException e)
{
// Don’t cast it
String flashPathPath = flashPath.toString();
}
}
Now this is open to all to further obfuscate.
How complicated can you make one line of code?
No comments:
Post a Comment