google-code-export / gwt-test-utils

Automatically exported from code.google.com/p/gwt-test-utils
1 stars 0 forks source link

TextBox.getValue() results in a NullPointerException. #21

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. @Test
   public void checkValue() {
       TextBox t = new TextBox();
       Assert.assertEquals("", t.getValue());
   }

What is the expected output? What do you see instead?
java.lang.NullPointerException
    at com.google.gwt.text.shared.testing.PassthroughParser.parse(PassthroughParser.java:41)

Because the value is null.

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

Please provide any additional information below.
I have created a Patcher for the PassthroughParser which does a null check
to fix this issue.

Original issue reported on code.google.com by mis...@dasberg.nl on 10 Jan 2011 at 1:24

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by gael.laz...@gmail.com on 10 Jan 2011 at 1:43

GoogleCodeExporter commented 9 years ago
There was a problem with String values which are stocked in DOM element. GWT is 
expected to never return "null" in javascript, the empty string value.
I have fixed this for all string properties, not only textBox.getValue().

I've just deployed a new snapshot version (0.23-SNAPSHOT) but feel free to use 
the trunk :-)

Thank you to validate the fix and close the issue.

I will release the 0.23 version, which is the first version to work with GWT 
2.1+ !

Original comment by gael.laz...@gmail.com on 10 Jan 2011 at 2:56

GoogleCodeExporter commented 9 years ago
Great

Original comment by mis...@dasberg.nl on 10 Jan 2011 at 3:15

GoogleCodeExporter commented 9 years ago

Original comment by gael.laz...@gmail.com on 9 Jun 2011 at 3:14