[ https://issues.apache.org/jira/browse/JCRVLT-778?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Konrad Windszus updated JCRVLT-778: ----------------------------------- Component/s: Packaging > VersionRange.fromString("") does not return VersionRange.INFINITE > ----------------------------------------------------------------- > > Key: JCRVLT-778 > URL: https://issues.apache.org/jira/browse/JCRVLT-778 > Project: Jackrabbit FileVault > Issue Type: Bug > Components: Packaging > Reporter: Konrad Windszus > Assignee: Konrad Windszus > Priority: Major > > The constant {{VersionRange.INFINITE}} is defined as {{new VersionRange(null, > true, null, true);}} > (https://github.com/apache/jackrabbit-filevault/blob/b37c68091ba97ada6ea4b1c21d256ce45c79f17c/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/VersionRange.java#L37) > However the empty string (representing the infinite range as well) returns > {{new VersionRange(null, false, null, false)}} in > {{VersionRange.fromString(String)}}. > (https://github.com/apache/jackrabbit-filevault/blob/b37c68091ba97ada6ea4b1c21d256ce45c79f17c/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/VersionRange.java#L231) > Although both represent the infinite range they are different objects. > The {{equals}} method neglects those difference but reusing the constant > {{VersionRange.INFINITE}} improves the memory footprint and allows to use the > same instance check for infinite version ranges. > -- This message was sent by Atlassian Jira (v8.20.10#820010)