Author: schof
Date: Sun Sep  3 18:36:15 2006
New Revision: 439896

URL: http://svn.apache.org/viewvc?view=rev&rev=439896
Log:
WARN message for missing configuration was not emanating from the correct spot. 
 No checking after all parsing, etc. is completed and Map is still size 0.

Modified:
    
shale/sandbox/shale-dialog2-legacy/src/main/java/org/apache/shale/dialog2/legacy/LegacyDialogManager.java

Modified: 
shale/sandbox/shale-dialog2-legacy/src/main/java/org/apache/shale/dialog2/legacy/LegacyDialogManager.java
URL: 
http://svn.apache.org/viewvc/shale/sandbox/shale-dialog2-legacy/src/main/java/org/apache/shale/dialog2/legacy/LegacyDialogManager.java?view=diff&rev=439896&r1=439895&r2=439896
==============================================================================
--- 
shale/sandbox/shale-dialog2-legacy/src/main/java/org/apache/shale/dialog2/legacy/LegacyDialogManager.java
 (original)
+++ 
shale/sandbox/shale-dialog2-legacy/src/main/java/org/apache/shale/dialog2/legacy/LegacyDialogManager.java
 Sun Sep  3 18:36:15 2006
@@ -199,11 +199,6 @@
                     resources = resources.substring(comma + 1);
                 }
                 if (path.length() < 1) {
-                    if (log().isWarnEnabled()) {
-                        log.warn("No dialog configuration information present. 
 No default configuration found at: " +
-                                DEFAULT_CONFIGURATION_RESOURCE + ".  No 
embedded configuration found at: " +
-                                EMBEDDED_CONFIGURATION_RESOURCE);
-                    }
                     break;
                 }
                 URL resource = (URL) 
context.getExternalContext().getResource(path);
@@ -246,6 +241,15 @@
 
         // Cache the results both locally and in application scope
         this.dialogs = parser.getDialogs();
+
+        if (this.dialogs.size() == 0) {
+            if (log().isWarnEnabled()) {
+                log.warn("No dialog configuration information present.  No 
default configuration found at: " +
+                        DEFAULT_CONFIGURATION_RESOURCE + ".  No embedded 
configuration found at: " +
+                        EMBEDDED_CONFIGURATION_RESOURCE);
+            }
+        }
+        
         context.getExternalContext().getApplicationMap().put(Globals.DIALOGS, 
this.dialogs);
         return this.dialogs;
 


Reply via email to