@Martin The result is garantueed to be non-null in these lines, how should 
ofNullable() make any difference?

@Francesco FormTester submits via Ajax request only in case of an AjaxButton or 
AjaxSubmitLink, which ist not the case with AjaxButtonBar. As fallback the 
whole form is submitted instead, but without triggering the wizard finish 
button. An optional with null value is to be expected then.

Please open a Jira issue, we should improve that (and investigate why this 
didn't break before Wicket 8).

Thanks
Sven

Am 13. Juni 2018 13:57:24 MESZ schrieb Martin Grigorov <mgrigo...@apache.org>:
>I guess those two should really use Optional.ofNullable():
>https://github.com/apache/wicket/blob/master/wicket-core/src/main/java/org/apache/wicket/request/cycle/RequestCycle.java#L886-L892
>
>On Wed, Jun 13, 2018 at 2:33 PM Francesco Chicchiriccò
><ilgro...@apache.org>
>wrote:
>
>> I have spent some time investigating this issue, and I have finally
>found
>> that the actual problem lies at
>>
>>
>>
>https://github.com/apache/syncope/blob/SYNCOPE-1323/client/console/src/main/java/org/apache/syncope/client/console/wizards/AjaxWizard.java#L198
>>
>> e.g.
>>
>> RequestCycle.get().find(AjaxRequestTarget.class)
>>
>> returns an Optional holding null, when onFinish() is invoked by
>> WicketTester (actual execution works fine, as said below).
>>
>> Does this ring any bell?
>> Regards.
>>
>> On 2018/06/11 10:43:32, Francesco Chicchiriccò <ilgro...@apache.org>
>> wrote:
>> > On 2018/06/07 16:43:58, Sven Meier <s...@meiers.net> wrote:
>> > > Hi,
>> > >
>> > > I'm not able to run the test in Intellij nor in Eclipse:
>> > >
>> > > java.lang.NoSuchMethodError:
>> > >
>org.junit.platform.commons.util.ReflectionUtils.getDefaultClassLoader
>> >
>> > Thanks for reporting, it seems that the problem was due to an
>accidental
>> inclusion of the old junit artifact in the test classpath.
>> > Anyway, what you can currently find on the Syncope master branch is
>> still based on Wicket 7 (and the tests run fine); the Wicket 8 branch
>is
>> not published.
>> >
>> > > I suspect your problem might be caused by WICKET-6541, but I
>don't see
>> > > why the changes should fail during tests.
>> >
>> > Thanks for pointing this out, I will look at it.
>> >
>> > Regards.
>> >
>> > > Am 06.06.2018 um 19:00 schrieb Sven Meier:
>> > > > I'll take a look.
>> > > >
>> > > > Have fun
>> > > > Sven
>> > > >
>> > > >
>> > > > Am 06.06.2018 um 17:16 schrieb Francesco Chicchiriccò:
>> > > >> Hi all,
>> > > >> I am migrating the Syncope master branch from Wicket 7 to 8.
>> > > >> It seems all is working fine when dealing via browser, but the
>> > > >> integration tests are mostly failing.
>> > > >>
>> > > >> As Syncope heavily uses Wizards, the reason seems that
>FormTester
>> > > >> fails somehow to submit the Finish button (though no error is
>> > > >> reported); the failing statement is (for example):
>> > > >>
>> > > >>
>>
>https://github.com/apache/syncope/blob/master/fit/core-reference/src/test/java/org/apache/syncope/fit/console/ParametersITCase.java#L64
>> > > >>
>> > > >>
>> > > >> but I can see that no submit was effectively performed by
>> > > >>
>> > > >>
>>
>https://github.com/apache/syncope/blob/master/fit/core-reference/src/test/java/org/apache/syncope/fit/console/ParametersITCase.java#L62
>> > > >>
>> > > >>
>> > > >> hence no feedback message was generated.
>> > > >> Strange is that I am also sure that the Next button is
>effectively
>> > > >> submitted by
>> > > >>
>> > > >>
>>
>https://github.com/apache/syncope/blob/master/fit/core-reference/src/test/java/org/apache/syncope/fit/console/ParametersITCase.java#L56
>> > > >>
>> > > >>
>> > > >> Is there anything relevant that was changed in WicketTester
>with
>> > > >> Wicket 8? The code above works fine with Wicket 7, and
>performing
>> the
>> > > >> same actions via browser works fine too.
>> > > >>
>> > > >> TIA.
>> > > >> Regards.
>> > > >>
>> > > >>
>> ---------------------------------------------------------------------
>> > > >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> > > >> For additional commands, e-mail: users-h...@wicket.apache.org
>> > > >>
>> > > >
>> > > >
>> > > >
>---------------------------------------------------------------------
>> > > > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> > > > For additional commands, e-mail: users-h...@wicket.apache.org
>> > > >
>> > >
>> > >
>> > >
>---------------------------------------------------------------------
>> > > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> > > For additional commands, e-mail: users-h...@wicket.apache.org
>> > >
>> > >
>> >
>> >
>---------------------------------------------------------------------
>> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> > For additional commands, e-mail: users-h...@wicket.apache.org
>> >
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>

Reply via email to