mcconnell 2002/08/16 05:29:59
Modified: src/java/org/apache/avalon/cornerstone/blocks/masterstore
File_Persistent_Object_Repository.java
RepositoryManager.xprofile
src/java/org/apache/avalon/cornerstone/blocks/sockets
DefaultSocketManager.xtype
Log:
Corrected reference to Phoneix BlockContext
Revision Changes Path
1.5 +18 -3
jakarta-avalon-cornerstone/src/java/org/apache/avalon/cornerstone/blocks/masterstore/File_Persistent_Object_Repository.java
Index: File_Persistent_Object_Repository.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-cornerstone/src/java/org/apache/avalon/cornerstone/blocks/masterstore/File_Persistent_Object_Repository.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- File_Persistent_Object_Repository.java 16 Mar 2002 00:18:33 -0000 1.4
+++ File_Persistent_Object_Repository.java 16 Aug 2002 12:29:59 -0000 1.5
@@ -40,9 +40,15 @@
{
final InputStream inputStream = getInputStream( key );
+ if( inputStream == null )
+ throw new NullPointerException("Null input stream returned for
key: " + key );
try
{
final ObjectInputStream stream = new ObjectInputStream( inputStream
);
+
+ if( stream == null )
+ throw new NullPointerException("Null stream returned for key: " +
key );
+
final Object object = stream.readObject();
if( DEBUG )
{
@@ -55,9 +61,10 @@
inputStream.close();
}
}
- catch( final Exception e )
+ catch( final Throwable e )
{
- throw new RuntimeException( "Exception caught while retrieving an
object: " + e );
+ throw new RuntimeException(
+ "Exception caught while retrieving an object, cause: " + e.toString()
);
}
}
@@ -67,10 +74,18 @@
{
final InputStream inputStream = getInputStream( key );
+ if( inputStream == null )
+ throw new NullPointerException("Null input stream returned for
key: " + key );
+
try
{
final ObjectInputStream stream = new ClassLoaderObjectInputStream(
classLoader, inputStream );
+
+ if( stream == null )
+ throw new NullPointerException("Null stream returned for key: " +
key );
+
final Object object = stream.readObject();
+
if( DEBUG )
{
getLogger().debug( "returning object " + object + " for key " +
key );
@@ -82,7 +97,7 @@
inputStream.close();
}
}
- catch( final Exception e )
+ catch( final Throwable e )
{
throw new RuntimeException( "Exception caught while retrieving an
object: " + e );
}
1.2 +1 -1
jakarta-avalon-cornerstone/src/java/org/apache/avalon/cornerstone/blocks/masterstore/RepositoryManager.xprofile
Index: RepositoryManager.xprofile
===================================================================
RCS file:
/home/cvs/jakarta-avalon-cornerstone/src/java/org/apache/avalon/cornerstone/blocks/masterstore/RepositoryManager.xprofile,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- RepositoryManager.xprofile 16 Aug 2002 04:14:32 -0000 1.1
+++ RepositoryManager.xprofile 16 Aug 2002 12:29:59 -0000 1.2
@@ -15,7 +15,7 @@
<component name="store"
class="org.apache.avalon.cornerstone.blocks.masterstore.RepositoryManager">
- <context class="org.apache.excalibur.merlin.toolkit.GenericBlockContext">
+ <context class="org.apache.avalon.phoenix.tools.export.GenericBlockContext">
<import key="app.home" name="avalon:home"/>
<entry key="block.name" value="repository"/>
</context>
1.2 +1 -1
jakarta-avalon-cornerstone/src/java/org/apache/avalon/cornerstone/blocks/sockets/DefaultSocketManager.xtype
Index: DefaultSocketManager.xtype
===================================================================
RCS file:
/home/cvs/jakarta-avalon-cornerstone/src/java/org/apache/avalon/cornerstone/blocks/sockets/DefaultSocketManager.xtype,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- DefaultSocketManager.xtype 16 Aug 2002 04:14:32 -0000 1.1
+++ DefaultSocketManager.xtype 16 Aug 2002 12:29:59 -0000 1.2
@@ -12,7 +12,7 @@
</attributes>
</component>
- <context type="BlockContext">
+ <context type="org.apache.avalon.phoenix.BlockContext">
<entry key="block.name"/>
<entry key="app.home" type="java.io.File"/>
</context>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>