You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by li...@apache.org on 2008/06/20 00:01:45 UTC

svn commit: r669718 - /geronimo/server/branches/2.1/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/configuration/LocalAttributeManager.java

Author: linsun
Date: Thu Jun 19 15:01:45 2008
New Revision: 669718

URL: http://svn.apache.org/viewvc?rev=669718&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/branches/2.1/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/configuration/LocalAttributeManager.java

Modified: geronimo/server/branches/2.1/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/configuration/LocalAttributeManager.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/configuration/LocalAttributeManager.java?rev=669718&r1=669717&r2=669718&view=diff
==============================================================================
--- geronimo/server/branches/2.1/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/configuration/LocalAttributeManager.java (original)
+++ geronimo/server/branches/2.1/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/configuration/LocalAttributeManager.java Thu Jun 19 15:01:45 2008
@@ -603,17 +603,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 " + e
-                        + " trying to open properties file " + configSubstitutionsFile.getAbsolutePath());
             }
         }
         return properties;