summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVictor V Rubezhny2013-11-01 11:31:33 (EDT)
committerChris Jaun2013-11-01 11:31:33 (EDT)
commitf21a3555e3727c3d02a5ab660ea0af483db95f96 (patch)
tree186f0ef1e6caa1348919221a2ad97bcf2f5cfbfd
parent802e0ab714f7e3f9bf852ce72689628b218e9e62 (diff)
downloadwebtools.jsdt.core-f21a3555e3727c3d02a5ab660ea0af483db95f96.zip
webtools.jsdt.core-f21a3555e3727c3d02a5ab660ea0af483db95f96.tar.gz
webtools.jsdt.core-f21a3555e3727c3d02a5ab660ea0af483db95f96.tar.bz2
[420818] NullPointerException when selecting "Add all missing tags"
Quick-Fix
-rw-r--r--bundles/org.eclipse.wst.jsdt.ui/src/org/eclipse/wst/jsdt/internal/ui/text/correction/JavadocTagsSubProcessor.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/bundles/org.eclipse.wst.jsdt.ui/src/org/eclipse/wst/jsdt/internal/ui/text/correction/JavadocTagsSubProcessor.java b/bundles/org.eclipse.wst.jsdt.ui/src/org/eclipse/wst/jsdt/internal/ui/text/correction/JavadocTagsSubProcessor.java
index b8d39bf..35294a1 100644
--- a/bundles/org.eclipse.wst.jsdt.ui/src/org/eclipse/wst/jsdt/internal/ui/text/correction/JavadocTagsSubProcessor.java
+++ b/bundles/org.eclipse.wst.jsdt.ui/src/org/eclipse/wst/jsdt/internal/ui/text/correction/JavadocTagsSubProcessor.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -204,7 +204,7 @@ public class JavadocTagsSubProcessor {
}
if (!methodDecl.isConstructor()) {
Type type= methodDecl.getReturnType2();
- if (!type.isPrimitiveType() || (((PrimitiveType) type).getPrimitiveTypeCode() != PrimitiveType.VOID)) {
+ if (type != null && (!type.isPrimitiveType() || (((PrimitiveType) type).getPrimitiveTypeCode() != PrimitiveType.VOID))) {
if (findTag(javadoc, TagElement.TAG_RETURN, null) == null) {
TagElement newTag= ast.newTagElement();
newTag.setTagName(TagElement.TAG_RETURN);