on 9/12/01 12:26 AM, "Attila Szegedi" <[EMAIL PROTECTED]> wrote:
> public Object get(int index) {
> try {
> return elementData[index];
> }
> catch(ArrayIndexOutOfBoundsException e) {
> throw new IndexOutOfBoundsException(
> "Index: "+index+", Size: "+size);
> }
> }
>
> it would be much saner...
Exceptions are a heavy operation.
methods with try/catch in them cannot be optimized by hotspot.
Their implementation is correct with those things taken into consideration.
-jon
- Re: cvs commit:jakarta-velocity/src/java/org/apache/vel... Jon Stevens
- Re: cvs commit:jakarta-velocity/src/java/org/apach... Geir Magnusson Jr.
