Skip to content

Commit

Permalink
Corrected fraction display error. Updated mvn plugins
Browse files Browse the repository at this point in the history
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
  • Loading branch information
frossm committed Apr 21, 2024
1 parent 68d103a commit 43b0b69
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 6 deletions.
6 changes: 6 additions & 0 deletions .idea/statistic.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

34 changes: 30 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<groupId>org.fross</groupId>
<artifactId>rpncalc</artifactId>
<version>5.2.4</version>
<version>5.2.5</version>
<packaging>jar</packaging>

<name>rpncalc</name>
Expand Down Expand Up @@ -35,6 +35,7 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.release>11</maven.compiler.release>
<maven.minimum.version>3.6.3</maven.minimum.version>
</properties>

<build>
Expand All @@ -46,6 +47,31 @@
</resources>

<plugins>
<plugin>
<!-- ========================================================================================== -->
<!-- Enforce a minimum version of Maven to build -->
<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-enforcer-plugin -->
<!-- ========================================================================================== -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.4.1</version>
<executions>
<execution>
<id>enforce-maven</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireMavenVersion>
<version>${maven.minimum.version}</version>
</requireMavenVersion>
</rules>
</configuration>
</execution>
</executions>
</plugin>

<plugin>
<!-- ========================================================================================== -->
<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-resources-plugin -->
Expand All @@ -64,7 +90,7 @@
<!-- ========================================================================================== -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.12.1</version>
<version>3.13.0</version>
<configuration>
<release>${maven.compiler.release}</release>
</configuration>
Expand All @@ -87,7 +113,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.5.1</version>
<version>3.5.2</version>
<executions>
<execution>
<phase>package</phase>
Expand Down Expand Up @@ -182,7 +208,7 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>3.1.1</version>
<version>3.2.0</version>
<executions>
<execution>
<id>chmod</id>
Expand Down
2 changes: 1 addition & 1 deletion snap/snapcraft.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/fross/rpncalc/StackConversions.java
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 43b0b69

Please sign in to comment.