I
Ivo
Hello to all,
In which circumstances a Class.forName() can fail, when the String
comes from the STE class ???
(I have been getting ClassNotFoundException, which should never happen
by my knowledge )
here is the code snippet:
final String className = stackTraceElement.getClassName();
Class clazz;
try {
clazz = Class.forName(className);
} catch (final ClassNotFoundException cnfe) {
// should be totally impossible since any Class having
methods locked in a stack
// frame cannot be removed from VM.
// throw new IllegalStateException(cnfe);
return null;
}
thank you very much,
Ivo
In which circumstances a Class.forName() can fail, when the String
comes from the STE class ???
(I have been getting ClassNotFoundException, which should never happen
by my knowledge )
here is the code snippet:
final String className = stackTraceElement.getClassName();
Class clazz;
try {
clazz = Class.forName(className);
} catch (final ClassNotFoundException cnfe) {
// should be totally impossible since any Class having
methods locked in a stack
// frame cannot be removed from VM.
// throw new IllegalStateException(cnfe);
return null;
}
thank you very much,
Ivo