Closed Bug 13260 Opened 25 years ago Closed 25 years ago

deletData method of CharaterData does not throw exception for a negative value

Categories

(Core Graveyard :: Java APIs for DOM, defect, P3)

Sun
Solaris
defect

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: rpallath, Assigned: akhil.arora)

Details

Attachments

(1 file)

The deleteData method of CharacterData Remove a range of characters from the
node.
It should throw exception for negative value of count or offset
and also If the sum of offset and count exceeds length then all characters
from offset to the end of the data are deleted.

In this test case offset is 1 and
count is set to Integer.MIN_VALUE(-2147483648).

But it still goes ahead and deletes all characters from offset 1 on invoking
this method.

To execute the test
get MOZILLA from mozilla tree.
build apprunner.
follow steps as indicated in <MOZILLA>/java/dom/java/tests/src/README.

on command line invoke
  sh autorun.sh -t org.mozilla.dom.test.CharacterDataImpl_deleteData_int_int_6

The log files are registered in dir. mozilla/java/dom/tests/src/log.


Also attached is a   debug log.
Attached file Debug log...
Component: Browser-General → Java APIs for DOM
Assignee: don → akhil.arora
QA Contact: leger → leila.garin
Status: NEW → ASSIGNED
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Added checks for integer input arguments being inside legal range. Throw
exceptions if not.
leila.garin@eng.sun.com...can you mark this Verified now?
Verified mozilla branch  Netscape_6_1_RELEASE and blackwood branch 
JAVADEV_6_1_20010831 on NT and on Sparc Solaris 2.8.
Exception throwned and test passed.
Status: RESOLVED → VERIFIED
QA Contact: leila.garin → avm
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: