From 315c8474d963a913e92ae1cceebcfe7e50f77cec Mon Sep 17 00:00:00 2001 From: Doug MacEachern Date: Tue, 18 Aug 2009 13:20:17 -0700 Subject: [PATCH] fix Mac SDK selection --- .../hyperic_jni/src/org/hyperic/jni/ArchNameTask.java | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/bindings/java/hyperic_jni/src/org/hyperic/jni/ArchNameTask.java b/bindings/java/hyperic_jni/src/org/hyperic/jni/ArchNameTask.java index e1c275d3..a8bd62f2 100644 --- a/bindings/java/hyperic_jni/src/org/hyperic/jni/ArchNameTask.java +++ b/bindings/java/hyperic_jni/src/org/hyperic/jni/ArchNameTask.java @@ -21,7 +21,6 @@ package org.hyperic.jni; import java.io.File; import java.io.FileFilter; import java.util.Arrays; -import java.util.Comparator; import org.apache.tools.ant.Task; import org.apache.tools.ant.BuildException; @@ -97,16 +96,11 @@ public class ArchNameTask extends Task { } }); if (sdks != null) { - Arrays.sort(sdks, new Comparator() { - public int compare(Object s1, Object s2) { - return (int)(((File)s2).lastModified() - - ((File)s1).lastModified()); - } - }); + Arrays.sort(sdks); final String prop = "uni.sdk"; String sdk = getProject().getProperty(prop); if (sdk == null) { - sdk = sdks[0].getPath(); + sdk = sdks[sdks.length-1].getPath(); getProject().setProperty(prop, sdk); } System.out.println("Using SDK=" + sdk);