Skip to content

Commit

Permalink
Fixed NullpointerException when getting methodtree (#5024)
Browse files Browse the repository at this point in the history
Co-authored-by: jm041977 <john.marquez@broadcom.com>
  • Loading branch information
johnmarquez12 and jm041977 authored Apr 8, 2022
1 parent 167910e commit 8f7fa99
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2019 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2019, 2022 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
Expand Down Expand Up @@ -162,8 +162,10 @@ public boolean run(DocletEnvironment docEnv) {
Map<DocTree.Kind, Map<String, String>> tags = getTags(docTrees.getDocCommentTree(method));
MethodTree methodTree = docTrees.getTree(method);
MethodDocType methodDocType = new MethodDocType();
methodDocType.setMethodName(methodTree.getName().toString());
methodDocType.setCommentText(getComments(docTrees.getDocCommentTree(method)));
if (methodTree != null) {
methodDocType.setMethodName(methodTree.getName().toString());
methodDocType.setCommentText(getComments(docTrees.getDocCommentTree(method)));
}
getTags(docTrees.getDocCommentTree(method));
StringBuilder arguments = new StringBuilder("(");
Map<String, String> paramTags = tags.get(DocTree.Kind.PARAM);
Expand Down

0 comments on commit 8f7fa99

Please sign in to comment.