mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Remove JDK 1.6 dependencies
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@13670 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -27,6 +27,7 @@ package org.alfresco.repo.management;
|
||||
import java.io.IOException;
|
||||
import java.io.PrintWriter;
|
||||
import java.lang.reflect.Array;
|
||||
import java.util.Comparator;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.TreeMap;
|
||||
@@ -75,8 +76,16 @@ public class JmxDumpUtil
|
||||
// Get all the object names
|
||||
Set<ObjectName> objectNames = connection.queryNames(null, null);
|
||||
|
||||
// Sort the names
|
||||
objectNames = new TreeSet<ObjectName>(objectNames);
|
||||
// Sort the names (don't assume ObjectName implements Comparable in JDK 1.5)
|
||||
Set<ObjectName> newObjectNames = new TreeSet<ObjectName>(new Comparator<ObjectName>()
|
||||
{
|
||||
public int compare(ObjectName o1, ObjectName o2)
|
||||
{
|
||||
return o1.toString().compareTo(o2.toString());
|
||||
}
|
||||
});
|
||||
newObjectNames.addAll(objectNames);
|
||||
objectNames = newObjectNames;
|
||||
|
||||
// Dump each MBean
|
||||
for (ObjectName objectName : objectNames)
|
||||
@@ -148,10 +157,11 @@ public class JmxDumpUtil
|
||||
* @throws IOException
|
||||
* Signals that an I/O exception has occurred.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
private static void printCompositeInfo(CompositeData composite, PrintWriter out, int nestLevel) throws IOException
|
||||
{
|
||||
Map<String, Object> attributes = new TreeMap<String, Object>();
|
||||
for (String key : composite.getCompositeType().keySet())
|
||||
for (String key : (Set<String>)composite.getCompositeType().keySet())
|
||||
{
|
||||
Object value;
|
||||
try
|
||||
|
@@ -530,7 +530,7 @@ public abstract class AbstractAuthenticationComponent implements AuthenticationC
|
||||
public void setDefaultAdministratorUserNames(String defaultAdministratorUserNames)
|
||||
{
|
||||
Set<String> nameSet = new TreeSet<String>();
|
||||
if (!defaultAdministratorUserNames.isEmpty())
|
||||
if (defaultAdministratorUserNames.length() > 0)
|
||||
{
|
||||
nameSet.addAll(Arrays.asList(defaultAdministratorUserNames.split(",")));
|
||||
}
|
||||
|
@@ -279,7 +279,7 @@ public class NTLMAuthenticationComponentImpl extends AbstractAuthenticationCompo
|
||||
*/
|
||||
@Managed(category="Security")
|
||||
public void setDomain(String domain) {
|
||||
if (!domain.isEmpty())
|
||||
if (domain.length() > 0)
|
||||
{
|
||||
// Check if the passthru server list is already configured
|
||||
|
||||
@@ -306,7 +306,7 @@ public class NTLMAuthenticationComponentImpl extends AbstractAuthenticationCompo
|
||||
*/
|
||||
@Managed(category="Security")
|
||||
public void setServers(String servers) {
|
||||
if (!servers.isEmpty())
|
||||
if (servers.length() > 0)
|
||||
{
|
||||
// Check if the passthru server list is already configured
|
||||
|
||||
|
Reference in New Issue
Block a user