Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.5.4
-
None
Description
There are potential NPEs while loading LDIFs in unit tests.
Class: org.apache.directory.server.core.integ.state.AbstractState
Method: protected void injectLdifs( DirectoryService service, InheritableSettings settings )
Lines 195 to 198.
[...]
Class<?> clazz = Class.forName( className );
URL url = clazz.getResource( ldifFile );
URI uri = url.toURI();
File file = new File( uri );
[...]
There are no check here to see either the 'clazz', 'url', 'uri' or 'file' variables are null.
If one of them is null, we'll get a NPE.