361 log.error("cant.access", ex.sym, ex.getDetailValue()); |
361 log.error("cant.access", ex.sym, ex.getDetailValue()); |
362 if (ex instanceof ClassReader.BadClassFile) |
362 if (ex instanceof ClassReader.BadClassFile) |
363 throw new Abort(); |
363 throw new Abort(); |
364 } |
364 } |
365 source = Source.instance(context); |
365 source = Source.instance(context); |
|
366 Target target = Target.instance(context); |
366 attr = Attr.instance(context); |
367 attr = Attr.instance(context); |
367 chk = Check.instance(context); |
368 chk = Check.instance(context); |
368 gen = Gen.instance(context); |
369 gen = Gen.instance(context); |
369 flow = Flow.instance(context); |
370 flow = Flow.instance(context); |
370 transTypes = TransTypes.instance(context); |
371 transTypes = TransTypes.instance(context); |
428 ? CompileState.valueOf(options.get("shouldStopPolicyIfNoError")) |
431 ? CompileState.valueOf(options.get("shouldStopPolicyIfNoError")) |
429 : CompileState.GENERATE; |
432 : CompileState.GENERATE; |
430 |
433 |
431 if (options.isUnset("oldDiags")) |
434 if (options.isUnset("oldDiags")) |
432 log.setDiagnosticFormatter(RichDiagnosticFormatter.instance(context)); |
435 log.setDiagnosticFormatter(RichDiagnosticFormatter.instance(context)); |
|
436 } |
|
437 |
|
438 private void checkForObsoleteOptions(Target target) { |
|
439 // Unless lint checking on options is disabled, check for |
|
440 // obsolete source and target options. |
|
441 boolean obsoleteOptionFound = false; |
|
442 if (options.isUnset(XLINT_CUSTOM, "-" + LintCategory.OPTIONS.option)) { |
|
443 if (source.compareTo(Source.JDK1_5) <= 0) { |
|
444 log.warning(LintCategory.OPTIONS, "option.obsolete.source", source.name); |
|
445 obsoleteOptionFound = true; |
|
446 } |
|
447 |
|
448 if (target.compareTo(Target.JDK1_5) <= 0) { |
|
449 log.warning(LintCategory.OPTIONS, "option.obsolete.target", source.name); |
|
450 obsoleteOptionFound = true; |
|
451 } |
|
452 |
|
453 if (obsoleteOptionFound) |
|
454 log.warning(LintCategory.OPTIONS, "option.obsolete.suppression"); |
|
455 } |
433 } |
456 } |
434 |
457 |
435 /* Switches: |
458 /* Switches: |
436 */ |
459 */ |
437 |
460 |