Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Werner Keil
    @keilw
    Looks odd. AbstractUnit already tries to return the actual type via reflection. I created a task unitsofmeasurement/indriya#8 in the new Indriya prototype.
    The constructor of BaseUnit has an additional argument Q, but I see no realistic way to pass that when constructing the class, nor to retrieve it later. Using the Class maybe, that's already done in other places like unit systems.
    Werner Keil
    @keilw
    JSR 385 was approved earlier this week: https://jcp.org/en/jsr/detail?id=385
    Thodoris Bais
    @thodorisbais
    Hello!
    it's the first try I try to clean install and I'm getting this failure:
    Fatal error compiling: invalid flag: --release
    Has anybody experienced it in the past? Or shall I indeed spend time on it cuz it should compile as is
    ?
    Thodoris Bais
    @thodorisbais
    (I have also not used any jdk>8 till now)
    Werner Keil
    @keilw
    Which JDK did you use here? It works with 9 and above but the API is backward compatible with at least Java 8 in V2.
    Thodoris Bais
    @thodorisbais
    That's what I also thought, that I should download jdk 9
    But in the oracle page I only see jdk 11 (when it comes to jdk downloads above 8). Am I left that behind? :P
    Thodoris Bais
    @thodorisbais
    It wasn't only my old JDK (8). After upgrading to JDK 11, I had to also update my IntelliJ to the latest (2018.2.5) in order to have a successful build. My tests are still failing, but I will investigate this further soon (probably not next weekend, since we have the Glbal Day of Coderetreat here in Utrecht :) )
    Daniel Dias
    @Daniel-Dos
    Hi ,
    How strange that. here in my is working good with JDK 11.
    Thodoris Bais
    @thodorisbais
    So, @Daniel-Dos , mvn clean install is running successfully for you?
    Daniel Dias
    @Daniel-Dos

    Hi @thodorisbais , sorry for delay in response.

    I forgot to update the unit-api jacoco, so it is not compiled with jdk11.

    Thodoris Bais
    @thodorisbais
    Hey Daniel, I'd like to help there, so that I can learn faster ;)
    is it just about updating the dependency's version
    ?
    Daniel Dias
    @Daniel-Dos
    You can still compile with mvn clean install, but you will have 1 or 2 unit tests failing.
    @thodorisbais yes, just update from 0.8.1 to 0.8.2 .
    in this you will find other issues with javadoc to update, same as the last PR of indriya.
    Thodoris Bais
    @thodorisbais
    @Daniel-Dos oh, you're right, no JVM issues at all after updating the dependency! I'll commit it right now like that, and then we can close #148 !
    Daniel Dias
    @Daniel-Dos
    wonderful : )
    Thodoris Bais
    @thodorisbais
    wow, it's great to see it green after quite a bit of struggle, I learned something today, thanks @Daniel-Dos !
    #149 ready!
    Daniel Dias
    @Daniel-Dos
    How wonderful, how good I was able to help. : )
    Thodoris Bais
    @thodorisbais
    All, could someone help me on my JCP membership? It's been pending for more than 2 months now
    I've also been in touch with the admin mail group of jcp, but they also stopped responding to my mails after some time
    Beau Tremblay
    @trembb01

    Hello, I'm trying to use this api to manage material quantities. I'm trying to parse string units from a DB to a Unit. Can someone advise? I tried this approach, but it seems the ServiceProvider needs to be configured with services. Is there an easier approach to identifying a unit? In this case, I'm assuming it's mass but it could also be a volume.

        private void parseMeasurement() {
            if (available > 0 && availableUnit != null) {
                try {
                    UnitFormat format = ServiceProvider.current().getFormatService().getUnitFormat();
                    Unit<?> unit = format.parse(availableUnit);
                    if (unit.getSystemUnit() instanceof Mass) {
                        Quantity<?> mass = Quantities.getQuantity(available,unit);
                        massAvailProperty().set(mass);
                    } else {
                        log.debug("Unexpected unit {} is not a Mass", unit.getName());
                    }
                } catch (MeasurementParseException e) {
                    log.debug("Can't parse unit",e);
                }
            }
        }

    Thanks

    Petar Tahchiev
    @ptahchiev
    Is there a bom that lists all dependencies and I can import it in my pom.xml?
    Petar Tahchiev
    @ptahchiev
    So uom-lib-jackson is 2.0.1 and it also brings systems-ucum 2.0.1 but all other deps are 2.0.2
    Werner Keil
    @keilw
    That doesn't really matter they are compatible with each other, but you may use the 2.1 versions of most libraries already.
    Werner Keil
    @keilw
    https://github.com/unitsofmeasurement/uom-demos/blob/master/pom.xml is the closest thing to a BOM. Beside that there's the Parent POM https://github.com/unitsofmeasurement/uom-parent also in version 2.1.