< prev index next >

src/jdk.compiler/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2018, 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
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.  Oracle designates this

@@ -186,15 +186,10 @@
     private final Completer initialCompleter;
     private final Check chk;
 
     private final Context context;
 
-    /**
-     * Support for preview language features.
-     */
-    private final Preview preview;
-
     /** Get the JavacProcessingEnvironment instance for this context. */
     public static JavacProcessingEnvironment instance(Context context) {
         JavacProcessingEnvironment instance = context.get(JavacProcessingEnvironment.class);
         if (instance == null)
             instance = new JavacProcessingEnvironment(context);

@@ -239,11 +234,10 @@
         dcfh = DeferredCompletionFailureHandler.instance(context);
         names = Names.instance(context);
         enter = Enter.instance(context);
         initialCompleter = ClassFinder.instance(context).getCompleter();
         chk = Check.instance(context);
-        preview = Preview.instance(context);
         initProcessorLoader();
     }
 
     public void setProcessors(Iterable<? extends Processor> processors) {
         Assert.checkNull(discoveredProcs);

@@ -442,18 +436,11 @@
             try {
                 return internalHasNext();
             } catch(ServiceConfigurationError sce) {
                 log.error(Errors.ProcBadConfigFile(sce.getLocalizedMessage()));
                 throw new Abort(sce);
-            } catch (UnsupportedClassVersionError ucve) {
-                log.error(Errors.ProcCantLoadClass(ucve.getLocalizedMessage()));
-                throw new Abort(ucve);
-            } catch (ClassFormatError cfe) {
-                log.error(Errors.ProcCantLoadClass(cfe.getLocalizedMessage()));
-                throw new Abort(cfe);
             } catch (Throwable t) {
-                log.error(Errors.ProcBadConfigFile(t.getLocalizedMessage()));
                 throw new Abort(t);
             }
         }
 
         boolean internalHasNext() {

@@ -466,11 +453,10 @@
                 return internalNext();
             } catch (ServiceConfigurationError sce) {
                 log.error(Errors.ProcBadConfigFile(sce.getLocalizedMessage()));
                 throw new Abort(sce);
             } catch (Throwable t) {
-                log.error(Errors.ProcBadConfigFile(t.getLocalizedMessage()));
                 throw new Abort(t);
             }
         }
 
         Processor internalNext() {

@@ -1687,15 +1673,10 @@
     @DefinedBy(Api.ANNOTATION_PROCESSING)
     public Locale getLocale() {
         return messages.getCurrentLocale();
     }
 
-    @DefinedBy(Api.ANNOTATION_PROCESSING)
-    public boolean isPreviewEnabled() {
-        return preview.isEnabled();
-    }
-
     public Set<Symbol.PackageSymbol> getSpecifiedPackages() {
         return specifiedPackages;
     }
 
     public static final Pattern noMatches  = Pattern.compile("(\\P{all})+");
< prev index next >