geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lin...@apache.org
Subject svn commit: r669722 - /geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/configuration/LocalAttributeManager.java
Date Thu, 19 Jun 2008 22:03:17 GMT
Author: linsun
Date: Thu Jun 19 15:03:17 2008
New Revision: 669722

URL: http://svn.apache.org/viewvc?rev=669722&view=rev
Log:
log warning instead of error when file doesn't exist, before David comes up a better solution
: GERONIMO-3971 - Error message during assembling a server 

Modified:
    geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/configuration/LocalAttributeManager.java

Modified: geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/configuration/LocalAttributeManager.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/configuration/LocalAttributeManager.java?rev=669722&r1=669721&r2=669722&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/configuration/LocalAttributeManager.java
(original)
+++ geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/configuration/LocalAttributeManager.java
Thu Jun 19 15:03:17 2008
@@ -615,16 +615,22 @@
 
     private static Properties loadConfigSubstitutions(File configSubstitutionsFile) {
         Properties properties = new Properties();
-        if (configSubstitutionsFile != null && configSubstitutionsFile.exists())
{
-            try {
-                FileInputStream in = new FileInputStream(configSubstitutionsFile);
+        if (configSubstitutionsFile != null) {
+            if (!configSubstitutionsFile.exists()) {
+                log.warn("Could not find the config substitution file: "
+                        + configSubstitutionsFile.getAbsolutePath());
+            } else {
                 try {
-                    properties.load(in);
-                } finally {
-                    in.close();
+                    FileInputStream in = new FileInputStream(configSubstitutionsFile);
+                    try {
+                        properties.load(in);
+                    } finally {
+                        in.close();
+                    }
+                } catch (Exception e) {
+                    log.error("Caught exception " + e
+                            + " trying to open properties file " + configSubstitutionsFile.getAbsolutePath());
                 }
-            } catch (Exception e) {
-                log.error("Caught exception {} trying to open properties file {}", e, configSubstitutionsFile.getAbsolutePath());
             }
         }
         return properties;



Mime
View raw message