From ff9b49ad76234e3b60512fc479343030a6b367ad Mon Sep 17 00:00:00 2001
From: ludovicp <ludovicp@localhost>
Date: Wed, 18 Aug 2010 09:47:15 +0000
Subject: [PATCH] Cleanup. Remove references to Java 5 since we no longer support it. Cleanup messages, removing unnecessary casts (due to bugs in early versions of Java 5), removing dead code. The minimal version has been set to Java 1.6.0_10. Also cleanup the Java Stubs for MacOS, removed the StatusPanel (replaced by ControlPanel since 1.2), and update Info.plist to require 1.6 or higher, show 2.3 as version.
---
opends/src/server/org/opends/server/util/Platform.java | 87 -------------------------------------------
1 files changed, 1 insertions(+), 86 deletions(-)
diff --git a/opends/src/server/org/opends/server/util/Platform.java b/opends/src/server/org/opends/server/util/Platform.java
index 5956b6e..fdec803 100644
--- a/opends/src/server/org/opends/server/util/Platform.java
+++ b/opends/src/server/org/opends/server/util/Platform.java
@@ -68,32 +68,16 @@
static
{
String vendor = System.getProperty("java.vendor");
- String ver = System.getProperty("java.version");
if (vendor.startsWith("IBM"))
{
pkgPrefix = IBM_SEC;
- if (ver.startsWith("1.5"))
- {
- IMPL = new IBM5PlatformIMPL();
- }
- else
- {
- IMPL = new DefaultPlatformIMPL();
- }
}
else
{
pkgPrefix = SUN_SEC;
- if (ver.startsWith("1.5"))
- {
- IMPL = new Sun5PlatformIMPL();
- }
- else
- {
- IMPL = new DefaultPlatformIMPL();
- }
}
+ IMPL = new DefaultPlatformIMPL();
}
@@ -553,58 +537,6 @@
validity);
}
-
-
- /**
- * Sun 5 JDK platform class.
- */
- private static class Sun5PlatformIMPL extends PlatformIMPL
- {
- // normalize method.
- private static final Method NORMALIZE;
- // Normalized form method.
- private static final Object FORM_NFKC;
-
- static
- {
- Method normalize = null;
- Object formNFKC = null;
- try
- {
- Class<?> normalizer = Class.forName("sun.text.Normalizer");
- formNFKC = normalizer.getField("DECOMP_COMPAT").get(null);
- Class<?> normalizerForm = Class.forName("sun.text.Normalizer$Mode");
- normalize = normalizer.getMethod("normalize", String.class,
- normalizerForm, Integer.TYPE);
- }
- catch (Exception ex)
- {
- // Do not use Normalizer. The values are already set to null.
- }
- NORMALIZE = normalize;
- FORM_NFKC = formNFKC;
- }
-
-
-
- @Override
- public void normalize(StringBuilder buffer)
- {
- try
- {
- String normal = (String) NORMALIZE.invoke(null, buffer.toString(),
- FORM_NFKC, 0);
- buffer.replace(0, buffer.length(), normal);
- }
- catch (Exception ex)
- {
- // Don't do anything. buffer should be used.
- }
- }
- }
-
-
-
/**
* Default platform class.
*/
@@ -653,23 +585,6 @@
}
}
-
-
- /**
- * IBM JDK 5 platform class.
- */
- private static class IBM5PlatformIMPL extends PlatformIMPL
- {
-
- @Override
- public void normalize(StringBuilder buffer)
- {
- // No implementation.
- }
- }
-
-
-
/**
* Normalize the specified buffer.
*
--
Gitblit v1.10.0