Javadoc and @NonNull [message #1732979] |
Mon, 23 May 2016 10:08  |
Eclipse User |
|
|
|
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hi<br>
<br>
Has anyone successfully used (Sun jdk1.8.0_92) Javadoc for @NonNull
annotated source code?<br>
<br>
I get errors from infix annotated types such as<br>
<br>
<tt> [javadoc]
E:\GIT\org.eclipse.ocl\plugins\org.eclipse.ocl.pivot\src\org\eclipse\ocl\pivot\utilities\OCL.java:118:
error: annotation type not applicable to this kind of declaration</tt><tt><br>
</tt><tt> [javadoc] public static @NonNull OCL
newInstance(EPackage.@NonNull Registry ePackageRegistry) {</tt><tt><br>
</tt><tt> [javadoc]
^</tt><tt><br>
</tt><br>
I get errors from annotated template types such as<br>
<br>
<tt> [javadoc]
E:\GIT\org.eclipse.ocl\plugins\org.eclipse.ocl.pivot.uml\emf-gen\org\eclipse\ocl\pivot\uml\internal\oclforuml\util\OCLforUMLSwitch.java:41:
error: annotation type not applicable to this kind of declaration</tt><tt><br>
</tt><tt> [javadoc] public class OCLforUMLSwitch<@Nullable T></tt><tt><br>
</tt><tt> [javadoc] ^</tt><tt><br>
</tt><br>
Where Javadoc is generated, infixes are shown as untidy prefixes:<br>
<h4>getCSResource</h4>
<pre>@NonNull
public <a href="file:///C:/Users/Edward/AppData/Local/Temp/wz57c8/org/eclipse/ocl/pivot/resource/CSResource.html" title="interface in org.eclipse.ocl.pivot.resource">CSResource</a> getCSResource(@NonNull
org.eclipse.emf.common.util.URI uri,
@NonNull
java.io.InputStream inputStream)
throws java.io.IOException</pre>
<span class="throwsLabel"><br>
It all culminates in<br>
<br>
[javadoc] java.lang.ClassCastException:
com.sun.tools.javac.code.Symbol$TypeVariableSymbol cannot be cast
to com.sun.tools.javac.code.Symbol$ClassSymbol<br>
[javadoc] at
com.sun.tools.javac.api.JavacTrees.attributeDocReference(JavacTrees.java:410)<br>
[javadoc] at
com.sun.tools.javac.api.JavacTrees.getElement(JavacTrees.java:345)<br>
[javadoc] at
com.sun.tools.doclint.Checker.visitReference(Checker.java:756)<br>
[javadoc] at
com.sun.tools.doclint.Checker.visitReference(Checker.java:95)<br>
[javadoc] at
com.sun.tools.javac.tree.DCTree$DCReference.accept(DCTree.java:523)<br>
[javadoc] at
com.sun.source.util.DocTreePathScanner.scan(DocTreePathScanner.java:65)<br>
[javadoc] at
com.sun.source.util.DocTreeScanner.visitLink(DocTreeScanner.java:177)<br>
[javadoc] at
com.sun.tools.doclint.Checker.visitLink(Checker.java:684)<br>
</span><br>
From the @NonNull errors it would appear that Javadoc -source 1.8 is
using 1.7 policies.<br>
<br>
Has Javadoc not been updated, or is there some magic incantation
that I should have used?<br>
<br>
Regards<br>
<br>
Ed Willink<br>
</body>
</html>
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04461 seconds