Author: dkulp
Date: Tue Apr 5 20:16:32 2011
New Revision: 1089199
URL: http://svn.apache.org/viewvc?rev=1089199&view=rev
Log:
Merged revisions 1089193 via svnmerge from
https://svn.apache.org/repos/asf/cxf/trunk
........
r1089193 | dkulp | 2011-04-05 16:12:02 -0400 (Tue, 05 Apr 2011) | 1 line
[CXF-3410] Added a bunch of NPE guards
........
Modified:
cxf/branches/2.3.x-fixes/ (props changed)
cxf/branches/2.3.x-fixes/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/PolicyAnnotationListener.java
Propchange: cxf/branches/2.3.x-fixes/
('svn:mergeinfo' removed)
Propchange: cxf/branches/2.3.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.
Modified:
cxf/branches/2.3.x-fixes/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/PolicyAnnotationListener.java
URL:
http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/PolicyAnnotationListener.java?rev=1089199&r1=1089198&r2=1089199&view=diff
==============================================================================
---
cxf/branches/2.3.x-fixes/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/PolicyAnnotationListener.java
(original)
+++
cxf/branches/2.3.x-fixes/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/PolicyAnnotationListener.java
Tue Apr 5 20:16:32 2011
@@ -207,6 +207,9 @@ public class PolicyAnnotationListener im
if (list != null) {
addPolicies(factory, server.getEndpoint(), cls, list,
Policy.Placement.BINDING);
}
+ if (cls == null) {
+ return;
+ }
Policy p = cls.getAnnotation(Policy.class);
Policies ps = cls.getAnnotation(Policies.class);
if (p != null || ps != null) {
@@ -267,6 +270,9 @@ public class PolicyAnnotationListener im
private void addPolicies(AbstractServiceFactoryBean factory, InterfaceInfo
ii, Class<?> cls) {
+ if (cls == null) {
+ return;
+ }
Policy p = cls.getAnnotation(Policy.class);
Policies ps = cls.getAnnotation(Policies.class);
if (p != null || ps != null) {
@@ -334,7 +340,7 @@ public class PolicyAnnotationListener im
if (src != null) {
try {
Document doc =
StaxUtils.read(StaxUtils.createXMLStreamReader(src));
- if (service.getDescription() == null) {
+ if (service.getDescription() == null && cls != null) {
service.setDescription(new DescriptionInfo());
service.getDescription().setBaseURI(cls.getResource("/").toString());
}