From ab1a29b5a1cfeda2469f6ca4c3fa86094c83bc58 Mon Sep 17 00:00:00 2001
From: Chris Ridd <chris.ridd@forgerock.com>
Date: Tue, 26 Mar 2013 13:22:14 +0000
Subject: [PATCH] CR-1472 Fix OPENDJ-823 Authz users forced to change their password shouldn't be able to modify entries
---
opends/src/server/org/opends/server/util/StaticUtils.java | 27 +++++++++++++++++++++++++++
1 files changed, 27 insertions(+), 0 deletions(-)
diff --git a/opends/src/server/org/opends/server/util/StaticUtils.java b/opends/src/server/org/opends/server/util/StaticUtils.java
index 45f528d..855fa3e 100644
--- a/opends/src/server/org/opends/server/util/StaticUtils.java
+++ b/opends/src/server/org/opends/server/util/StaticUtils.java
@@ -4666,6 +4666,33 @@
}
/**
+ * Closes the provided {@link Socket}s ignoring any errors which occurred.
+ * <p>
+ * With java 7 we will be able to use {@link StaticUtils#close(Closeable...)}
+ * </p>
+ *
+ * @param sockets
+ * The sockets to be closed, which may be <code>null</code>.
+ */
+ public static void close(Socket... sockets)
+ {
+ for (Socket socket : sockets)
+ {
+ if (socket != null)
+ {
+ try
+ {
+ socket.close();
+ }
+ catch (IOException ignored)
+ {
+ // Ignore.
+ }
+ }
+ }
+ }
+
+ /**
* Returns an {@link Iterable} returning the passed in {@link Iterator}. THis
* allows using methods returning Iterators with foreach statements.
* <p>
--
Gitblit v1.10.0