directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pierre-Arnaud Marcelot (JIRA)" <>
Subject [jira] Created: (DIRSERVER-1313) Potential NPEs while loading LDIFs in unit tests
Date Mon, 23 Feb 2009 08:49:02 GMT
Potential NPEs while loading LDIFs in unit tests

                 Key: DIRSERVER-1313
             Project: Directory ApacheDS
          Issue Type: Bug
          Components: core-integ
    Affects Versions: 1.5.4
            Reporter: Pierre-Arnaud Marcelot
             Fix For: 1.5.5

There are potential NPEs while loading LDIFs in unit tests.

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.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message