Index: modules/swing/src/test/api/java/common/javax/swing/text/SegmentTest.java =================================================================== --- modules/swing/src/test/api/java/common/javax/swing/text/SegmentTest.java (revision 483031) +++ modules/swing/src/test/api/java/common/javax/swing/text/SegmentTest.java (working copy) @@ -14,10 +14,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/** - * @author Alexey A. Ivanov - * @version $Revision$ - */ package javax.swing.text; import java.text.CharacterIterator; @@ -48,6 +44,12 @@ assertEquals("cdefgh", s.toString()); } + public void testToStringEmpty() { + s = new Segment(); + assertNull(s.array); + assertEquals("", s.toString()); + } + public void testCurrent() { assertEquals(arr[0], s.current()); assertEquals(s.array[s.getIndex()], s.current());