Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Wrong equals/hashcode for several numeric literals (mismatch with default impl) #13

Closed
sszuev opened this issue Mar 8, 2020 · 1 comment
Labels
bug Something isn't working

Comments

@sszuev
Copy link
Contributor

sszuev commented Mar 8, 2020

Not sure if this is a mistake/regression or is it due to recent changes in OWL-API.
Anyway it is a bug of ONT-API.
The testcase:

        OWLDataFactory owlapi = OntManagers.createOWL().getOWLDataFactory();
        DataFactory ontapi = OntManagers.getDataFactory();
        String value = "1922";
        OWL2Datatype dt = OWL2Datatype.XSD_POSITIVE_INTEGER;
        OWLLiteral x = owlapi.getOWLLiteral(value, dt);
        OWLLiteral z = ontapi.getOWLLiteral(value, dt);
        System.out.println(x.hashCode() + " ? " + z.hashCode());
        Assert.assertEquals(x, z);
@sszuev sszuev added the bug Something isn't working label Mar 8, 2020
sszuev added a commit that referenced this issue Mar 9, 2020
@sszuev
Copy link
Contributor Author

sszuev commented Mar 9, 2020

done

@sszuev sszuev closed this as completed Mar 9, 2020
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant