Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ private static double getVersion() {

public String getClassDoc(ClassResourceInfo cri) {
try {
ClassDocs doc = getClassDocInternal(cri);
ClassDocs doc = getClassDocInternal(cri.getServiceClass());
if (doc == null) {
return null;
}
Expand Down Expand Up @@ -123,7 +123,7 @@ public String getMethodParameterDoc(OperationResourceInfo ori, int paramIndex) {
return null;
}
} catch (Exception ex) {
// ignore
// ignore
}
return null;
}
Expand All @@ -132,7 +132,7 @@ private Class<?> getPathAnnotatedClass(Class<?> cls) {
if (cls.getAnnotation(Path.class) != null) {
return cls;
}
if (cls.getSuperclass().getAnnotation(Path.class) != null) {
if (cls.getSuperclass() != null && cls.getSuperclass().getAnnotation(Path.class) != null) {
return cls.getSuperclass();
}
for (Class<?> i : cls.getInterfaces()) {
Expand All @@ -143,8 +143,8 @@ private Class<?> getPathAnnotatedClass(Class<?> cls) {
return cls;
}

private ClassDocs getClassDocInternal(ClassResourceInfo cri) throws Exception {
Class<?> annotatedClass = getPathAnnotatedClass(cri.getServiceClass());
private ClassDocs getClassDocInternal(Class<?> cls) throws Exception {
Class<?> annotatedClass = getPathAnnotatedClass(cls);
String resource = annotatedClass.getName().replace(".", "/") + ".html";
ClassDocs classDocs = docs.get(resource);
if (classDocs == null) {
Expand All @@ -169,12 +169,13 @@ private ClassDocs getClassDocInternal(ClassResourceInfo cri) throws Exception {


private MethodDocs getOperationDocInternal(OperationResourceInfo ori) throws Exception {
ClassDocs classDoc = getClassDocInternal(ori.getClassResourceInfo());
Method method = ori.getAnnotatedMethod() == null
? ori.getMethodToInvoke()
: ori.getAnnotatedMethod();
ClassDocs classDoc = getClassDocInternal(method.getDeclaringClass());
if (classDoc == null) {
return null;
}
Method method = ori.getAnnotatedMethod() == null ? ori.getMethodToInvoke()
: ori.getAnnotatedMethod();
MethodDocs mDocs = classDoc.getMethodDocs(method);
if (mDocs == null) {
String operLink = getOperLink();
Expand Down