arne-bdt commented on issue #2795: URL: https://github.com/apache/jena/issues/2795#issuecomment-2439731093
> Isn't this a separate issue? The problem of duplicate registration of datatypes is a bug regardless, correct? My intuition is to address this bug first and then discuss how datatype equality should ideally function in Jena. @Ostrzyciel `org.apache.jena.datatypes.TypeMapper#registerDatatype` behaves as documented: it registers the provided datatype and simply overrides any previously registered datatype with the same URI. I really prefer your approach, where it's possible to check if the registration was successful or continue with the previously registered datatype, but that would break the existing contract. This raises the question: Is it intentional for implementations of `RDFDatatype` not to override `#equals` and `#hashCode`? Should `RDFDatatypes` really be compared by reference only? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
