diff --git a/ext/wadl-doclet/src/main/java12/org/glassfish/jersey/wadl/doclet/ResourceDoclet.java b/ext/wadl-doclet/src/main/java12/org/glassfish/jersey/wadl/doclet/ResourceDoclet.java index 944413f53b..ff94b7595b 100644 --- a/ext/wadl-doclet/src/main/java12/org/glassfish/jersey/wadl/doclet/ResourceDoclet.java +++ b/ext/wadl-doclet/src/main/java12/org/glassfish/jersey/wadl/doclet/ResourceDoclet.java @@ -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 @@ -162,8 +162,10 @@ public boolean run(DocletEnvironment docEnv) { Map> 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 paramTags = tags.get(DocTree.Kind.PARAM);