Closed jensnerche closed 10 years ago
Maybe the cause is not that the file does not exists. I've just created one and the NPE still occures. UPDATE: there was a typo. The cause is that the file does not exist, so the URL is null which leads to the NPE.
It seems that a null value is passed to the AbstractPluginIT.scanUrls() - are they created using Class.getResource() with a wrong resource name?. Nevertheless the file scanner should not exit with an NPE but with a dedicated exception.
Yes, the URL is null - no wonder, the file does not exist...
When in an integration test scanURLs(URL...) is called with a non-existing file, a NPE occures:
java.lang.NullPointerException at com.buschmais.jqassistant.core.scanner.impl.FileScannerImpl$5.getName(FileScannerImpl.java:285) at com.buschmais.jqassistant.core.scanner.impl.FileScannerImpl$5.getName(FileScannerImpl.java:265) at com.buschmais.jqassistant.core.scanner.impl.FileScannerImpl$AbstractIterable$1.hasNext(FileScannerImpl.java:53) at com.buschmais.jqassistant.plugin.common.test.AbstractPluginIT.scanURLs(AbstractPluginIT.java:216) at com.buschmais.jqassistant.plugin.common.test.AbstractPluginIT.scanURLs(AbstractPluginIT.java:203)