Re: NumberFormatException from Requests with invalid URIs

2013-07-25 Thread Sven Meier
ServletWebRequest#getContextRelativeUrl() passes foo://:/ to Url#parse() and that one fails. Please create a Jira issue. Sven On 07/24/2013 05:06 PM, Martin Funk wrote: Hi Sven, we still can reproduce this on any version. Maybe this git diff gives a clearer picture: diff --git

Re: NumberFormatException from Requests with invalid URIs

2013-07-25 Thread Martin Funk
java.lang.**NumberFormatException: For input string: at java.lang.**NumberFormatException.**forInputString(Unknown Source) at java.lang.Integer.parseInt(**Unknown Source) at java.lang.Integer.parseInt(**Unknown Source) at org.apache.wicket.request.Url.**parse(Url.java:277

NumberFormatException from Requests with invalid URIs

2013-07-24 Thread Mathias Binder
Hi, we became aware of a problem caused by requests with invalid URIs on our wicket-application. The URI contains strings like *://*:*, so wicket tries to determine and parse a port number, that is not present. This leads to NumberFormatExceptions with URIs like, e.g. http://host/h@@p://h@@p://

Re: NumberFormatException from Requests with invalid URIs

2013-07-24 Thread Sven Meier
Hi, which Wicket version? Url parsing has been improved on lately: @Test public void weirdUrl() { Url url = Url.parse(http://wicket.apache.org/h@@p://h@@p://;); assertEquals(wicket.apache.org, url.getHost()); assertEquals(/h@@p://h@@p://, url.getPath());

Re: NumberFormatException from Requests with invalid URIs

2013-07-24 Thread Mathias Binder
We work with Version 6.7.0 Mathias 2013/7/24 Sven Meier s...@meiers.net: Hi, which Wicket version? Url parsing has been improved on lately: @Test public void weirdUrl() { Url url = Url.parse(http://wicket.apache.org/h@@p://h@@p://;);

Re: NumberFormatException from Requests with invalid URIs

2013-07-24 Thread Martin Funk
Hi Sven, we still can reproduce this on any version. Maybe this git diff gives a clearer picture: diff --git a/wicket-core/src/test/java/org/apache/wicket/protocol/http/servlet/ServletWebRequestTest.java

Re: Inputing string instead of a double value in junit test case throws NumberFormatException

2012-05-02 Thread Andrea Del Bene
At first sight I would say that your problem could be related to a different Locale used during unit test. You should compare the output of 'myData.getAmount()' when is called during testing and when is called running on Jetty server. I have a integration test case: FormTester

NumberFormatException

2011-08-17 Thread Jencity
Hello, i have got a problem with getting my form working. I have got a form called gatewayForm. I added several textfields and a CompoundPropertyModel to this form. Everytime I submit the form I get a NumberFormatException. All textfields are Strings. / TextFieldString name = new TextFieldString

Re: NumberFormatException

2011-08-17 Thread Andrea Del Bene
called gatewayForm. I added several textfields and a CompoundPropertyModel to this form. Everytime I submit the form I get a NumberFormatException. All textfields are Strings. / TextFieldString name = new TextFieldString(name); ... Form gatewayForm = new Form(gatewayForm); CompoundPropertyModel

Re: Enum with RadioChoice leads to NumberFormatException

2009-08-15 Thread Mischa Dasberg
Hi Reinout, I guess your Person object has a private int sex; instead of private SexType sex; So what happens is that you are trying to convert a SexType to an Integer which obviously returns an illegalArgumentException. Put it like this and it should work. public class Person {

Enum with RadioChoice leads to NumberFormatException

2009-08-14 Thread Reinout van Schouwen
Hi all, If I have an enum 'SexTypes' in the class Person like this: public static enum SexTypes { SEX_UNKNOWN(0), SEX_MALE(1), SEX_FEMALE(2), SEX_NOT_APPLICABLE(9); /* Values for sex are taken from ISO 5218:1977 Representation of Human Sexes */ private final int