Re: ?? Will MIDletStateChangeException affects Midlet's performance ??

[email protected] Wed, 6 Aug 2008 09:20:50 PDT
Newsgroups gmane.comp.java.sun.kvm
Message-ID <15339618.125981218039681123.JavaMail.tomcat@sdcst12.sjc.collab.net>
Putting an exception thrown notation on a method does not do anything to hinder the performance.
Additionally the try/catch block that has to encompass the method or constructor takes no extra processing, UNLESS  the exception is thrown.  

The exception notation and subsequent try/catch do require more resources for the exception catching, exception definitions, and wrapping code.   However this can be offset by the removal of things like if( arrayX != null && arrayX.length > 0)   and just have a nullpointer exception and an arrayoutofbounds exception being caught.   This makes since when the case for arrayX being null or having no elements is >1% of the time.  

-Shawn
[Message sent by forum member 'sfitzjava' (sfitzjava)]

http://forums.java.net/jive/thread.jspa?messageID=291926

===========================================================================
To unsubscribe, send email to [email protected] and include in the body
of the message "signoff KVM-INTEREST".  For general help, send email to
[email protected] and include in the body of the message "help".