New API for test results.
6877042 Allow to clear named TestResult.Section.output buffer
New code is ok, but I think that observers should be notified of such changes, shouldn't they?
If extending observer interface is not applicable because of backward compatibility, updateOutput() can be used instead.
I agree. Yes, new API was not added because it was an interface. I would like to defer the change until the next major release.
Do you think updatedOutput(startindex=0,endindex=0,text="")?
I think updatedOutput(startindex=0,endindex=buffer.size(),text=""), endindex should point to the last available index of the section text, not the first.
Well, in this case, we just deleted all the buffer data, so the size() is zero by definition. We could code it the way you wrote though.
please consider me fine with this change
Your use of this web site or any of its content or software indicates your agreement to be bound by these Terms of Participation.
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.