359 } |
359 } |
360 } catch (FileNotFoundException | NoSuchFileException e) { |
360 } catch (FileNotFoundException | NoSuchFileException e) { |
361 // Silently create a new javac_state file. |
361 // Silently create a new javac_state file. |
362 noFileFound = true; |
362 noFileFound = true; |
363 } catch (IOException e) { |
363 } catch (IOException e) { |
364 Log.info("Dropping old javac_state because of errors when reading it."); |
364 Log.warn("Dropping old javac_state because of errors when reading it."); |
365 db = new JavacState(options, true); |
365 db = new JavacState(options, true); |
366 foundCorrectVerNr = true; |
366 foundCorrectVerNr = true; |
367 newCommandLine = false; |
367 newCommandLine = false; |
368 syntaxError = false; |
368 syntaxError = false; |
369 } |
369 } |
370 if (foundCorrectVerNr == false && !noFileFound) { |
370 if (foundCorrectVerNr == false && !noFileFound) { |
371 Log.info("Dropping old javac_state since it is of an old version."); |
371 Log.debug("Dropping old javac_state since it is of an old version."); |
372 db = new JavacState(options, true); |
372 db = new JavacState(options, true); |
373 } else |
373 } else |
374 if (newCommandLine == true && !noFileFound) { |
374 if (newCommandLine == true && !noFileFound) { |
375 Log.info("Dropping old javac_state since a new command line is used!"); |
375 Log.debug("Dropping old javac_state since a new command line is used!"); |
376 db = new JavacState(options, true); |
376 db = new JavacState(options, true); |
377 } else |
377 } else |
378 if (syntaxError == true) { |
378 if (syntaxError == true) { |
379 Log.info("Dropping old javac_state since it contains syntax errors."); |
379 Log.warn("Dropping old javac_state since it contains syntax errors."); |
380 db = new JavacState(options, true); |
380 db = new JavacState(options, true); |
381 } |
381 } |
382 db.prev.calculateDependents(); |
382 db.prev.calculateDependents(); |
383 return db; |
383 return db; |
384 } |
384 } |
866 // It can also be a new compile from scratch. |
866 // It can also be a new compile from scratch. |
867 if (mprev.lookupPackage(pkg).existsInJavacState()) { |
867 if (mprev.lookupPackage(pkg).existsInJavacState()) { |
868 // This is an incremental compile! The pubapi |
868 // This is an incremental compile! The pubapi |
869 // did change. Trigger recompilation of dependents. |
869 // did change. Trigger recompilation of dependents. |
870 packagesWithChangedPublicApis.add(pkg); |
870 packagesWithChangedPublicApis.add(pkg); |
871 Log.info("The API of " + Util.justPackageName(pkg) + " has changed!"); |
871 Log.debug("The API of " + Util.justPackageName(pkg) + " has changed!"); |
872 } |
872 } |
873 } |
873 } |
874 } |
874 } |
875 } |
875 } |
876 return rc; |
876 return rc; |