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/backends/TrustStoreBackend.java |   16 +++++++---------
 1 files changed, 7 insertions(+), 9 deletions(-)

diff --git a/opendj-server-legacy/src/main/java/org/opends/server/backends/TrustStoreBackend.java b/opendj-server-legacy/src/main/java/org/opends/server/backends/TrustStoreBackend.java
index ba33cbc..f22549d 100644
--- a/opendj-server-legacy/src/main/java/org/opends/server/backends/TrustStoreBackend.java
+++ b/opendj-server-legacy/src/main/java/org/opends/server/backends/TrustStoreBackend.java
@@ -1478,18 +1478,16 @@
     out.flush();
     out.close();
 
-    if(FilePermission.canSetPermissions()) {
-      try {
-        if (!FilePermission.setPermissions(new File(path),
-                                           new FilePermission(0600)))
-        {
-          // Log a warning that the permissions were not set.
-          logger.warn(WARN_TRUSTSTORE_SET_PERMISSIONS_FAILED, path);
-        }
-      } catch(DirectoryException e) {
+    try {
+      if (!FilePermission.setPermissions(new File(path),
+          new FilePermission(0600)))
+      {
         // Log a warning that the permissions were not set.
         logger.warn(WARN_TRUSTSTORE_SET_PERMISSIONS_FAILED, path);
       }
+    } catch(DirectoryException e) {
+      // Log a warning that the permissions were not set.
+      logger.warn(WARN_TRUSTSTORE_SET_PERMISSIONS_FAILED, path);
     }
   }
 

--
Gitblit v1.10.0