phamow / fest

Automatically exported from code.google.com/p/fest
0 stars 0 forks source link

Off-By-One-Bug in JTableCell #222

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a JTableFixture with the appropriate reference to a JTable with
size 4x4.
2. Access the last row as follows:
myNewTable.click(TableCell.row(4).column(0), MouseButton.LEFT_BUTTON)

What is the expected output? What do you see instead?
The message should be "row '4' should be between '0' and '3'" instead of
what is printed below.

What version of the product are you using? On what operating system?
1.0b1

Please provide any additional information below.
Stack Trace is as follows:
java.lang.IndexOutOfBoundsException: row '4' should be between '0' and '4'
  at org.fest.swing.driver.JTableCell.validateIndex(JTableCell.java:86)
  at org.fest.swing.driver.JTableCell.validateRow(JTableCell.java:71)
  at org.fest.swing.driver.JTableCell.validateBoundsIn(JTableCell.java:60)
  at org.fest.swing.driver.JTableDriver.validate(JTableDriver.java:452)
  at org.fest.swing.driver.JTableDriver.click(JTableDriver.java:216)
  at org.fest.swing.fixture.JTableFixture.click(JTableFixture.java:337)
  at org.fest.swing.fixture.JTableFixture.click(JTableFixture.java:316)
  at FEST_Test_Class.testImportNewFile(FEST_Test_Class.java:93)

Original issue reported on code.google.com by dfsur...@gmail.com on 23 Oct 2008 at 3:08

GoogleCodeExporter commented 9 years ago
Currently line #88 reads:
"quote(valueOf(itemCount))));"

I think it should read:
"quote(valueOf(itemCount-1))));"

Also feel free to downgrade the priority to low - its only the message, and 
does not
affect functionality.

Original comment by dfsur...@gmail.com on 23 Oct 2008 at 3:12

GoogleCodeExporter commented 9 years ago
Many thanks for reporting this bug! :)

I'd like to add you to the list of contributors. If you don't mind, please 
update
this issue or send me an e-mail to alex.ruiz.05 at gmail.com with you name.

Cheers,
-Alex

Original comment by Alex.Rui...@gmail.com on 23 Oct 2008 at 3:47

GoogleCodeExporter commented 9 years ago
Fixed minor typo in the summary ;)

Original comment by Alex.Rui...@gmail.com on 23 Oct 2008 at 5:21

GoogleCodeExporter commented 9 years ago
Many thanks!

Original comment by Alex.Rui...@gmail.com on 21 Nov 2008 at 6:59

GoogleCodeExporter commented 9 years ago
Set the module as a label, instead of being part of the title.

Original comment by Alex.Rui...@gmail.com on 1 Dec 2008 at 5:10