Thomas Mueller wrote:

Exceptions should never be used for orinary control flow (see also
"Effective Java" page 170). My suggestion would be:

SharedItemStateManager.java,
    private boolean hasNonVirtualItemState(ItemId id) throws
ItemStateException {
...
        if (id.denotesNode()) {
            return persistMgr.exists((NodeId) id);
        } else {
            return persistMgr.exists((PropertyId) id);
        }
    }

This would be even a bigger change, but I think it would be the most
logical solution.

Looks like the best solution so far, but I'm not sure which consequences this has. I'll try to change the method as proposed and report. But this might take a day or two because I'm quite busy at work right now. If someone else wants to give it a shot ...

Cheers,
Christoph

Reply via email to