You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by as...@apache.org on 2012/10/16 23:55:05 UTC

svn commit: r1399007 - /cxf/trunk/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/PolicyAnnotationListener.java

Author: asoldano
Date: Tue Oct 16 21:55:05 2012
New Revision: 1399007

URL: http://svn.apache.org/viewvc?rev=1399007&view=rev
Log:
[CXF-4576] Output a warn log when failing parsing policy attachments

Modified:
    cxf/trunk/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/PolicyAnnotationListener.java

Modified: cxf/trunk/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/PolicyAnnotationListener.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/PolicyAnnotationListener.java?rev=1399007&r1=1399006&r2=1399007&view=diff
==============================================================================
--- cxf/trunk/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/PolicyAnnotationListener.java (original)
+++ cxf/trunk/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/PolicyAnnotationListener.java Tue Oct 16 21:55:05 2012
@@ -25,6 +25,8 @@ import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
 import java.util.ListIterator;
+import java.util.logging.Level;
+import java.util.logging.Logger;
 
 import javax.wsdl.extensions.UnknownExtensibilityElement;
 import javax.xml.stream.XMLStreamException;
@@ -39,6 +41,7 @@ import org.xml.sax.InputSource;
 import org.apache.cxf.Bus;
 import org.apache.cxf.annotations.Policies;
 import org.apache.cxf.annotations.Policy;
+import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.common.util.StringUtils;
 import org.apache.cxf.configuration.ConfiguredBeanLocator;
 import org.apache.cxf.endpoint.Endpoint;
@@ -64,6 +67,7 @@ import org.apache.neethi.Constants;
  * 
  */
 public class PolicyAnnotationListener implements FactoryBeanListener {
+    private static final Logger LOG = LogUtils.getL7dLogger(PolicyAnnotationListener.class);
     private static final String EXTRA_POLICIES = PolicyAnnotationListener.class.getName() + ".EXTRA_POLICIES";
     
     private Bus bus;
@@ -437,6 +441,7 @@ public class PolicyAnnotationListener im
             
             return doc.getDocumentElement();
         } catch (XMLStreamException e) {
+            LOG.log(Level.WARNING, e.getMessage());
             return null;
         } finally {
             StaxUtils.close(reader);