commit | d8079229a922e39e029c4f2ef7cacde2fcd89b3b | [log] [tgz] |
---|---|---|
author | sclarke <sclarke> | Mon Apr 26 21:34:45 2010 +0000 |
committer | sclarke <sclarke> | Mon Apr 26 21:34:45 2010 +0000 |
tree | 4e4b4ca17b27ae6559059c0b239172f0e200444c | |
parent | e86e356682f232e25688ce8c6d2c2c9b90405143 [diff] |
Bug 310392: NPE in org.eclipse.jst.ws.internal.jaxws.ui.filters.NewHandlerChainViewerFilter
diff --git a/bundles/org.eclipse.jst.ws.annotations.core/src/org/eclipse/jst/ws/annotations/core/AnnotationsManager.java b/bundles/org.eclipse.jst.ws.annotations.core/src/org/eclipse/jst/ws/annotations/core/AnnotationsManager.java index b638382..ba93d16 100644 --- a/bundles/org.eclipse.jst.ws.annotations.core/src/org/eclipse/jst/ws/annotations/core/AnnotationsManager.java +++ b/bundles/org.eclipse.jst.ws.annotations.core/src/org/eclipse/jst/ws/annotations/core/AnnotationsManager.java
@@ -138,8 +138,10 @@ annotationClassNameToDefinitionMap = new HashMap<String, AnnotationDefinition>(); for (AnnotationDefinition annotationDefinition : annotationDefinitions) { - annotationClassNameToDefinitionMap.put(annotationDefinition.getAnnotationClass() - .getCanonicalName(), annotationDefinition); + if (annotationDefinition.getAnnotationClass() != null) { + annotationClassNameToDefinitionMap.put(annotationDefinition.getAnnotationClass() + .getCanonicalName(), annotationDefinition); + } } } return annotationClassNameToDefinitionMap;
diff --git a/bundles/org.eclipse.jst.ws.jaxws.ui/src/org/eclipse/jst/ws/internal/jaxws/ui/filters/NewHandlerChainViewerFilter.java b/bundles/org.eclipse.jst.ws.jaxws.ui/src/org/eclipse/jst/ws/internal/jaxws/ui/filters/NewHandlerChainViewerFilter.java index be855ae..f582f88 100644 --- a/bundles/org.eclipse.jst.ws.jaxws.ui/src/org/eclipse/jst/ws/internal/jaxws/ui/filters/NewHandlerChainViewerFilter.java +++ b/bundles/org.eclipse.jst.ws.jaxws.ui/src/org/eclipse/jst/ws/internal/jaxws/ui/filters/NewHandlerChainViewerFilter.java
@@ -58,9 +58,11 @@ } if (!filterCompilationUnits && element instanceof ICompilationUnit) { - ICompilationUnit compilationUnit = (ICompilationUnit) element; + ICompilationUnit compilationUnit = (ICompilationUnit) element; IType type = compilationUnit.findPrimaryType(); - return type.isClass() || type.isInterface() && !type.isAnnotation(); + if (type != null) { + return type.isClass() || type.isInterface() && !type.isAnnotation(); + } } } catch (JavaModelException jme) { JAXWSUIPlugin.log(jme);