Menu

#117 Javadoc for a CodeElement's valid offset is unclear

closed
None
5
2008-01-23
2008-01-16
No

Is this offset supposed to start at index 0 or index 1? This is not specified in the API for getValidOffset() and is confusing to consumers. What was it originally intended to be?

Bernhard, please comment.

Discussion

  • Bernhard Brem

    Bernhard Brem - 2008-01-16

    Logged In: YES
    user_id=1245734
    Originator: NO

    The idea is simple:
    It must be possible to do a

    IDocument doc;
    doc.replace(validOffset,0,childelement_as_string);

    to insert a child element as a string in a element. The child element should be the first child then.

    It must also be possible to do a
    IDocument doc;
    doc.replace(validOffset+validLength,0,childelement_as_string);
    to insert a child as last child.

    This bug is close related to 1872385. I will formulate the javadoc better after I have solved this problem.

     
  • Bernhard Brem

    Bernhard Brem - 2008-01-16
    • assigned_to: nobody --> bernhardbrem
     
  • Bernhard Brem

    Bernhard Brem - 2008-01-23

    Logged In: YES
    user_id=1245734
    Originator: NO

    Better commented

     
  • Bernhard Brem

    Bernhard Brem - 2008-01-23
    • status: open --> closed
     

Log in to post a comment.

MongoDB Logo MongoDB