[ 
http://issues.apache.org/jira/browse/DERBY-983?page=comments#action_12366483 ] 

Daniel John Debrunner commented on DERBY-983:
---------------------------------------------

Shorthand methods can also decrease the size of the class, usually you are 
replacing a common expression
or sequence with a simpler one. So every time the method is used there is a 
less number of instructions,
this has to be balanced against the increased size of the class due to the 
method.  If the shorthand method
is shared across classes then the potential for space savings increase.

Also they can be providing an encapsulation purpose, ensuring logic is only 
written once,
so when it needs to change it's changed correctly in one place, rather than 
incorrectly by the coder missing one spot.

Take the issue in the embedded driver where

Util.notImplemented()

is possibly being replaced with

InternalDriver.getSQLExceptionFactory().notImplemented().

Apart from adding code here through an extra method call to each caller, the 
class has also gained a new constant pool entries
such as the class name for SQLExceptionFactory, the method name 
getSQLExceptionFactory,
the method descriptor for getSQLExceptionFactory. All leading to an increase in 
size.



> NetClient JDBC (40) using engine classes
> ----------------------------------------
>
>          Key: DERBY-983
>          URL: http://issues.apache.org/jira/browse/DERBY-983
>      Project: Derby
>         Type: Bug
>   Components: Network Client
>  Environment: all
>     Reporter: Anurag Shekhar
>     Assignee: Anurag Shekhar
>  Attachments: derby-983.diff
>
> network client has refrence of 
>  org.apache.derby.impl.jdbc.Util.notImplemented ()
> this will cause class not found exception as this class is not part of client 
> jar 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to