You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2022/03/08 15:30:43 UTC

[commons-lang] branch master updated (0013a99 -> 38285a1)

This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/commons-lang.git.


    from 0013a99  Fix Checkstyle issue.
     new 07b78ca  Better parameter name.
     new 38285a1  Use ternary expression.

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 src/main/java/org/apache/commons/lang3/JavaVersion.java | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

[commons-lang] 01/02: Better parameter name.

Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-lang.git

commit 07b78ca38dca8a1fb6f8a0012552c9313fd2670a
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Tue Mar 8 10:25:58 2022 -0500

    Better parameter name.
---
 src/main/java/org/apache/commons/lang3/JavaVersion.java | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/main/java/org/apache/commons/lang3/JavaVersion.java b/src/main/java/org/apache/commons/lang3/JavaVersion.java
index 9e8908f..770e2a6 100644
--- a/src/main/java/org/apache/commons/lang3/JavaVersion.java
+++ b/src/main/java/org/apache/commons/lang3/JavaVersion.java
@@ -208,13 +208,13 @@ public enum JavaVersion {
      * corresponding constant of this enumeration class. This method is used
      * internally.
      *
-     * @param nom the Java version as string
+     * @param versionStr the Java version as string
      * @return the corresponding enumeration constant or <b>null</b> if the
      * version is unknown
      */
     // helper for static importing
-    static JavaVersion getJavaVersion(final String nom) {
-        return get(nom);
+    static JavaVersion getJavaVersion(final String versionStr) {
+        return get(versionStr);
     }
 
     /**

[commons-lang] 02/02: Use ternary expression.

Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-lang.git

commit 38285a15f5a8ffdb62d86a3461266f064231e338
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Tue Mar 8 10:30:39 2022 -0500

    Use ternary expression.
---
 src/main/java/org/apache/commons/lang3/JavaVersion.java | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/src/main/java/org/apache/commons/lang3/JavaVersion.java b/src/main/java/org/apache/commons/lang3/JavaVersion.java
index 770e2a6..2493951 100644
--- a/src/main/java/org/apache/commons/lang3/JavaVersion.java
+++ b/src/main/java/org/apache/commons/lang3/JavaVersion.java
@@ -303,10 +303,7 @@ public enum JavaVersion {
      */
     private static float maxVersion() {
         final float v = toFloatVersion(System.getProperty("java.specification.version", "99.0"));
-        if (v > 0) {
-            return v;
-        }
-        return 99f;
+        return v > 0 ? v : 99f;
     }
 
     /**