Changes look fine however one aspect might cause issue

RestrictionImpl#hashCode -> PropertyValues#hashCode ->
PropertyStateValue#hashCode

====
    private String getInternalString() {
        StringBuilder sb = new StringBuilder();
        Iterator<String> iterator = getValue(Type.STRINGS).iterator();
        while (iterator.hasNext()) {
            sb.append(iterator.next());
            if (iterator.hasNext()) {
                sb.append(",");
            }
        }
        return sb.toString();
    }

    @Override
    public int hashCode() {
        return getType().tag() ^ getInternalString().hashCode();
    }
====

Here it tries to get value as STRINGS which leads to
PropertyState#getValue(Type.STRINGS) which would lead to a Binary
getting coerced to String in Conversions#convert(Blob) which would
lead to load of whole binary. Now I am not sure if PropertyState in
RestrictionImpl is applicable for Binary property also

Probably PropertyStateValue#hashCode should take care of Binary
properties and thats why PropertyState#hashCode does not take into
account the value
Chetan Mehrotra


On Fri, Feb 24, 2017 at 2:34 PM, Angela Schreiber <anch...@adobe.com> wrote:
> hi oak-devs
>
> i would like to merge another improvement into the 1.6.1 branch:
> https://issues.apache.org/jira/browse/OAK-5784
>
> in addition to additional tests i run the AceCreationTest benchmark and
> attached the results to the issue.
> however, having some extra pair of eyes would be appreciated in order to
> limit the risk of regressions.
>
> thanks
> angela
>
>

Reply via email to