[JAVAMONEY-164] Bulgarian Lev Wrong Currency Format Created: 16/Jul/16  Updated: 17/Jul/16

Status: Open
Project: javamoney
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: paranoiabla Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Hello,

doing this:

monetaryAmountFormatFactory.create(new Locale("bg_BG")).format(source);

produces лв.999.99 which is wrong. The correct display of Bulgarian money must be 999.99 лв..



 Comments   
Comment by keilw [ 17/Jul/16 ]

Thanks for spotting. Did you also try the JDK NumberFormat if that shows the same problem? In many cases aspects of the underlying JDK are used. Could you also share, which Java version you used and whether it was Moneta or Moneta-BP? (for Java 7 or earlier)

Comment by paranoiabla [ 17/Jul/16 ]

Hi,

I'm using org.javamoney:moneta with Java8:

java version "1.8.0_91"
Java(TM) SE Runtime Environment (build 1.8.0_91-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.91-b14, mixed mode)

I also tried this one:

        NumberFormat nf = NumberFormat.getCurrencyInstance(new Locale("bg_BG"));
        System.out.println(nf.format(12.00));

and the result is:

¤ 12.00




[JAVAMONEY-163] Get display name/symbol of a CurrencyUnit Created: 12/Jul/16  Updated: 12/Jul/16

Status: Open
Project: javamoney
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major
Reporter: paranoiabla Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Following this question here:

http://stackoverflow.com/questions/37869617/get-display-name-of-javax-money-currencyunit

I got not answer and I think it is impossible at the moment, that's why I want to propose an improvement. Given I have an instance of `CurrencyUnit` I'd like to know what the name of that currency in a specific locale is (for example "Euro", "Евро", "American US. Dollar", "Japanese Yen", etc). Also I'd like to get the symbol for that currency: $, €, etc..



 Comments   
Comment by keilw [ 12/Jul/16 ]

Other frameworks including the JDK with java.util.Currency, ICU4J or JodaMoney all treat both getDisplayName() and getSymbol() methods where available as Locale-sensitive. Even though a default variant of each method exists it is clearly expressed, those are convenience methods assuming the default Locale to be used.

Locale-sensitive formatting of CurrencyUnit is already done via MonetaryFormats and the RIs offer features like CurrencyStyle. Should we have focussed mostly on the MonetaryAmount then maybe either in the RIs or a future version of the API a separate CurrencyFormat similar to an equivalent in JSR 363 UnitFormat could be of use. I would try to avoid binding Locale directly into CurrencyUnit if possible even for a default or convenience method like getSymbol() though I could live with that, see JSR 363. However the symbol of 363 is more like getCurrencyCode(), the ISO 4217 currency code of a currency, and locale-neutral identifier. Only when you format the JSR 363 Unit another visualization of that unit may come into play, based on a locale in some cases.





[JAVAMONEY-160] equal can return false for the same CurrencyUnits Created: 19/Feb/16  Updated: 05/Jun/16

Status: Open
Project: javamoney
Component/s: Impl: RI
Affects Version/s: None
Fix Version/s: 1.1.1

Type: Bug Priority: Major
Reporter: walec51 Assignee: Unassigned
Resolution: Unresolved Votes: 2
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

I have one currency unit created from jackson-datatype-money deserialization and the other one from Monetary.getCurrency(locale). Both refer to USD but when I try to compare them using equal I get false.

This behavior is very surprising. The reason for this was that one MonetaryUnit was a BuildableCurrencyUnit and the other one was a JDKCurrencyAdapter and their equals implementations are not symmetrical.

JDKCurrencyAdapter has
if (obj instanceof CurrencyUnit) { ...

BuildableCurrencyUnit has
if (obj instanceof BuildableCurrencyUnit) { ...
this is wrong and it should be implemented as in JDKCurrencyAdapter



 Comments   
Comment by keilw [ 19/Feb/16 ]

Interesting, we may have a look into it (given both RIs are currently working on a maintenance pack it sounds like good timing) but keep in mind, e.g. Java's own Integer and BigInteger both created with the same value 1, 2 or any number never return true on equals() either. So it could be a "works as Java intended" case, but if there's a domain specific deviation we may accomplish here we'll give it a try.

Comment by tommy_ludwig [ 16/Mar/16 ]

I also have run into this problem comparing MonetaryAmount objects deserialized from JSON using jackson-datatype-money with ones instantiated using Money.of(number, currency). You can see a demonstration of this in JUnit tests in this gist. I understand the precedent of the Number classes, but two Money objects being compared should not return different values depending on the order of the equality check. The equals method states that it should be symmetric.

I think it is mostly a problem of usability and consistency. There are workarounds (Money#compareTo), but they make things a bit ugly and it is just too easy to use "the wrong thing" (in this case equals). Money#isEqualTo works if you know the currencies are the same or are okay handling the MonetaryException in case of mismatched currencies, but I don't know that and want to compare equality in a stream.

Comment by keilw [ 04/Jun/16 ]

@tommy_ludwig Please add a separate ticket for equals() and instances of MonetaryAmount we can't abuse this one for other classes or types. thanks.

Comment by keilw [ 04/Jun/16 ]

Seems this could also be related: https://github.com/JavaMoney/jsr354-ri/pull/134

Comment by tommy_ludwig [ 05/Jun/16 ]

@keilw I think that pull request may fix all of the mentioned problems, which I believe have the root cause mentioned in the description of this issue. My comment was adding more background/use cases that might run into this problem. I will be glad to test my use case once the pull request has been merged. If I find remaining/additional problems after that pull request change, I'll be sure to open new tickets. Thank you for looking into this.





Ensure, RI-BP is in sync (JAVAMONEY-124)

[JAVAMONEY-158] Ensure JApiCmp reports are comparable for Moneta and Moneta-BP Created: 18/Jan/16  Updated: 04/Jun/16

Status: Open
Project: javamoney
Component/s: Impl: RI
Affects Version/s: 1.1
Fix Version/s: 1.2

Type: Sub-task Priority: Major
Reporter: keilw Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags: design

 Description   

Using JApiCmp we have to ensure, the reports (including non-critical info or warning e.g. for added methods, etc.) are comparable or identical for Moneta and Moneta-BP.






[JAVAMONEY-156] Bootstrap should not sort in getService() Created: 04/Oct/15  Updated: 04/Jun/16

Status: Open
Project: javamoney
Component/s: API
Affects Version/s: 1.0
Fix Version/s: 1.1.1

Type: Bug Priority: Major
Reporter: keilw Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags: bootstrap, spi

 Description   

The SPI class Bootstrap currently sorts services by simple name when getService() is called. This is unnecessary, if any sorting was done, the implementation of ServiceProvider would take care of it.
Thus simply calling ServiceProvider.getService() should be enough.






[JAVAMONEY-155] make ConvertNumberValue public Created: 25/Sep/15  Updated: 27/Sep/15

Status: Open
Project: javamoney
Component/s: Impl: RI
Affects Version/s: 1.0
Fix Version/s: None

Type: Improvement Priority: Major
Reporter: msgilligan Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: 2 hours
Time Spent: Not Specified
Original Estimate: 2 hours


 Description   

When extending NumberValue, implementing numberValue(Class<T> numberType) and numberValueExact(Class<T> numberType) is non-trivial.

For those willing to add a dependency on the RI, it would be nice to be able to use the ConvertNumberValue enum. Can it be made public?



 Comments   
Comment by otaviojava [ 27/Sep/15 ]

I don't think it's the good idea:

  • This class is not the goal of the API
  • Once this class public we need to take care any refactoring, in other words, any improvements or change in this class it will slower.
  • To remove this class one day if public it will spend more time, one to deprecated it and then to finally remove it.
Comment by keilw [ 27/Sep/15 ]

Well the same goes for other RI elements like MonetaryUtil which was public and has to be restored, or if it was to stay in a similar form MonetaryOperators and other RI level public elements. I don't see if we add all sorts of stuff in a function package why this should not be available the same way.

Comment by msgilligan [ 27/Sep/15 ]

The problem is that any class implementing NumberValue is required to implement

<T extends Number> T numberValue(Class<T> numberType)

which is essentially a requirement to convert to any of the built-in number types. So every implementation is being forced to implement this functionality.

Perhaps making ConvertNumberValue isn't the best API or implementation to make public. But something should be provided by the RI and possibly even specified in a future version of the API. In fact, I'd go so far as to say that an arbitrary Number to Number conversion should be included in the JDK itself.

Comment by msgilligan [ 27/Sep/15 ]

The ideal solution might be something like this:

1. NumberValue (or a provided subclass) would require a no-parameters numberValue() method that would return a Number of the same type that getNumberType() returns. This would be the default or preferred representation of the internal type.

abstract public Number numberValue();

I'm not sure whether there would need to be a no-parameters version of numberValueExact or if we could safely assume that the preferred conversion would always be exact.

2. This provided abstract base class would provide an implementation of numberValue(Class<T> numberType) similar to:

public <T extends Number> T numberValue(Class<T> numberType) {
        return ConvertNumberValue.of(numberType, numberValue());
}

Summary

Implementing classes would provide a method to convert to the optimal standard Number type. The framework itself would provide the method that converts to any of the standard subtypes. This would make creating an implementation of NumberValue much easier as only a conversion to a single type would be required. In most cases I would imagine that type would be Long, BigInteger, or BigDecimal.





Make Moneta Modular (JAVAMONEY-137)

[JAVAMONEY-148] Analyze Dependencies Created: 27/Aug/15  Updated: 04/Jun/16

Status: Open
Project: javamoney
Component/s: Impl: RI
Affects Version/s: 1.0
Fix Version/s: 1.2

Type: Sub-task Priority: Major
Reporter: keilw Assignee: keilw
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags: dependencies, dependency

 Description   

To verify progress of the modularized code and compare it to the monolithic version, one or several dependency analysis tools shall be applied like:






[JAVAMONEY-146] RoundedMoney not immutable Created: 27/Aug/15  Updated: 04/Jun/16

Status: Reopened
Project: javamoney
Component/s: Impl: RI
Affects Version/s: 1.0
Fix Version/s: 1.2

Type: Improvement Priority: Major
Reporter: keilw Assignee: otaviojava
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags: test

 Description   

There's a warning by the TCK seemingly since 1.0 about RoundedMoney not being immutable:

Warning: found non immutable MonetaryAmountType: org.javamoney.moneta.RoundedMoney, details: 
Expected: org.javamoney.moneta.RoundedMoney to be IMMUTABLE
     but: org.javamoney.moneta.RoundedMoney is actually NOT_IMMUTABLE
    Reasons:
        Field can have an abstract type (javax.money.MonetaryRounding) assigned to it. [Field: rounding, Class: org.javamoney.moneta.RoundedMoney]
        The 'this' reference is passed outwith the constructor. [Class: org.javamoney.moneta.RoundedMoney]
        The 'this' reference is passed outwith the constructor. [Class: org.javamoney.moneta.RoundedMoney]
        The 'this' reference is passed outwith the constructor. [Class: org.javamoney.moneta.RoundedMoney]
        The 'this' reference is passed outwith the constructor. [Class: org.javamoney.moneta.RoundedMoney]
    Allowed reasons:
        Field can have an abstract type (javax.money.CurrencyUnit) assigned to it. [Field: currency, Class: org.javamoney.moneta.RoundedMoney]
        Field can have an abstract type (javax.money.CurrencyUnit) assigned to it. [Field: currency, Class: org.javamoney.moneta.RoundedMoney]
        Field can have an abstract type (javax.money.MonetaryOperator) assigned to it. [Field: rounding, Class: org.javamoney.moneta.RoundedMoney]

Is there a reason for it being not immutable, or can this be addressed?



 Comments   
Comment by otaviojava [ 27/Aug/15 ]

It's talking of the Monetary Operator that could be a mutable type, it's looking just to the interface.
But don't worry, the implementations are immutables and I checked again the RoundedMoney. It's immutable.

Comment by keilw [ 28/Aug/15 ]

The message refers to other issues, especially this used outside the constructor of RoundedMoney in places the add() method:

MoneyUtils.checkAmountParameter(amount, this.currency);

Let's fix it so hopefully all warnings go away.

Comment by otaviojava [ 28/Aug/15 ]

Thanks Werner by the information.
I am looking it so or do you are fixing it?





[JAVAMONEY-144] Resolve License issue with Eclipse Created: 23/Aug/15  Updated: 07/Feb/16

Status: Open
Project: javamoney
Component/s: API
Affects Version/s: 1.0
Fix Version/s: 1.x

Type: Task Priority: Major
Reporter: keilw Assignee: atsticks
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Relates
relates to UNITSOFMEASUREMENT-64 Make JSR available to Eclipse Orbit Resolved
Tags: Eclipse, MREL, license

 Description   

Due to a different understanding of what API vs. Implementation is by Eclipse Foundation, there's a blocking issue based on the current LICENSE files in Money-API or Money-API-BP, see https://java.net/jira/browse/UNITSOFMEASUREMENT-64
This Bugzilla ticket lines out the problem for a downstream Eclipse project (SmartHome) wanting to use JSR 363:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=434006

There is no request to add JSR 354 to Orbit at this point, but several business-related projects like Scout may benefit from it quite a lot.

This would require a change in the LICENSE file of both APIs, thus it is impossible to "just throw it in", if done, it must be under a MR.






[JAVAMONEY-143] JavaMoney TCK Usage Example results differ from TCKRunner Created: 29/Jul/15  Updated: 04/Jun/16

Status: Open
Project: javamoney
Component/s: Test: TCK
Affects Version/s: 1.0
Fix Version/s: 1.2

Type: Bug Priority: Major
Reporter: keilw Assignee: keilw
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Blocks
blocks JAVAMONEY-141 Pass TCK Resolved
Tags: tck-red, test, testing

 Description   

When trying to run the SE 8 variant of TCK Usage Example (https://github.com/JavaMoney/javamoney-tck-usage-example) against different approaches to modularizing the RI, it occured the example project always keeps running just one version of the TCK and (probably worse) also does not seem to switch the TCK from Moneta-BP to Moneta.

Running java org.javamoney.tck.TCKRunner as suggested directly from the TCK produces a different result than running the TCK Example.

It feels changing

<impl.version>1.0</impl.version>

or other aspects of the implementation details in the POM has no effect on which implementation is actually used. The TCK 1.0 deployed to MavenCentral/JCenter (or a copy in your local Maven repo) seems to be used regardless of implementation details. Even if another TCK version (like "1.0.1-SNAPSHOT" or similar) is available in the local Maven repo and "org.javamoney.tck.version" adjusted accordingly the TCK Usage example seems to ignore that and shows all tests pass, while running java org.javamoney.tck.TCKRunner against the same implementation produces different results.



 Comments   
Comment by keilw [ 29/Jul/15 ]

Adjusting dependencies to a version of Moneta with sub-modules, Maven dependencies look like the version is picked up correctly, and there all 233 TCK tests pass. Running TCKRunner from the TCK project directly causes 11 tests to fail when Moneta is not in a single JAR.
That discrepancy should be resolved, The test does in fact simply call

 TCKRunner.main(new String[0]);

so it looks like a difference in class-loading of relevant modules through Maven starting unit tests and a command line or batch calling TCKRunner. Even though at compile-time there is no error or missing dependency.

Another key difference to analyze is TCKTestSetup.getMonetaryOperators4Test() which only references 2 instead of 10 instances of MonetaryOperator. Tweaking that within the TCK should show, if this difference in test configuration affects the result or it's mainly the way TCKRunnner is called.

Comment by keilw [ 31/Jul/15 ]

Similar to https://github.com/unitsofmeasurement/uom-tools TCKRunner might implement javax.tools.Tool instead of the main method.

/* (non-Javadoc)
 * @see javax.tools.Tool#run(java.io.InputStream, java.io.OutputStream, java.io.OutputStream, java.lang.String[])
 */
@Override
public int run(InputStream in, OutputStream out, OutputStream err,
			String... arguments) {

Allowing it to be called like

Tool tckRunner = new TCKRunner();
int errorCode = tckRunner.run(System.in, System.out, System.err, args);
if (errorCode == 0) {
    System.out.println("Success.");
} else {
    System.err.println("Error.");
}




Make Moneta Modular (JAVAMONEY-137)

[JAVAMONEY-140] Convert Module Created: 16/Jul/15  Updated: 18/Jan/16

Status: Open
Project: javamoney
Component/s: Impl: RI
Affects Version/s: None
Fix Version/s: 1.2

Type: Sub-task Priority: Major
Reporter: keilw Assignee: keilw
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to JAVAMONEY-141 Pass TCK Resolved

 Comments   
Comment by keilw [ 28/Jul/15 ]

Something went wrong here recently
A lot of good changes were "merged away" somehow. And convert-related classes in core again.
Need to fix otherwise true modularization won't work.

Comment by otaviojava [ 28/Jul/15 ]

@keliw
All changes proposed to modularization by public list was made and the TCK passed.
I believe it`s ok.

Comment by keilw [ 28/Jul/15 ]

No, the proposal was not about creating some rudimentary conversion providers, it was about true modularization of the conversion sub-system.
And "moneta" contains stuff that does not belong there.

Comment by keilw [ 28/Jul/15 ]

The mailing list was clear about

moneta-core (primarily root package, spi, loader and likely functional package which is also reused)
moneta-convert
moneta-convert-ecb
moneta-convert-imf
moneta-format

And moneta-convert did not mean just an "umbrella" POM, it means everything that lies under "moneta.internal.convert" and similar packages with dependency to javax.money.convert

Sorry for possible misconception, but that is true modularization, not just cutting a few pieces out.

Comment by otaviojava [ 28/Jul/15 ]

Please, check again.
There isn't this on email list.
There is a picture about it.
The main goal of this issue is split the exchange-rate.
I know it because I send the email and create the proposal.

Comment by keilw [ 28/Jul/15 ]

That was exactly from the mailing list.
And modularization means more than this. There will be more (even for too bloated parts like java.time, they might be thrown into some giant "core") of that in Jigsaw, and the aim was to create a jigsaw capable fully modular convert, meaning no dependency to javax.money.convert in core, allowing the conversion as a whole to be optional. Everything else makes no sense and would require to do it all again.

Comment by otaviojava [ 28/Jul/15 ]

Werner, this proposal was sent as first step.
If you want do this, please create a new proposal with these modification.

Comment by keilw [ 28/Jul/15 ]

Btw. this is wrong (also have chance to fix it) initializing a mandatory variable in a separate @Test

    @Test
    public void init() {
        provider = new ExchangeRateProviderMock();
    }

JUnit or TestNG don't guarantee in what order tests are executed, they may happen on separate threads in parallel which would cause NPEs.
Will move it to @Before or similar to fix this.

Comment by otaviojava [ 28/Jul/15 ]

Thanks, but don't worry I did it.

Comment by keilw [ 28/Jul/15 ]

Please do not commit to that branch while I'm fixing it

Comment by keilw [ 28/Jul/15 ]

The TCK gave errors because of circular dependencies e.g. the moneta "JAR" module defining convert stuff while then using convert again. Only one of the biggest problems.

Comment by otaviojava [ 28/Jul/15 ]

Werner, again
Don't commit in this branch, please, create own branch with your proposal.
There isn't circular dependency.

Comment by keilw [ 28/Jul/15 ]

The proper branch already exists. with clean modularization.
Tests in some "core" module show clearly they refer to ECBconversion or IMFConversion. As soon as dependencies are clarified and resolved these show what was wrong.

Last but not least each module must be an OSGi bundle, otherwise they are worthless for Jigsaw when it comes (there are already bridging projects, so a proper OSGi bundle will work as proper Jigsaw module, too)

Comment by otaviojava [ 28/Jul/15 ]

You can create a new branch using this branch as base.
To do this you can use the command:

git chechout -b new_branch
Comment by keilw [ 28/Jul/15 ]

long done

But the 2 branches must not build into the same snapshot, this way the dependencies are mixed up on JFrog

Comment by keilw [ 01/Aug/15 ]

@otavio your concerns about ECB or IMF may have good intentions, but they are without reason. These organizations bail out entire countries. Should Brazil due to current economic crisis go bankrupt like its neighbor Argentinia did before, the IMF will help them. Apache Foundation, Eclipse Foundation, Linux Foundation or even Oracle's Open Source efforts like OpenJDK are NGOs funded by a few big corporate donors (often to save taxes at least in the US ) Being ApacheCon speaker again this year, there similar to EclipseCon these NGOs report transparently on their budget, but usually we're talking in the range of 1 Mio. $ or a 7 digit amount at most. That's less than the interest IMF or ECB gets by large "problem children" like Greece each month!

They normally do this as transparent as possible. And public APIs like the ones we consume are part of that transparency. So it's in their DNA and highest interest to provide them. Occasional hacks by the likes of Anonymous, well, everyone who is exposed gets these today, even the White House or Pentagon.

Glassfish was practically disintegrated by Oracle, so the amount of donation both time and money by a few or just one big corporate donor is much more volatile than either of these economic institutions. Larry alone could pull the plug on OpenJDK at any time if he wanted, but there is not a single country that could destroy or stop the IMF, neither Greece nor the USA, though they probably have a certain stake bigger than others

Comment by otaviojava [ 01/Aug/15 ]

Werner, the proposal of one service be working. I know, but its not change the fact of we cannot provide the support to their service.

Comment by otaviojava [ 01/Aug/15 ]

Just moving this argument to here. once I believe it's important:

Werner.
Maybe you did a little confusion with physical module with logical module.

Example:
The Swing module is together physically, in the same folder (java.desktop), but on different logical module, in different package.

If you look to swing module, all classes are on the same physical module:

But we have different packages, in other words, different logical module:

  • javax.swing.border
  • javax.swing.colorchooser

The same thing will happen with javax.money, it stay together, all core, just there is logic module, it will split by package.
The initial proposal to split the core to the exchange rate is because neither we and OpenJDK team can't provide, support, ensure availability, perform maintenance, etc. on third service such IMF or ECB service.
So we will propose just the core to him, following the openjdk standard, using logical modules, in other words, just the core modularized by packages.

Referencies:

Comment by keilw [ 01/Aug/15 ]

Yes, so our "java.desktop" in Moneta is "moneta.convert". Which consists of

  • org.javamoney.moneta.convert
  • org.javamoney.moneta.internal.convert
  • org.javamoney.moneta.convert.ecb
  • org.javamoney.moneta.convert.imf

Plus a few classes e.g. in "spi" that in the near future should be moved to a proper package (since packages also allow version control like OSGi bundles if Jigsaw becomes usable reality)

like "java.desktop" can be used or not in Java 9, the whole conversion can be either used or left away.
In fact, since java.desktop also has AWT under the hood, moneta-convert is much more like AWT and the providers similar to Swing on top of that.
Oracle may not offer them separately in Java 9 because the number of pure AWT apps is too small or they just want people to use either Swing or JavaFX, but Swing is an extention to AWT and could be left out while pure "native" AWT apps would still run without it.

So the properly modularized branch does exactly what you mention, it offers 2 logical modules

  • core
  • convert
    Where the latter comes with sub-modules or built-in extensions, which in a future (not before Java 10 as it seems) version some of them could be optional.

As Anatole said, having absolutely none will not make sense, but users may chose between those two or others if we come across viable (Free and offered by an accepted global institution like IMF or ECB) alternatives by then. Maybe the "BRICS" countries do come up with their own system, but until that even provices an API I guess we'd at least see Java 9 Final or even 10

Comment by otaviojava [ 01/Aug/15 ]

Werner,
The logical module happen on split by package, qualified.
If we are submit with this dependency, include the exchange rate provider. The code is already done to it on the master.
I just doubt strongly the Java SE team will accept the implementation whose need internet and third service.

Comment by keilw [ 01/Aug/15 ]

The fully modulariized branch (based on the one you started ) https://github.com/JavaMoney/jsr354-ri/tree/properly_modularized_moneta has moneta-core without a single reference to javax.money.convert.
At least all Money types and their toString() helper refers to javax.money.format, thus it makes less sense to offer that as a module right now. Formatting while there are local specialties (e.g. Indian Cr. or Lkh JavaMoney DOES take care of, while OpenJDK still fails them ) rarely depends on regular updates like conversion. And if conversion was optional on the API level iit might even make it easier for persistent business-denying libraries like JodaMoney to implement JSR 354
JodaTime and JSR 310 are equaly business-denying since they lack basic features like a holiday calendar, something ICU4J got for ages...
This might require occasional updates from the internet, but hey, JodaTime offers updates almost every month for some TZ cosmetics or bug fixes

Comment by otaviojava [ 01/Aug/15 ]

Werner I mean, modularized looking to OpenJDK concert that I showed the code on last comment.
The OpenJDK does not use maven project.

Comment by keilw [ 01/Aug/15 ]

Otavio, I think while browsing the code of Java 9 you still don't get how Oracle aims to distribute and regularly update it .
Over the Internet

Should they have a problem with Convert as a whole, then making that modular and optional solves their problems even more or that of people who may be behind a strong, intrusive firewall (of course they would likely not even get the full Java 9 or 10 this way either )
Nobody bothered creating a JEP, so we talk about some Sci-fi possibility beyond Java 10 (if JEP isn't filed soon, it won't be 10 but 11 or 12!)
The feature branch for 1.0,1 is reality, and meets all requirements to be used either via a SP or at least MR (if Anatole and/or CS were to prefer that)

What's currently in master is broken and polluted anyway. The whole "Conversion Operator" stuff breaks proper modularity, that's why the properly modularized branch is the future and contains both, but cleanly separated into Core and Convert

Comment by keilw [ 01/Aug/15 ]

Gradle is Maven
They use exactly the same dependency mechanism and Mark Reinhold explicitely referred to Maven or MavenCentral, so do the specs for Jigsaw.
It must be compatible with Maven, Gradle and likely some even still use Ant/Ivy, so it's also using that.

Don't worry about Hg either, who knows what Java 10 or 11 will use by 2018 (that's the earliest a "jdk.money" module might be worth a thought from Oracle's perspective)

Comment by otaviojava [ 01/Aug/15 ]

Yes, you are right, we have no idea if the money go and when.
I believe, maybe, we just freeze this issue when it be really necessary.
Just stay the branch alive and rebasing with the master, when it and if be necessary will almost done. Do a code looking to speculation is not good.

Comment by keilw [ 01/Aug/15 ]

We don't have to release a 1.0.1 build any time soon either.
In fact, as it's no secret, Anatole is moving to a new company by the end of this month. And from an administrative point CS is the Spec Lead/Maintenance Lead, so unless there was a transition (similar to what Liferay just took over from Oracle with the Portlet Bridge ) or another company/individual joined as Co ML (that also happened, see Antoine with CDI before V2) we better wait till that is sorted out before even publishing a 1.0.1 version.
Unless there's a critical bug that would prevent users of 1.0 from doing their job.

For that the 1.0 branch is closest to the Final state and critical bug-fixes should be applied there or to a new branch off 1.0

Comment by otaviojava [ 01/Aug/15 ]

That's the point, we have stuff a lot on the master that include bug fixes, etc. I have more time to release the next version than Ubuntu, and Ubuntu is a S.O (the ubuntu release a version each six month).
I believe we need to run this process on parallel, mainly because we need to have a meeting with the OpenJDK team before. And just merge to master when necessary.
Make the monomodule stable is a really good stuff.





Make Moneta Modular (JAVAMONEY-137)

[JAVAMONEY-138] Core Module Created: 16/Jul/15  Updated: 18/Jan/16

Status: Open
Project: javamoney
Component/s: Impl: RI
Affects Version/s: None
Fix Version/s: 1.2

Type: Sub-task Priority: Major
Reporter: keilw Assignee: keilw
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified





[JAVAMONEY-137] Make Moneta Modular Created: 16/Jul/15  Updated: 04/Jun/16

Status: In Progress
Project: javamoney
Component/s: Impl: RI
Affects Version/s: 1.1
Fix Version/s: 1.2

Type: Task Priority: Major
Reporter: keilw Assignee: keilw
Resolution: Unresolved Votes: 0
Labels: None
Σ Remaining Estimate: Not Specified Remaining Estimate: Not Specified
Σ Time Spent: Not Specified Time Spent: Not Specified
Σ Original Estimate: Not Specified Original Estimate: Not Specified

Sub-Tasks:
Key
Summary
Type
Status
Assignee
JAVAMONEY-138 Core Module Sub-task Open keilw  
JAVAMONEY-139 Format Module Sub-task Resolved  
JAVAMONEY-140 Convert Module Sub-task Open keilw  
JAVAMONEY-141 Pass TCK Sub-task Resolved keilw  
JAVAMONEY-148 Analyze Dependencies Sub-task Open keilw  
Tags: modules

 Description   

Anticipating future Java versions beyond 9 (Jigsaw) Moneta (and Moneta BP which will be required as "standalone" RI even if some day one could be added to platform umbrella) we plan to break Moneta into smaller modules.

Especially the "convert" package, likely "format" and at least a "core" module underneath. Some of these modules may have companion modules, e.g. "convert" with default providers for ECB and IMF.






Generated at Sat Jul 23 11:17:32 UTC 2016 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.