-
Bug
-
Resolution: Incomplete
-
P4
-
None
-
19
-
generic
-
generic
A DESCRIPTION OF THE PROBLEM :
PropertyEditorSupport.setAsText(t) validates internal field 'value' against String class, and sets it to 't' (by setValue(t)) when passed.
Initially, the 'value' field is null, so even if provided parameter 't' is of String type, validation fails and internal 'value' remains null.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
new PropertyEditorSupport().setAsText("text");
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
("text").equals(new PropertyEditorSupport().setAsText("text").getValue())
ACTUAL -
IllegalArgumentException
CUSTOMER SUBMITTED WORKAROUND :
use setValue() instead:
PropertyEditorSupport().setValue("text")
FREQUENCY : always
PropertyEditorSupport.setAsText(t) validates internal field 'value' against String class, and sets it to 't' (by setValue(t)) when passed.
Initially, the 'value' field is null, so even if provided parameter 't' is of String type, validation fails and internal 'value' remains null.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
new PropertyEditorSupport().setAsText("text");
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
("text").equals(new PropertyEditorSupport().setAsText("text").getValue())
ACTUAL -
IllegalArgumentException
CUSTOMER SUBMITTED WORKAROUND :
use setValue() instead:
PropertyEditorSupport().setValue("text")
FREQUENCY : always