Today, while trying to figure out a performance issue related to Classloader synchronization in Weblogic I noticed that IndexOutOfBoundsException is frequently thrown by the business layer of the application.
The code clearly speaks for itself:
public Object getObject1() {
try{
return (Object ) getObjectList(). get(0);
}
catch( IndexOutOfBoundsException e){
return null;
}
}
public Object getObject2() {
try{
return (Object )getObjectList(). get(1);
}
catch( IndexOutOfBoundsException e){
return null;
}
}
* Method and class names where altered
No comments:
Post a Comment