michel - 2017-11-18

Absolutely this puts a lot of unwanted noise in the logs. The problem is that they don't rely on any logger library (sl4j, etc.) so they just puke the stack trace at line 160, and that these ones are probably not real errors. The CPScanner should provide a mechanism to deal with the errors, such as to configure a callback, or to override a log method. For instance (untested) :

protected logException(Exception e) {
  e.printStackTrace();
}

and :

 ...
 } catch (IOException e) {
  logException(e);
 }

Thus a programmer who doesn't care and who wants to keep his logs tidy would just have to subclass CPScanner and provide for a cleaner logException method. Additionnaly, the library should define its own specialized exceptions so that one can let go missing manifests but still react to an unexpected problems.

Remark: at 2nd reading I see that all the methods are static (why???) thus the simple override system will not work...

 

Last edit: michel 2017-11-18