db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel John Debrunner (JIRA)" <derby-...@db.apache.org>
Subject [jira] Created: (DERBY-404) org.apache.derby.iapi.store.access.RowUtil.isRowEmpty has (never exercised) bug
Date Wed, 29 Jun 2005 19:06:57 GMT
org.apache.derby.iapi.store.access.RowUtil.isRowEmpty has (never exercised) bug
-------------------------------------------------------------------------------

         Key: DERBY-404
         URL: http://issues.apache.org/jira/browse/DERBY-404
     Project: Derby
        Type: Bug
  Components: Store  
    Reporter: Daniel John Debrunner
    Priority: Trivial


isRowEmpty() has a bug where if a colum list is passed in it will return true rather than
false for a non-empty row. However the method is never called with a non-null column list.

One fix would be to remove the parameter columnList, but that leaves a method that is reallt
just a check for the array reference being null  or of zero length [then the method could
be generalized to any array type].

An alternate fix would be change the api for the methods that call this utility to only accept
non-null references. Callers that previously passed in null would pass in the constant RowUtil.EMPTY_ROW.
This would remove the need to call isEmptyRow and remove the amount of branching. Sanity checks
could be added for passing in null, or will just implicity be there as the array will be referenced
and throw an NPE.

-- 
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


Mime
View raw message