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/messages/src/org/opends/messages/Message.java | 28 ++++++++++------------------
1 files changed, 10 insertions(+), 18 deletions(-)
diff --git a/opends/src/messages/src/org/opends/messages/Message.java b/opends/src/messages/src/org/opends/messages/Message.java
index 4dcfda3..20dfa73 100644
--- a/opends/src/messages/src/org/opends/messages/Message.java
+++ b/opends/src/messages/src/org/opends/messages/Message.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Copyright 2008 Sun Microsystems, Inc.
+ * Copyright 2008-2010 Sun Microsystems, Inc.
*/
package org.opends.messages;
@@ -58,7 +58,7 @@
// Variable used to workaround a bug in AIX Java 1.6
// TODO: remove this code once the JDK issue referenced in 3077 is closed.
- private final boolean isAIXPost5 = isAIXPost5();
+ private final boolean isAIX = isAIX();
/**
* Creates an uninternationalized message that will render itself
@@ -168,6 +168,7 @@
* Gets the string representation of this message.
* @return String representation of this message
*/
+ @Override
public String toString() {
return toString(Locale.getDefault());
}
@@ -186,7 +187,7 @@
try {
// TODO: remove this code once the JDK issue referenced in 3077 is
// closed.
- if (isAIXPost5)
+ if (isAIX)
{
// Java 6 in AIX Formatter does not handle properly Formattable
// arguments; this code is a workaround for the problem.
@@ -452,6 +453,7 @@
* @see #hashCode()
* @see java.util.Hashtable
*/
+ @Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
@@ -468,6 +470,7 @@
* @see java.lang.Object#equals(java.lang.Object)
* @see java.util.Hashtable
*/
+ @Override
public int hashCode() {
int result;
result = 31 * toString().hashCode();
@@ -477,24 +480,13 @@
// TODO: remove this code once the JDK issue referenced in 3077 is closed.
/**
- * Returns whether we are running post 1.5 on AIX or not.
- * @return <CODE>true</CODE> if we are running post 1.5 on AIX and
+ * Returns whether we are running on AIX or not.
+ * @return <CODE>true</CODE> if we are running on AIX and
* <CODE>false</CODE> otherwise.
*/
- private boolean isAIXPost5()
+ private boolean isAIX()
{
- boolean isJDK15 = false;
- try
- {
- String javaRelease = System.getProperty ("java.version");
- isJDK15 = javaRelease.startsWith("1.5");
- }
- catch (Throwable t)
- {
- System.err.println("Cannot get the java version: " + t);
- }
- boolean isAIX = "aix".equalsIgnoreCase(System.getProperty("os.name"));
- return !isJDK15 && isAIX;
+ return "aix".equalsIgnoreCase(System.getProperty("os.name"));
}
}
--
Gitblit v1.10.0