Problem building javadoc-javac
Werner Dietl
wdietl at gmail.com
Mon Jul 15 10:43:21 PDT 2013
Jon, all,
in langtools/make, when I run
ant ... javadoc-javac
I see two errors:
[javadoc] Constructing Javadoc information...
[javadoc] .../langtools/src/share/classes/com/sun/tools/javac/code/Type.java:163:
error: diamond operator is not supported in -source 1.5
[javadoc] ListBuffer<Type> lb = new ListBuffer<>();
[javadoc] ^
[javadoc] (use -source 7 or higher to enable diamond operator)
[javadoc] .../langtools/src/share/classes/com/sun/tools/javac/util/ServiceLoader.java:73:
error: diamond operator is not supported in -source 1.5
[javadoc] private LinkedHashMap<String,S> providers = new
LinkedHashMap<>();
[javadoc] ^
[javadoc] (use -source 7 or higher to enable diamond operator)
[javadoc] Standard Doclet version 1.8.0-internal
[javadoc] Building tree for all the packages and classes...
I think these are caused by the following line in langtools/make/build.xml:
<attribute name="source" default="1.5"/> <!-- FIXME -->
There is no comment for the FIXME.
The errors go away when the default is set to 1.7.
It might be even better to remove the source attribute and keep
whatever the "natural" default source value is.
Is this the right way to create javadoc for langtools?
Thoughts?
cu, WMD.
--
http://www.google.com/profiles/wdietl
More information about the type-annotations-dev
mailing list