cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gma...@apache.org
Subject svn commit: r615451 - /incubator/cxf/trunk/api/src/main/java/org/apache/cxf/phase/PhaseInterceptorChain.java
Date Sat, 26 Jan 2008 13:55:52 GMT
Author: gmazza
Date: Sat Jan 26 05:55:50 2008
New Revision: 615451

URL: http://svn.apache.org/viewvc?rev=615451&view=rev
Log:
Made missing phase error message more explicit.

Modified:
    incubator/cxf/trunk/api/src/main/java/org/apache/cxf/phase/PhaseInterceptorChain.java

Modified: incubator/cxf/trunk/api/src/main/java/org/apache/cxf/phase/PhaseInterceptorChain.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/api/src/main/java/org/apache/cxf/phase/PhaseInterceptorChain.java?rev=615451&r1=615450&r2=615451&view=diff
==============================================================================
--- incubator/cxf/trunk/api/src/main/java/org/apache/cxf/phase/PhaseInterceptorChain.java
(original)
+++ incubator/cxf/trunk/api/src/main/java/org/apache/cxf/phase/PhaseInterceptorChain.java
Sat Jan 26 05:55:50 2008
@@ -160,20 +160,22 @@
     public void add(Interceptor i, boolean force) {
         PhaseInterceptor pi = (PhaseInterceptor)i;
 
-        if (LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Adding interceptor " + i + " to phase " + pi.getPhase());
-        }
-
-        String phaseName = pi.getPhase();
-        
+        String phaseName = pi.getPhase();        
         Integer phase = nameMap.get(phaseName);
+        
         if (phase == null) {
-            LOG.fine("Phase " + phaseName + " does not exist. Skipping handler "
-                      + i.getClass().getName());
+            LOG.fine("Skipping interceptor " + i.getClass().getName() 
+                + ((phaseName == null) ? ": Phase declaration is missing." 
+                : ": Phase " + phaseName + " specified does not exist."));
         } else {            
+            if (LOG.isLoggable(Level.FINE)) {
+                LOG.fine("Adding interceptor " + i + " to phase " + phaseName);
+            }
+
             insertInterceptor(phase, pi, force);
         }
     }
+
 
     public synchronized void pause() {
         state = State.PAUSED;



Mime
View raw message