db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From siddharth srivastava <akssps...@gmail.com>
Subject Code Coverage of impl.io
Date Sun, 08 Jul 2012 03:57:40 GMT

I have been looking into the package org.apache.derby.impl.io.
I looked that it provides various implementation of StorageFactory
class.based on classpath, jars etc.
What looked somewhat confusing to me is how do they get invoked in
Derby. Are they invoked implicitly ?

I looked at a certain methods, for example,
StorageFile newPersistentFile( String directoryName, String fileName)
in CPStorageFactory.

It seems that the condition if( directoryName == null ||
directoryName.length() == 0) is always true when it is invoked.
So while writing a test for such function I think it would be good to
exercise the false case as well.

Since the method with same definition is defined and used in so many
locations(extended from StorageFactory), how to determine which
implementation is the one defined in CPStorageFactory.

Siddharth Srivastava

View raw message