changeset 2999:39f02f1acda4

8078261: Initialization of DocLint triggers out of order initialization of Dependencies Summary: Changed initialization order. Reviewed-by: mcimadamore
author alundblad
date Wed, 22 Apr 2015 13:50:23 +0200
parents 04ec0526fa3d
children 80e4c11aa0f7
files src/jdk.compiler/share/classes/com/sun/tools/javac/main/Main.java
diffstat 1 files changed, 9 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/main/Main.java	Tue Apr 21 12:10:26 2015 +0200
+++ b/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));