Uploaded image for project: 'Directory ApacheDS'
  1. Directory ApacheDS
  2. DIRSERVER-1313

Potential NPEs while loading LDIFs in unit tests

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.5.4
    • 1.5.5
    • core-integ
    • 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.

      Attachments

        Activity

          People

            elecharny Emmanuel Lécharny
            pamarcelot Pierre-Arnaud Marcelot
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: