You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by pa...@apache.org on 2016/09/25 19:01:47 UTC

[1/4] [lang] CharEncoding: fix dead link in class javadoc

Repository: commons-lang
Updated Branches:
  refs/heads/master 5f4249e2e -> a04151819


CharEncoding: fix dead link in class javadoc


Project: http://git-wip-us.apache.org/repos/asf/commons-lang/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-lang/commit/a0415181
Tree: http://git-wip-us.apache.org/repos/asf/commons-lang/tree/a0415181
Diff: http://git-wip-us.apache.org/repos/asf/commons-lang/diff/a0415181

Branch: refs/heads/master
Commit: a04151819758fceb7f0cb855d279c9d46b2e9851
Parents: b10d58e
Author: pascalschumacher <pa...@gmx.net>
Authored: Sun Sep 25 20:53:56 2016 +0200
Committer: pascalschumacher <pa...@gmx.net>
Committed: Sun Sep 25 21:00:46 2016 +0200

----------------------------------------------------------------------
 src/main/java/org/apache/commons/lang3/CharEncoding.java | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-lang/blob/a0415181/src/main/java/org/apache/commons/lang3/CharEncoding.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/lang3/CharEncoding.java b/src/main/java/org/apache/commons/lang3/CharEncoding.java
index e749d02..7fe9296 100644
--- a/src/main/java/org/apache/commons/lang3/CharEncoding.java
+++ b/src/main/java/org/apache/commons/lang3/CharEncoding.java
@@ -30,7 +30,7 @@ import java.nio.charset.IllegalCharsetNameException;
  * Consult the release documentation for your implementation to see if any other encodings are supported.
  * </cite></p>
  *
- * @see <a href="http://download.oracle.com/javase/1.3/docs/guide/intl/encoding.doc.html">JRE character encoding names</a>
+ * @see <a href="http://docs.oracle.com/javase/6/docs/technotes/guides/intl/encoding.doc.html">JRE character encoding names</a>
  * @since 2.1
  */
 public class CharEncoding {
@@ -79,7 +79,6 @@ public class CharEncoding {
      */
     public static final String UTF_8 = "UTF-8";
 
-    //-----------------------------------------------------------------------
     /**
      * <p>Returns whether the named charset is supported.</p>
      *


[4/4] [lang] SystemUtilsTest: remove code run only on java 1.5 and below

Posted by pa...@apache.org.
SystemUtilsTest: remove code run only on java 1.5 and below


Project: http://git-wip-us.apache.org/repos/asf/commons-lang/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-lang/commit/8232c096
Tree: http://git-wip-us.apache.org/repos/asf/commons-lang/tree/8232c096
Diff: http://git-wip-us.apache.org/repos/asf/commons-lang/diff/8232c096

Branch: refs/heads/master
Commit: 8232c096cef785a2ba88a7324b882a7badb0af44
Parents: 5f4249e
Author: pascalschumacher <pa...@gmx.net>
Authored: Sun Sep 25 20:25:53 2016 +0200
Committer: pascalschumacher <pa...@gmx.net>
Committed: Sun Sep 25 21:00:46 2016 +0200

----------------------------------------------------------------------
 .../apache/commons/lang3/SystemUtilsTest.java   | 123 +------------------
 1 file changed, 5 insertions(+), 118 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-lang/blob/8232c096/src/test/java/org/apache/commons/lang3/SystemUtilsTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/lang3/SystemUtilsTest.java b/src/test/java/org/apache/commons/lang3/SystemUtilsTest.java
index 1c90564..bb6d12b 100644
--- a/src/test/java/org/apache/commons/lang3/SystemUtilsTest.java
+++ b/src/test/java/org/apache/commons/lang3/SystemUtilsTest.java
@@ -31,7 +31,6 @@ import static org.apache.commons.lang3.JavaVersion.JAVA_9;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
 
 import java.io.File;
@@ -114,61 +113,6 @@ public class SystemUtilsTest {
             assertFalse(SystemUtils.IS_JAVA_1_8);
             assertFalse(SystemUtils.IS_JAVA_1_9);
             assertFalse(SystemUtils.IS_JAVA_9);
-        } else if (javaVersion.startsWith("1.1")) {
-            assertTrue(SystemUtils.IS_JAVA_1_1);
-            assertFalse(SystemUtils.IS_JAVA_1_2);
-            assertFalse(SystemUtils.IS_JAVA_1_3);
-            assertFalse(SystemUtils.IS_JAVA_1_4);
-            assertFalse(SystemUtils.IS_JAVA_1_5);
-            assertFalse(SystemUtils.IS_JAVA_1_6);
-            assertFalse(SystemUtils.IS_JAVA_1_7);
-            assertFalse(SystemUtils.IS_JAVA_1_8);
-            assertFalse(SystemUtils.IS_JAVA_1_9);
-            assertFalse(SystemUtils.IS_JAVA_9);
-        } else if (javaVersion.startsWith("1.2")) {
-            assertFalse(SystemUtils.IS_JAVA_1_1);
-            assertTrue(SystemUtils.IS_JAVA_1_2);
-            assertFalse(SystemUtils.IS_JAVA_1_3);
-            assertFalse(SystemUtils.IS_JAVA_1_4);
-            assertFalse(SystemUtils.IS_JAVA_1_5);
-            assertFalse(SystemUtils.IS_JAVA_1_6);
-            assertFalse(SystemUtils.IS_JAVA_1_7);
-            assertFalse(SystemUtils.IS_JAVA_1_8);
-            assertFalse(SystemUtils.IS_JAVA_1_9);
-            assertFalse(SystemUtils.IS_JAVA_9);
-        } else if (javaVersion.startsWith("1.3")) {
-            assertFalse(SystemUtils.IS_JAVA_1_1);
-            assertFalse(SystemUtils.IS_JAVA_1_2);
-            assertTrue(SystemUtils.IS_JAVA_1_3);
-            assertFalse(SystemUtils.IS_JAVA_1_4);
-            assertFalse(SystemUtils.IS_JAVA_1_5);
-            assertFalse(SystemUtils.IS_JAVA_1_6);
-            assertFalse(SystemUtils.IS_JAVA_1_7);
-            assertFalse(SystemUtils.IS_JAVA_1_8);
-            assertFalse(SystemUtils.IS_JAVA_1_9);
-            assertFalse(SystemUtils.IS_JAVA_9);
-        } else if (javaVersion.startsWith("1.4")) {
-            assertFalse(SystemUtils.IS_JAVA_1_1);
-            assertFalse(SystemUtils.IS_JAVA_1_2);
-            assertFalse(SystemUtils.IS_JAVA_1_3);
-            assertTrue(SystemUtils.IS_JAVA_1_4);
-            assertFalse(SystemUtils.IS_JAVA_1_5);
-            assertFalse(SystemUtils.IS_JAVA_1_6);
-            assertFalse(SystemUtils.IS_JAVA_1_7);
-            assertFalse(SystemUtils.IS_JAVA_1_8);
-            assertFalse(SystemUtils.IS_JAVA_1_9);
-            assertFalse(SystemUtils.IS_JAVA_9);
-        } else if (javaVersion.startsWith("1.5")) {
-            assertFalse(SystemUtils.IS_JAVA_1_1);
-            assertFalse(SystemUtils.IS_JAVA_1_2);
-            assertFalse(SystemUtils.IS_JAVA_1_3);
-            assertFalse(SystemUtils.IS_JAVA_1_4);
-            assertTrue(SystemUtils.IS_JAVA_1_5);
-            assertFalse(SystemUtils.IS_JAVA_1_6);
-            assertFalse(SystemUtils.IS_JAVA_1_7);
-            assertFalse(SystemUtils.IS_JAVA_1_8);
-            assertFalse(SystemUtils.IS_JAVA_1_9);
-            assertFalse(SystemUtils.IS_JAVA_9);
         } else if (javaVersion.startsWith("1.6")) {
             assertFalse(SystemUtils.IS_JAVA_1_1);
             assertFalse(SystemUtils.IS_JAVA_1_2);
@@ -441,57 +385,7 @@ public class SystemUtilsTest {
 
     @Test
     public void testIsJavaVersionAtLeat() throws Exception {
-        if (SystemUtils.IS_JAVA_1_1) {
-            assertTrue(SystemUtils.isJavaVersionAtLeast(JAVA_1_1));
-            assertFalse(SystemUtils.isJavaVersionAtLeast(JAVA_1_2));
-            assertFalse(SystemUtils.isJavaVersionAtLeast(JAVA_1_3));
-            assertFalse(SystemUtils.isJavaVersionAtLeast(JAVA_1_4));
-            assertFalse(SystemUtils.isJavaVersionAtLeast(JAVA_1_5));
-            assertFalse(SystemUtils.isJavaVersionAtLeast(JAVA_1_6));
-            assertFalse(SystemUtils.isJavaVersionAtLeast(JAVA_1_7));
-            assertFalse(SystemUtils.isJavaVersionAtLeast(JAVA_1_8));
-            assertFalse(SystemUtils.isJavaVersionAtLeast(JAVA_9));
-        } else if (SystemUtils.IS_JAVA_1_2) {
-            assertTrue(SystemUtils.isJavaVersionAtLeast(JAVA_1_1));
-            assertTrue(SystemUtils.isJavaVersionAtLeast(JAVA_1_2));
-            assertFalse(SystemUtils.isJavaVersionAtLeast(JAVA_1_3));
-            assertFalse(SystemUtils.isJavaVersionAtLeast(JAVA_1_4));
-            assertFalse(SystemUtils.isJavaVersionAtLeast(JAVA_1_5));
-            assertFalse(SystemUtils.isJavaVersionAtLeast(JAVA_1_6));
-            assertFalse(SystemUtils.isJavaVersionAtLeast(JAVA_1_7));
-            assertFalse(SystemUtils.isJavaVersionAtLeast(JAVA_1_8));
-            assertFalse(SystemUtils.isJavaVersionAtLeast(JAVA_9));
-        } else if (SystemUtils.IS_JAVA_1_3) {
-            assertTrue(SystemUtils.isJavaVersionAtLeast(JAVA_1_1));
-            assertTrue(SystemUtils.isJavaVersionAtLeast(JAVA_1_2));
-            assertTrue(SystemUtils.isJavaVersionAtLeast(JAVA_1_3));
-            assertFalse(SystemUtils.isJavaVersionAtLeast(JAVA_1_4));
-            assertFalse(SystemUtils.isJavaVersionAtLeast(JAVA_1_5));
-            assertFalse(SystemUtils.isJavaVersionAtLeast(JAVA_1_6));
-            assertFalse(SystemUtils.isJavaVersionAtLeast(JAVA_1_7));
-            assertFalse(SystemUtils.isJavaVersionAtLeast(JAVA_1_8));
-            assertFalse(SystemUtils.isJavaVersionAtLeast(JAVA_9));
-        } else if (SystemUtils.IS_JAVA_1_4) {
-            assertTrue(SystemUtils.isJavaVersionAtLeast(JAVA_1_1));
-            assertTrue(SystemUtils.isJavaVersionAtLeast(JAVA_1_2));
-            assertTrue(SystemUtils.isJavaVersionAtLeast(JAVA_1_3));
-            assertTrue(SystemUtils.isJavaVersionAtLeast(JAVA_1_4));
-            assertFalse(SystemUtils.isJavaVersionAtLeast(JAVA_1_5));
-            assertFalse(SystemUtils.isJavaVersionAtLeast(JAVA_1_6));
-            assertFalse(SystemUtils.isJavaVersionAtLeast(JAVA_1_7));
-            assertFalse(SystemUtils.isJavaVersionAtLeast(JAVA_1_8));
-            assertFalse(SystemUtils.isJavaVersionAtLeast(JAVA_9));
-        } else if (SystemUtils.IS_JAVA_1_5) {
-            assertTrue(SystemUtils.isJavaVersionAtLeast(JAVA_1_1));
-            assertTrue(SystemUtils.isJavaVersionAtLeast(JAVA_1_2));
-            assertTrue(SystemUtils.isJavaVersionAtLeast(JAVA_1_3));
-            assertTrue(SystemUtils.isJavaVersionAtLeast(JAVA_1_4));
-            assertTrue(SystemUtils.isJavaVersionAtLeast(JAVA_1_5));
-            assertFalse(SystemUtils.isJavaVersionAtLeast(JAVA_1_6));
-            assertFalse(SystemUtils.isJavaVersionAtLeast(JAVA_1_7));
-            assertFalse(SystemUtils.isJavaVersionAtLeast(JAVA_1_8));
-            assertFalse(SystemUtils.isJavaVersionAtLeast(JAVA_9));
-        } else if (SystemUtils.IS_JAVA_1_6) {
+        if (SystemUtils.IS_JAVA_1_6) {
             assertTrue(SystemUtils.isJavaVersionAtLeast(JAVA_1_1));
             assertTrue(SystemUtils.isJavaVersionAtLeast(JAVA_1_2));
             assertTrue(SystemUtils.isJavaVersionAtLeast(JAVA_1_3));
@@ -614,21 +508,14 @@ public class SystemUtilsTest {
 
     @Test
     public void testJavaAwtHeadless() {
-        final boolean atLeastJava14 = SystemUtils.isJavaVersionAtLeast(JAVA_1_4);
         final String expectedStringValue = System.getProperty("java.awt.headless");
         final String expectedStringValueWithDefault = System.getProperty("java.awt.headless", "false");
         assertNotNull(expectedStringValueWithDefault);
-        if (atLeastJava14) {
-            final boolean expectedValue = Boolean.valueOf(expectedStringValue).booleanValue();
-            if (expectedStringValue != null) {
-                assertEquals(expectedStringValue, SystemUtils.JAVA_AWT_HEADLESS);
-            }
-            assertEquals(expectedValue, SystemUtils.isJavaAwtHeadless());
-        } else {
-            assertNull(expectedStringValue);
-            assertNull(SystemUtils.JAVA_AWT_HEADLESS);
-            assertEquals(expectedStringValueWithDefault, "" + SystemUtils.isJavaAwtHeadless());
+        final boolean expectedValue = Boolean.valueOf(expectedStringValue).booleanValue();
+        if (expectedStringValue != null) {
+            assertEquals(expectedStringValue, SystemUtils.JAVA_AWT_HEADLESS);
         }
+        assertEquals(expectedValue, SystemUtils.isJavaAwtHeadless());
         assertEquals(expectedStringValueWithDefault, "" + SystemUtils.isJavaAwtHeadless());
     }
 }


[2/4] [lang] NumberUtilsTest#testLANG1252 fix spelling in comment

Posted by pa...@apache.org.
NumberUtilsTest#testLANG1252 fix spelling in comment


Project: http://git-wip-us.apache.org/repos/asf/commons-lang/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-lang/commit/c6a410ad
Tree: http://git-wip-us.apache.org/repos/asf/commons-lang/tree/c6a410ad
Diff: http://git-wip-us.apache.org/repos/asf/commons-lang/diff/c6a410ad

Branch: refs/heads/master
Commit: c6a410adf832e0e6eeee824365b1c5799bfc1391
Parents: 8232c09
Author: pascalschumacher <pa...@gmx.net>
Authored: Sun Sep 25 20:29:24 2016 +0200
Committer: pascalschumacher <pa...@gmx.net>
Committed: Sun Sep 25 21:00:46 2016 +0200

----------------------------------------------------------------------
 src/test/java/org/apache/commons/lang3/math/NumberUtilsTest.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-lang/blob/c6a410ad/src/test/java/org/apache/commons/lang3/math/NumberUtilsTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/lang3/math/NumberUtilsTest.java b/src/test/java/org/apache/commons/lang3/math/NumberUtilsTest.java
index c3d83c6..ef313e1 100644
--- a/src/test/java/org/apache/commons/lang3/math/NumberUtilsTest.java
+++ b/src/test/java/org/apache/commons/lang3/math/NumberUtilsTest.java
@@ -1297,7 +1297,7 @@ public class NumberUtilsTest {
 
     @Test
     public void testLANG1252() {
-        //Check idiosyncries between java 1.6 and 1.7,1.8 redarding leading + signs
+        //Check idiosyncrasies between java 1.6 and 1.7, 1.8 regarding leading + signs
         if (SystemUtils.IS_JAVA_1_6) {
             compareIsCreatableWithCreateNumber("+2", false);
         } else {


[3/4] [lang] CharEncoding#isSupported fix dead link in javadoc

Posted by pa...@apache.org.
CharEncoding#isSupported fix dead link in javadoc


Project: http://git-wip-us.apache.org/repos/asf/commons-lang/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-lang/commit/b10d58ec
Tree: http://git-wip-us.apache.org/repos/asf/commons-lang/tree/b10d58ec
Diff: http://git-wip-us.apache.org/repos/asf/commons-lang/diff/b10d58ec

Branch: refs/heads/master
Commit: b10d58ece8657de1b132cbe2c766bc25f1fd2986
Parents: c6a410a
Author: pascalschumacher <pa...@gmx.net>
Authored: Sun Sep 25 20:40:44 2016 +0200
Committer: pascalschumacher <pa...@gmx.net>
Committed: Sun Sep 25 21:00:46 2016 +0200

----------------------------------------------------------------------
 src/main/java/org/apache/commons/lang3/CharEncoding.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-lang/blob/b10d58ec/src/main/java/org/apache/commons/lang3/CharEncoding.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/lang3/CharEncoding.java b/src/main/java/org/apache/commons/lang3/CharEncoding.java
index ea68284..e749d02 100644
--- a/src/main/java/org/apache/commons/lang3/CharEncoding.java
+++ b/src/main/java/org/apache/commons/lang3/CharEncoding.java
@@ -84,7 +84,7 @@ public class CharEncoding {
      * <p>Returns whether the named charset is supported.</p>
      *
      * <p>This is similar to <a
-     * href="http://download.oracle.com/javase/1.4.2/docs/api/java/nio/charset/Charset.html#isSupported%28java.lang.String%29">
+     * href="http://docs.oracle.com/javase/6/docs/api/java/nio/charset/Charset.html#isSupported%28java.lang.String%29">
      * java.nio.charset.Charset.isSupported(String)</a> but handles more formats</p>
      *
      * @param name  the name of the requested charset; may be either a canonical name or an alias, null returns false