src/share/classes/com/sun/tools/javac/main/Main.java
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File langtools Cdiff src/share/classes/com/sun/tools/javac/main/Main.java

src/share/classes/com/sun/tools/javac/main/Main.java

Print this page

        

*** 47,56 **** --- 47,57 ---- import com.sun.tools.doclint.DocLint; import com.sun.tools.javac.api.BasicJavacTask; import com.sun.tools.javac.code.Source; import com.sun.tools.javac.file.CacheFSInfo; import com.sun.tools.javac.file.JavacFileManager; + import com.sun.tools.javac.jvm.Profile; import com.sun.tools.javac.jvm.Target; import com.sun.tools.javac.processing.AnnotationProcessingError; import com.sun.tools.javac.processing.JavacProcessingEnvironment; import com.sun.tools.javac.util.*; import com.sun.tools.javac.util.Log.PrefixKind;
*** 74,84 **** */ PrintWriter out; /** The log to use for diagnostic output. */ ! Log log; /** * If true, certain errors will cause an exception, such as command line * arg errors, or exceptions in user provided code. */ --- 75,85 ---- */ PrintWriter out; /** The log to use for diagnostic output. */ ! public Log log; /** * If true, certain errors will cause an exception, such as command line * arg errors, or exceptions in user provided code. */
*** 163,172 **** --- 164,174 ---- */ public Main(String name, PrintWriter out) { this.ownName = name; this.out = out; } + /** A table of all options that's passed to the JavaCompiler constructor. */ private Options options = null; /** The list of source files to process */
*** 305,314 **** --- 307,325 ---- options.put("-target", target.name); } } } + String profileString = options.get(PROFILE); + if (profileString != null) { + Profile profile = Profile.lookup(profileString); + if (!profile.isValid(target)) { + warning("warn.profile.target.conflict", profileString, target.name); + return null; + } + } + // handle this here so it works even if no other options given String showClass = options.get("showClass"); if (showClass != null) { if (showClass.equals("showClass")) // no value given for option showClass = "com.sun.tools.javac.Main";
src/share/classes/com/sun/tools/javac/main/Main.java
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File