From 8b6a544a11dee1f1b77151fb532fb1f06a7bbea6 Mon Sep 17 00:00:00 2001
From: Fabio Pistolesi <fabio.pistolesi@forgerock.com>
Date: Tue, 28 Apr 2015 13:01:03 +0000
Subject: [PATCH] OPENDJ-1972 CR-6777 Remove JDK6 compatibility layers
---
opendj-server-legacy/src/main/java/org/opends/server/admin/AdministrationConnector.java | 19 ++++++++-----------
1 files changed, 8 insertions(+), 11 deletions(-)
diff --git a/opendj-server-legacy/src/main/java/org/opends/server/admin/AdministrationConnector.java b/opendj-server-legacy/src/main/java/org/opends/server/admin/AdministrationConnector.java
index ba266ee..d82e8fe 100644
--- a/opendj-server-legacy/src/main/java/org/opends/server/admin/AdministrationConnector.java
+++ b/opendj-server-legacy/src/main/java/org/opends/server/admin/AdministrationConnector.java
@@ -571,23 +571,20 @@
}
// Change the password file permission if possible
- if (FilePermission.canSetPermissions())
+ try
{
- try
- {
- if (!FilePermission.setPermissions(new File(pinFilePath),
- new FilePermission(0600)))
- {
- // Log a warning that the permissions were not set.
- logger.warn(WARN_ADMIN_SET_PERMISSIONS_FAILED, pinFilePath);
- }
- }
- catch (DirectoryException e)
+ if (!FilePermission.setPermissions(new File(pinFilePath),
+ new FilePermission(0600)))
{
// Log a warning that the permissions were not set.
logger.warn(WARN_ADMIN_SET_PERMISSIONS_FAILED, pinFilePath);
}
}
+ catch (DirectoryException e)
+ {
+ // Log a warning that the permissions were not set.
+ logger.warn(WARN_ADMIN_SET_PERMISSIONS_FAILED, pinFilePath);
+ }
// Delete the exported certificate
File f = new File(tempCertPath);
--
Gitblit v1.10.0