Closed wnreynoldsWork closed 4 years ago
ugh -seems pom was corrupted. I used the same pom dependencies from the uom demos with tag 2.0-EDR.
Did you use the 2.0-SNAPSHOT or 1.x releases for this? 0.9 is not recent enough, but we maintain both a 1.x version (based on JSR 363) and a 2.x version using JSR 385.
Attached is the pom I used, this was taken from the 2.0-EDR tag in the uom-demos repository in github.
I will be happy to try with the 2.0-SNAPSHOT, if you could provide a set of dependencies, I don't see that tag in any of the github repos, further its not obvious how the versions of the various dependencies interact, so I used the dependencies specified in the demos.
On 7/29/2019 3:54 AM, Werner Keil wrote:
Did you use the 2.0-SNAPSHOT or 1.x releases for this?
— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/unitsofmeasurement/uom-systems/issues/144?email_source=notifications&email_token=AH2VORD72MZFLHKLPGU7ZUTQB2435A5CNFSM4IHHUVXKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3AGU4A#issuecomment-515926640, or mute the thread https://github.com/notifications/unsubscribe-auth/AH2VORF6U7VZKPZK3W5IQ4DQB2435ANCNFSM4IHHUVXA.
-- William Reynolds, Ph.D. Stellar Science, LLC wnreynolds@stellarscience.com www.stellarscience.com 877-763-8268 x710 (v)
Just an update, I have tested with the attached pom, which is based on the 2.0-EDR tag of the pom for the ucum-console-demos at https://github.com/unitsofmeasurement/uom-demos/blob/2.0-EDR/console/systems/ucum/pom.xml. https://github.com/unitsofmeasurement/uom-demos/blob/2.0-EDR/console/systems/ucum/pom.xml I generated the effective pom from the ucum-demos module in netbeans and C&P that into this pom. The output exhibits the bug:
m3 dimension =[L]³ ft3 dimension =[M]³
On 7/29/2019 3:54 AM, Werner Keil wrote:
Did you use the 2.0-SNAPSHOT or 1.x releases for this?
— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/unitsofmeasurement/uom-systems/issues/144?email_source=notifications&email_token=AH2VORD72MZFLHKLPGU7ZUTQB2435A5CNFSM4IHHUVXKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3AGU4A#issuecomment-515926640, or mute the thread https://github.com/notifications/unsubscribe-auth/AH2VORF6U7VZKPZK3W5IQ4DQB2435ANCNFSM4IHHUVXA.
-- William Reynolds, Ph.D. Stellar Science, LLC wnreynolds@stellarscience.com www.stellarscience.com 877-763-8268 x710 (v)
/*
import java.util.List;
import javax.measure.format.UnitFormat; import javax.measure.spi.ServiceProvider; import javax.measure.spi.UnitFormatService;
/* */ public class FT3Bug {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
List<ServiceProvider> providers = ServiceProvider.available();
ServiceProvider ucumProvider = providers.get(0);
UnitFormatService ucumFormatService = ucumProvider.getUnitFormatService();
UnitFormat ucumFormatter = ucumFormatService.getUnitFormat("CS");
System.out.println("m3 dimension =" + ucumFormatter.parse("m3").getDimension());
System.out.println("ft3 dimension =" + ucumFormatter.parse("ft3").getDimension());
}
}
"ft3" is an illegal UCUM unit code, the correct one is "[cft_i]", see UCUMServiceDemo. The string you used seems to be parsed as "Femtoton", which is why you get the Mass
dimension.
The attached code prints out a dimension for 'ft3' as [M]^3. The versions were fetched using the attached pom.
Expected Output: m3 dimension =[L]³ ft3 dimension =[L]³
Actual Output: m3 dimension =[L]³ ft3 dimension =[M]³
// begin java code /*
import java.util.List;
import javax.measure.format.UnitFormat; import javax.measure.spi.ServiceProvider; import javax.measure.spi.UnitFormatService;
/* */ public class FT3Bug {
}
//begin pom <?xml version="1.0" encoding="UTF-8"?>