avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nic...@apache.org
Subject svn commit: rev 20234 - avalon/trunk/tools/magic/artifact/src/dist
Date Sun, 23 May 2004 05:48:38 GMT
Author: niclas
Date: Sat May 22 22:48:38 2004
New Revision: 20234

Modified:
   avalon/trunk/tools/magic/artifact/src/dist/build.bsh
Log:
Fixed a bug, not to freak if the definition file is not found.

Modified: avalon/trunk/tools/magic/artifact/src/dist/build.bsh
==============================================================================
--- avalon/trunk/tools/magic/artifact/src/dist/build.bsh	(original)
+++ avalon/trunk/tools/magic/artifact/src/dist/build.bsh	Sat May 22 22:48:38 2004
@@ -32,16 +32,20 @@
     {
         File definitionsDir = new File( m_Context.getProjectSystemDir(), "definitions" );
         File file = new File( definitionsDir, artifactId );
-        FileInputStream fis = new FileInputStream( file );
         Properties p = new Properties();
-        try
+        if( file.exists() )
         {
-            p.load( fis );
-        } finally
-        {
-            if( fis != null )
-                fis.close();
+            FileInputStream fis = new FileInputStream( file );
+            try
+            {
+                p.load( fis );
+            } finally
+            {
+                if( fis != null )
+                    fis.close();
+            }
         }
+        
         String repository = p.getProperty( "artifact.repository" );
         if( repository == null )
             repository = m_Context.getProperty( "artifact.repository" );

---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@avalon.apache.org
For additional commands, e-mail: cvs-help@avalon.apache.org


Mime
View raw message