odftoolkit
odftoolkit copied to clipboard
refactor the OdfName class
- declare the class explicitly as final (it was effectively final before because it only has a private constructor)
- use a ConcurrentHashMap to avoid the need for explicit synchronization
- use computeIfAbsent() to avoid double key lookup
- fix equals() - the old implementation was not symmetric: an OdfName with string content "x" would be equal to the simple string "x", but the reverse comparison ("x".equals(OdfName "x") would yield not equal