possible error in: ref_impl_java/TRUNK/openehr-rm-core/src/main/java/org/openehr/rm/support/identification/HierObjectID.java

Please correct me if I am wrong:

It says in method:
private void loadValue(String value) {
        int doubleColons = value.indexOf("::");
        // Check for root segment
        if (doubleColons == 0) {
            throw new IllegalArgumentException("bad format, missing root");
        }

If there is no "::" value.indexof returns -1 instead of 0, which makes
the exception is never thrown

regards
Bert

Bert,
I think it checks whether there is something (=the root segment) BEFORE
the ::
so the code would be correct, Rong?

Regards
Sebastian

Bert Verhees wrote:

Sebastian Garde schreef:

Bert,
I think it checks whether there is something (=the root segment) BEFORE
the ::
so the code would be correct, Rong?
  

You are right, I checked it again, and root should be the part left of
"::", or if no "::" it should return the whole string.

Excuse my mistake.

Thanks, Bert