8078261: Initialization of DocLint triggers out of order initialization of Dependencies
authoralundblad
Wed, 22 Apr 2015 13:50:23 +0200
changeset 30012 660da74452cf
parent 30011 34df75eba76b
child 30013 574ac7c429e0
8078261: Initialization of DocLint triggers out of order initialization of Dependencies Summary: Changed initialization order. Reviewed-by: mcimadamore
langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/main/Main.java
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/main/Main.java	Tue Apr 21 12:10:26 2015 +0200
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/main/Main.java	Wed Apr 22 13:50:23 2015 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -222,6 +222,11 @@
         if (args.isEmpty())
             return Result.OK;
 
+        // init Depeendencies
+        if (options.isSet("completionDeps")) {
+            Dependencies.GraphDependencies.preRegister(context);
+        }
+
         // init plugins
         Set<List<String>> pluginOpts = args.getPluginOpts();
         if (!pluginOpts.isEmpty()) {
@@ -229,6 +234,9 @@
             t.initPlugins(pluginOpts);
         }
 
+        // init JavaCompiler
+        JavaCompiler comp = JavaCompiler.instance(context);
+
         // init doclint
         List<String> docLintOpts = args.getDocLintOpts();
         if (!docLintOpts.isEmpty()) {
@@ -236,13 +244,6 @@
             t.initDocLint(docLintOpts);
         }
 
-        // init Depeendencies
-        if (options.isSet("completionDeps")) {
-            Dependencies.GraphDependencies.preRegister(context);
-        }
-
-        // init JavaCompiler
-        JavaCompiler comp = JavaCompiler.instance(context);
         if (options.get(Option.XSTDOUT) != null) {
             // Stdout reassigned - ask compiler to close it when it is done
             comp.closeables = comp.closeables.prepend(log.getWriter(WriterKind.NOTICE));