Skip to content
This repository has been archived by the owner on Jan 18, 2022. It is now read-only.

Commit

Permalink
- Fixed javadoc errors.
Browse files Browse the repository at this point in the history
- Added release notes/refs.
- Release build.
  • Loading branch information
atsticks committed Apr 16, 2018
1 parent 0ea485d commit 45dbdf0
Show file tree
Hide file tree
Showing 49 changed files with 354 additions and 302 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ This repository contains the Java 7 compatible Moneta reference implementation.

This module is licenced under the the [Apache 2 Licence](https://www.apache.org/licenses/LICENSE-2.0.html).

Release Notes
-------------

* **[1.0](https://github.com/JavaMoney/jsr354-ri-bp/releases/tag/1.0)** Initial revision along the API.
* **[1.1](https://github.com/JavaMoney/jsr354-ri-bp/releases/tag/1.1)** First Patch release.
* **[1.2](https://github.com/JavaMoney/jsr354-ri-bp/releases/tag/1.2)** Minor Patch release.


[![Build Status](https://api.travis-ci.org/JavaMoney/jsr354-ri-bp.png?branch=master)](https://travis-ci.org/JavaMoney/jsr354-ri-bp) [![License](http://img.shields.io/badge/license-Apache2-red.svg)](http://opensource.org/licenses/apache-2.0)
[![Reference Status](https://www.versioneye.com/java/org.javamoney:moneta-bp/reference_badge.svg?style=flat)](https://www.versioneye.com/java/org.javamoney:moneta-bp/references)

Expand Down
205 changes: 140 additions & 65 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

<artifactId>moneta-bp</artifactId>
<packaging>bundle</packaging>
<version>1.1.1-SNAPSHOT</version>
<version>1.2</version>
<name>Moneta (JSR 354 RI) for Java 7</name>

<description>JSR 354 provides an API for representing, transporting, and performing comprehensive calculations with
Expand All @@ -36,7 +36,7 @@
</licenses>

<properties>
<jsr.version>1.0.1</jsr.version>
<jsr.version>1.0.3</jsr.version>
<jdkVersion>1.7</jdkVersion>
<maven.compile.targetLevel>${jdkVersion}</maven.compile.targetLevel>
<maven.compile.sourceLevel>${jdkVersion}</maven.compile.sourceLevel>
Expand Down Expand Up @@ -236,69 +236,6 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.github.siom79.japicmp</groupId>
<artifactId>japicmp-maven-plugin</artifactId>
<version>0.6.2</version>
<configuration>
<oldVersion>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>${project.artifactId}</artifactId>
<version>1.0</version>
<type>jar</type>
</dependency>
</oldVersion>
<newVersion>
<file>
<path>${project.build.directory}/${project.artifactId}-${project.version}.jar</path>
</file>
</newVersion>
<parameter>
<onlyModified>false</onlyModified>
<includes>
<include>org.javamoney.moneta</include>
<include>org.javamoney.moneta.convert</include>
<include>org.javamoney.moneta.format</include>
<include>org.javamoney.moneta.function</include>
<include>org.javamoney.moneta.spi</include>
</includes>
<excludes>
<exclude>org.javamoney.moneta.internal</exclude>
<exclude>org.javamoney.moneta.internal.convert</exclude>
<exclude>org.javamoney.moneta.internal.format</exclude>
<exclude>org.javamoney.moneta.internal.loader</exclude>
</excludes>
<accessModifier>protected</accessModifier>
<breakBuildOnModifications>false</breakBuildOnModifications>
<breakBuildOnBinaryIncompatibleModifications>true</breakBuildOnBinaryIncompatibleModifications>
<onlyBinaryIncompatible>false</onlyBinaryIncompatible>
<includeSynthetic>false</includeSynthetic>
<ignoreMissingClasses>false</ignoreMissingClasses>
<skipPomModules>true</skipPomModules>
<!--<htmlStylesheet>path/to/stylesheet.css</htmlStylesheet>-->
<htmlTitle>JSR 354 - Java 7 RI Compatibility Report</htmlTitle>
<noAnnotations>false</noAnnotations>
<ignoreNonResolvableArtifacts>false</ignoreNonResolvableArtifacts>
</parameter>
<dependencies>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-math3</artifactId>
<version>3.4</version>
</dependency>
</dependencies>
<skip>false</skip>
</configuration>
<executions>
<execution>
<phase>verify</phase>
<goals>
<goal>cmp</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-site-plugin</artifactId>
<version>3.3</version>
Expand Down Expand Up @@ -557,5 +494,143 @@
</plugins>
</build>
</profile>
<profile>
<id>release-sign-artifacts</id>
<activation>
<property>
<name>performRelease</name>
<value>true</value>
</property>
</activation>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.4</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<configuration>
<defaultKeyring>false</defaultKeyring>
<keyname>11A1E4D6</keyname>
</configuration>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>compareapi</id>
<build>
<plugins>
<plugin>
<!-- this plugin requires the following maven opts to be set in Java 9 and beyond:
- -add-modules java.xml.bind -->
<groupId>com.github.siom79.japicmp</groupId>
<artifactId>japicmp-maven-plugin</artifactId>
<version>0.11.1</version>
<configuration>
<oldVersion>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>${project.artifactId}</artifactId>
<version>1.0</version>
<type>jar</type>
</dependency>
</oldVersion>
<newVersion>
<file>
<path>${project.build.directory}/${project.artifactId}-${project.version}.jar</path>
</file>
</newVersion>
<parameter>
<onlyModified>false</onlyModified>
<includes>
<include>org.javamoney.moneta</include>
<include>org.javamoney.moneta.convert</include>
<include>org.javamoney.moneta.format</include>
<include>org.javamoney.moneta.function</include>
<include>org.javamoney.moneta.spi</include>
</includes>
<excludes>
<exclude>org.javamoney.moneta.internal</exclude>
<exclude>org.javamoney.moneta.internal.convert</exclude>
<exclude>org.javamoney.moneta.internal.format</exclude>
<exclude>org.javamoney.moneta.internal.loader</exclude>
</excludes>
<accessModifier>protected</accessModifier>
<breakBuildOnModifications>false</breakBuildOnModifications>
<breakBuildOnBinaryIncompatibleModifications>true</breakBuildOnBinaryIncompatibleModifications>
<onlyBinaryIncompatible>false</onlyBinaryIncompatible>
<includeSynthetic>false</includeSynthetic>
<ignoreMissingClasses>false</ignoreMissingClasses>
<skipPomModules>true</skipPomModules>
<!--<htmlStylesheet>path/to/stylesheet.css</htmlStylesheet>-->
<htmlTitle>JSR 354 - Java 7 RI Compatibility Report</htmlTitle>
<noAnnotations>false</noAnnotations>
<ignoreNonResolvableArtifacts>false</ignoreNonResolvableArtifacts>
</parameter>
<dependencies>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-math3</artifactId>
<version>3.4</version>
</dependency>
<dependency>

</dependency>
</dependencies>
<skip>false</skip>
</configuration>
<executions>
<execution>
<phase>verify</phase>
<goals>
<goal>cmp</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
8 changes: 4 additions & 4 deletions src/main/java/org/javamoney/moneta/DefaultExchangeRate.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
* reversing a ExchangeRate one must access an {@link javax.money.convert.ExchangeRateProvider} and
* query for the reverse rate.</li>
* </ul>
* <p>
*
* The class also implements {@link Comparable} to allow sorting of multiple
* exchange rates using the following sorting order;
* <ul>
Expand All @@ -68,7 +68,7 @@
* <li>base currency</li>
* <li>term currency</li>
* </ul>
* <p>
*
* Finally ExchangeRate is modeled as an immutable and thread safe type. Also
* exchange rates are {@link java.io.Serializable}, hereby serializing in the following
* form and order:
Expand Down Expand Up @@ -209,11 +209,11 @@ public final List<ExchangeRate> getExchangeRateChain() {

/**
* Allows to evaluate if this exchange rate is a derived exchange rate.
* <p>
*
* Derived exchange rates are defined by an ordered list of subconversions
* with intermediate steps, whereas a direct conversion is possible in one
* steps.
* <p>
*
* This method always returns {@code true}, if the chain contains more than
* one rate. Direct rates, have also a chain, but with exact one rate.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
* Evaluates the default {@link MonetaryContext} to be used for {@link Money}.
* The default {@link MonetaryContext} can be configured by adding a file
* {@code /javamoney.properties} from the classpath with the following content:
* <p>
* <p>
*
*
* <pre>
* # Default MathContext for Money
* #-------------------------------
Expand All @@ -41,7 +41,7 @@
* org.javamoney.moneta.Money.defaults.precision=256
* org.javamoney.moneta.Money.defaults.roundingMode=HALF_EVEN
* </pre>
* <p>
*
* Hereby the roundingMode constants are the same as defined on
* {@link RoundingMode}.
*/
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/org/javamoney/moneta/ExchangeRateType.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
import javax.money.convert.ExchangeRateProviderSupplier;

/**
* <p>
*
* This enum contains all implementation of moneta. Using this enum will easier
* to choose an available implementation.
* </p>
* <code>ExchangeRateProvider provider = MonetaryConversions.getExchangeRateProvider(ExchangeRateType.ECB);<code>
*
* {@code ExchangeRateProvider provider = MonetaryConversions.getExchangeRateProvider(ExchangeRateType.ECB);}
*
* @author otaviojava
* @deprecated Use org.javamoney.moneta.convert.ExchangeRateType instead
Expand Down
20 changes: 10 additions & 10 deletions src/main/java/org/javamoney/moneta/FastMoney.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,47 +40,47 @@

/**
* <code>long</code> based implementation of {@link MonetaryAmount}.This class internally uses a
* single long number as numeric representation, which basically is interpreted as minor units.<p>
* single long number as numeric representation, which basically is interpreted as minor units.
* It suggested to have a performance advantage of a 10-15 times faster compared to {@link Money},
* which internally uses {@link BigDecimal}. Nevertheless this comes with a price of less precision.
* As an example performing the following calculation one million times, results in slightly
* different results:
* </p>
*
* <pre><code>
* Money money1 = money1.add(Money.of("EUR", 1234567.3444));
* money1 = money1.subtract(Money.of("EUR", 232323));
* money1 = money1.multiply(3.4);
* money1 = money1.divide(5.456);
* </code></pre>
* <p>
*
* Executed one million (1000000) times this results in {@code EUR 1657407.962529182}, calculated in
* 3680 ms, or roughly 3ns/loop.
* <p>
*
* whereas
* </p>
*
* <pre><code>
* FastMoney money1 = money1.add(FastMoney.of("EUR", 1234567.3444));
* money1 = money1.subtract(FastMoney.of("EUR", 232323));
* money1 = money1.multiply(3.4);
* money1 = money1.divide(5.456);
* </code></pre>
* <p>
*
* executed one million (1000000) times results in {@code EUR 1657407.96251}, calculated in 179 ms,
* which is less than 1ns/loop.
* </p><p>
*
* Also note than mixing up types may drastically change the performance behavior. E.g. replacing the
* code above with the following: *
* </p>
*
* <pre><code>
* FastMoney money1 = money1.add(Money.of("EUR", 1234567.3444));
* money1 = money1.subtract(FastMoney.of("EUR", 232323));
* money1 = money1.multiply(3.4);
* money1 = money1.divide(5.456);
* </code></pre>
* <p>
*
* executed one million (1000000) times may execute significantly longer, since monetary amount type
* conversion is involved.
* </p><p>
*
* Basically, when mixing amount implementations, the performance of the amount, on which most of
* the operations are operated, has the most significant impact on the overall performance behavior.
*
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/org/javamoney/moneta/Money.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,16 @@
/**
* Default immutable implementation of {@link MonetaryAmount} based
* on {@link BigDecimal} as numeric representation.
* <p>
*
* As required by {@link MonetaryAmount} this class is final, thread-safe,
* immutable and serializable.
* </p><p>
*
* This class can be configured with an arbitrary {@link MonetaryContext}. The
* default {@link MonetaryContext} used models by default the same settings as
* {@link MathContext#DECIMAL64} . This default {@link MonetaryContext} can also
* be reconfigured by adding a file {@code /javamoney.properties} to the
* classpath, with the following content:
* </p>
*
* <pre>
* # Default MathContext for Money
* #-------------------------------
Expand Down
Loading

0 comments on commit 45dbdf0

Please sign in to comment.