langtools/src/share/classes/com/sun/tools/javac/main/Main.java
changeset 25445 603f0c93d5c9
parent 25006 5d5fa4abab27
child 25844 48eab270456c
equal deleted inserted replaced
25444:27045478cf23 25445:603f0c93d5c9
   293             : Source.DEFAULT;
   293             : Source.DEFAULT;
   294         String targetString = options.get(TARGET);
   294         String targetString = options.get(TARGET);
   295         Target target = (targetString != null)
   295         Target target = (targetString != null)
   296             ? Target.lookup(targetString)
   296             ? Target.lookup(targetString)
   297             : Target.DEFAULT;
   297             : Target.DEFAULT;
   298         // We don't check source/target consistency for CLDC, as J2ME
   298 
   299         // profiles are not aligned with J2SE targets; moreover, a
       
   300         // single CLDC target may have many profiles.  In addition,
       
   301         // this is needed for the continued functioning of the JSR14
       
   302         // prototype.
       
   303         if (Character.isDigit(target.name.charAt(0))) {
   299         if (Character.isDigit(target.name.charAt(0))) {
   304             if (target.compareTo(source.requiredTarget()) < 0) {
   300             if (target.compareTo(source.requiredTarget()) < 0) {
   305                 if (targetString != null) {
   301                 if (targetString != null) {
   306                     if (sourceString == null) {
   302                     if (sourceString == null) {
   307                         warning("warn.target.default.source.conflict",
   303                         warning("warn.target.default.source.conflict",
   313                                 source.requiredTarget().name);
   309                                 source.requiredTarget().name);
   314                     }
   310                     }
   315                     return null;
   311                     return null;
   316                 } else {
   312                 } else {
   317                     target = source.requiredTarget();
   313                     target = source.requiredTarget();
   318                     options.put("-target", target.name);
       
   319                 }
       
   320             } else {
       
   321                 if (targetString == null && !source.allowGenerics()) {
       
   322                     target = Target.JDK1_4;
       
   323                     options.put("-target", target.name);
   314                     options.put("-target", target.name);
   324                 }
   315                 }
   325             }
   316             }
   326         }
   317         }
   327 
   318