[jboss-svn-commits] JBoss Common SVN: r2239 - in common-old/branches/Branch_1_0: src/main/org/jboss/util/platform and 1 other directory.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Tue Jan 23 07:44:38 EST 2007
Author: dimitris at jboss.org
Date: 2007-01-23 07:44:38 -0500 (Tue, 23 Jan 2007)
New Revision: 2239
Modified:
common-old/branches/Branch_1_0/build.bat
common-old/branches/Branch_1_0/src/main/org/jboss/util/platform/Java.java
Log:
JBCOMMON-12 - Add jdk1.6 detection in org.jboss.util.platform.Java
Modified: common-old/branches/Branch_1_0/build.bat
===================================================================
--- common-old/branches/Branch_1_0/build.bat 2007-01-19 22:21:24 UTC (rev 2238)
+++ common-old/branches/Branch_1_0/build.bat 2007-01-23 12:44:38 UTC (rev 2239)
@@ -35,7 +35,7 @@
REM ******************************************************
set NAMES=tools;tools\ant;tools\apache\ant
-set SUBFOLDERS=..;..\..;..\..\..;..\..\..\..
+set SUBFOLDERS=.;..\..;..\..\..;..\..\..\..
REM ******************************************************
REM ******************************************************
Modified: common-old/branches/Branch_1_0/src/main/org/jboss/util/platform/Java.java
===================================================================
--- common-old/branches/Branch_1_0/src/main/org/jboss/util/platform/Java.java 2007-01-19 22:21:24 UTC (rev 2238)
+++ common-old/branches/Branch_1_0/src/main/org/jboss/util/platform/Java.java 2007-01-23 12:44:38 UTC (rev 2239)
@@ -1,24 +1,24 @@
/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.jboss.util.platform;
import org.jboss.util.ThrowableHandler;
@@ -32,11 +32,12 @@
*
* <p>Classes are loaded in the following order:
* <ol>
+ * <li><tt>java.lang.Void</tt> was introduced in JDK 1.1</li>
+ * <li><tt>java.lang.ThreadLocal</tt> was introduced in JDK 1.2</li>
+ * <li><tt>java.lang.StrictMath</tt> was introduced in JDK 1.3</li>
+ * <li><tt>java.lang.StackTraceElement</tt> was introduced in JDK 1.4</li>
* <li><tt>java.lang.Enum</tt> was introduced in JDK 1.5</li>
- * <li><tt>java.lang.StackTraceElement</tt> was introduced in JDK 1.4</li>
- * <li><tt>java.lang.StrictMath</tt> was introduced in JDK 1.3</li>
- * <li><tt>java.lang.ThreadLocal</tt> was introduced in JDK 1.2</li>
- * <li><tt>java.lang.Void</tt> was introduced in JDK 1.1</li>
+ * <li><tt>java.lang.management.LockInfo</tt> was introduced in JDK 1.6</li>
* </ol>
* </p>
*
@@ -67,6 +68,9 @@
/** Java version 1.5 token */
public static final int VERSION_1_5 = 0x06;
+ /** Java version 1.6 token */
+ public static final int VERSION_1_6 = 0x07;
+
/**
* Private to avoid over optimization by the compiler.
*
@@ -101,6 +105,10 @@
// check for 1.5
Class.forName("java.lang.Enum");
version = VERSION_1_5;
+
+ // check for 1.6
+ Class.forName("java.lang.management.LockInfo");
+ version = VERSION_1_6;
}
catch (ClassNotFoundException e)
{
More information about the jboss-svn-commits
mailing list