From 43b0b69b3e10ed18e7f00dd66d704a343499c3c9 Mon Sep 17 00:00:00 2001 From: Michael Fross Date: Sun, 21 Apr 2024 16:42:53 -0500 Subject: [PATCH] Corrected fraction display error. Updated mvn plugins If you just entered `frac` with a base, the title would display a blank base (`1/`) There were quite a few plugin versions that were updated in the pom file --- .idea/statistic.xml | 6 ++++ pom.xml | 34 ++++++++++++++++--- snap/snapcraft.yaml | 2 +- .../org/fross/rpncalc/StackConversions.java | 2 +- 4 files changed, 38 insertions(+), 6 deletions(-) create mode 100644 .idea/statistic.xml diff --git a/.idea/statistic.xml b/.idea/statistic.xml new file mode 100644 index 0000000..e7f4e89 --- /dev/null +++ b/.idea/statistic.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/pom.xml b/pom.xml index 3e24aa9..ae6e3c4 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ org.fross rpncalc - 5.2.4 + 5.2.5 jar rpncalc @@ -35,6 +35,7 @@ UTF-8 11 + 3.6.3 @@ -46,6 +47,31 @@ + + + + + + org.apache.maven.plugins + maven-enforcer-plugin + 3.4.1 + + + enforce-maven + + enforce + + + + + ${maven.minimum.version} + + + + + + + @@ -64,7 +90,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.12.1 + 3.13.0 ${maven.compiler.release} @@ -87,7 +113,7 @@ org.apache.maven.plugins maven-shade-plugin - 3.5.1 + 3.5.2 package @@ -182,7 +208,7 @@ org.codehaus.mojo exec-maven-plugin - 3.1.1 + 3.2.0 chmod diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 043cb6d..6450114 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -1,5 +1,5 @@ name: rpncalc -version: '5.2.4' +version: '5.2.5' summary: The command line Reverse Polish Notation (RPN) calculator description: | RPNCalc is an easy to use command line based Reverse Polish diff --git a/src/main/java/org/fross/rpncalc/StackConversions.java b/src/main/java/org/fross/rpncalc/StackConversions.java index 339e1ae..5d0dfca 100644 --- a/src/main/java/org/fross/rpncalc/StackConversions.java +++ b/src/main/java/org/fross/rpncalc/StackConversions.java @@ -187,7 +187,7 @@ public static String[] cmdFraction(StackObj calcStack, String param) { // Output the fractional display // If there is no fractional result, remove it, so we don't see '0/1' - String stackHeader = "-Fraction (Granularity: 1/" + (param) + ")"; + String stackHeader = "-Fraction (Granularity: 1/" + denominator + ")"; String result = integerPart + " " + ((numerator.compareTo(BigInteger.ZERO) == 0) ? "" : numerator + "/" + denominator); // Header Top