mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Prashant
12 hours ago 1eab04986497d8234d8916fe7574a50a2e0cbbc2
opendj-server-legacy/src/main/java/org/opends/server/protocols/http/authz/HttpOAuth2FileAuthorizationMechanism.java
@@ -19,7 +19,9 @@
import static org.opends.messages.ConfigMessages.ERR_CONFIG_OAUTH2_NON_EXISTING_DIRECTORY;
import static org.opends.server.util.StaticUtils.getFileForPath;
import java.nio.file.DirectoryStream;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import org.forgerock.http.oauth2.AccessTokenResolver;
@@ -41,9 +43,10 @@
  AccessTokenResolver newAccessTokenResolver() throws ConfigException
  {
    final String absoluteTokenDir = getFileForPath(config.getAccessTokenDirectory()).getAbsolutePath();
    try
    // Opened only to check the directory is readable, then closed.
    try (DirectoryStream<Path> ignored = Files.newDirectoryStream(Paths.get(absoluteTokenDir)))
    {
      Files.newDirectoryStream(Paths.get(absoluteTokenDir));
      // Nothing to do.
    }
    catch (Exception e)
    {