I'd be inclined to put

    byte[] displayURLBytes = attributes.get("hyperfind.object-display-url");

before the `if` statement, rather than calling `attributes.get()` twice.