commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aherb...@apache.org
Subject [commons-numbers] 08/08: Fraction: Use of(numerator) to construct the public constants.
Date Wed, 08 Apr 2020 21:17:26 GMT
This is an automated email from the ASF dual-hosted git repository.

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

commit 5768299d477dce8b72d4d28f93f2277256495981
Author: Alex Herbert <aherbert@apache.org>
AuthorDate: Wed Apr 8 22:14:43 2020 +0100

    Fraction: Use of(numerator) to construct the public constants.
---
 .../src/main/java/org/apache/commons/numbers/fraction/Fraction.java   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/commons-numbers-fraction/src/main/java/org/apache/commons/numbers/fraction/Fraction.java
b/commons-numbers-fraction/src/main/java/org/apache/commons/numbers/fraction/Fraction.java
index 7fc5c7e..8f41989 100644
--- a/commons-numbers-fraction/src/main/java/org/apache/commons/numbers/fraction/Fraction.java
+++ b/commons-numbers-fraction/src/main/java/org/apache/commons/numbers/fraction/Fraction.java
@@ -36,10 +36,10 @@ public final class Fraction
                NativeOperators<Fraction>,
                Serializable {
     /** A fraction representing "0". */
-    public static final Fraction ZERO = new Fraction(0, 1);
+    public static final Fraction ZERO = of(0);
 
     /** A fraction representing "1". */
-    public static final Fraction ONE = new Fraction(1, 1);
+    public static final Fraction ONE = of(1);
 
     /** Serializable version identifier. */
     private static final long serialVersionUID = 20190701L;


Mime
View raw message