langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/api/JavacTaskImpl.java
changeset 41938 8e66bf10fcec
parent 36526 3b41f1c69604
child 42827 36468b5fa7f4
equal deleted inserted replaced
41937:1313399705e9 41938:8e66bf10fcec
     1 /*
     1 /*
     2  * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
    99         try {
    99         try {
   100             return handleExceptions(new Callable<Main.Result>() {
   100             return handleExceptions(new Callable<Main.Result>() {
   101                 @Override
   101                 @Override
   102                 public Main.Result call() throws Exception {
   102                 public Main.Result call() throws Exception {
   103                     prepareCompiler(false);
   103                     prepareCompiler(false);
       
   104                     if (compiler.errorCount() > 0)
       
   105                         return Main.Result.ERROR;
   104                     compiler.compile(args.getFileObjects(), args.getClassNames(), processors);
   106                     compiler.compile(args.getFileObjects(), args.getClassNames(), processors);
   105                     return (compiler.errorCount() > 0) ? Main.Result.ERROR : Main.Result.OK; // FIXME?
   107                     return (compiler.errorCount() > 0) ? Main.Result.ERROR : Main.Result.OK; // FIXME?
   106                 }
   108                 }
   107             }, Main.Result.SYSERR, Main.Result.ABNORMAL);
   109             }, Main.Result.SYSERR, Main.Result.ABNORMAL);
   108         } finally {
   110         } finally {