PlantUMLDoclet does not work with Java 8

0 votes
asked Aug 27, 2014 in Bug by DavidHodges (120 points)
The static method

com.sun.tools.doclets.formats.html.ConfigurationImpl.getInstance() has been removed in Java 8.

So de.mallox.doclet.PlantUMLDoclet.init throws a NoSuchMethodError.

This looks like probably only one line of code needs to be changed:

change ConfigurationImpl.getInstance() to new ConfigurationImpl()

 

But I can't find the source code for the Doclet to make the change!

Can we have a new version that works with Java 8 please or can you tell me where to find the source code and I will try and get it working myself.

 

Java 8 introduced lots of new features to the language which I am using so I can't use the Java 7 javadoc with my code.

2 Answers

0 votes
answered Aug 28, 2014 by plantuml (295,000 points)
Hello,

Actually, the source are present in the plantUmlDoclet.jar file (you just have to unzip it).

This plugin is so simple that it is distributed under a simple all-permissive license : http://www.gnu.org/prep/maintain/html_node/License-Notices-for-Other-Files.html

If you modifiy it to support Java 8, it would be nice that you send it back to us so that we can also propose it to all users.

Thanks,
commented Aug 28, 2014 by anonymous
Great thanks.

my proposed change above makes it work with Java 8 (but not Java 7 and earlier) and I have emailed the updated jar file compiled with Java 8 back to you.
commented Sep 24, 2014 by anonymous
It does not work for me as ConfigurationImpl() method is not visible :-(
0 votes
answered Feb 17, 2016 by anonymous
--- PlantUMLDoclet.java.old    2010-06-14 21:49:10.000000000 +0200
+++ PlantUMLDoclet.java    2016-02-17 12:43:17.420212600 +0100
@@ -117,7 +117,7 @@
     }
 
     private void init(RootDoc root) {
-        configuration = ConfigurationImpl.getInstance();
+        configuration = new ConfigurationImpl();
         configuration.root = root;
         createPackages = Boolean.valueOf(System.getProperty(SYSTEM_PROPERTY_CREATE_PACKAGES, "false")).booleanValue();
         showPublicMethods = Boolean.valueOf(System.getProperty(SYSTEM_PROPERTY_SHOW_PUBLIC_METHODS, "true"))
...