Do not statically initialize ImportedFiles#INCLUDE_PATH

0 votes
asked May 9 in Bug by krasa (680 points)
edited May 9 by krasa

It is not usable in long running processes like IDEs, when you need to configure and change it on fly.

I had to work around it by:
try {
    Field include_path = ImportedFiles.class.getDeclaredField("INCLUDE_PATH");
    include_path.setAccessible(true);
    List<File> o = (List<File>) include_path.get(null);
    o.clear();
    o.addAll(FileSystem.getPath("plantuml.include.path", true));
} catch (Exception e) {
    LOG.debug(e);
}

1 Answer

0 votes
answered May 9 by plantuml (223,180 points)
selected May 9 by krasa
 
Best answer
Ok, sorry about that.

It will be fixed in next official release.
commented May 10 by plantuml (223,180 points)
So this is fixed in V1.2020.9

Best regards,
commented May 11 by krasa (680 points)
Thank you very much!
...