Re: Rename AjaxSubmitLink#onSubmit(id, onSubmit, onError)

2016-11-15 Thread Martijn Dashorst
There's a way to make the memory consumption less: We can store on demand in the data[] field in Component, but that means that we need to overhaul the event dispatch system to work with this instead of overriding a method... Martijn On Tue, Nov 15, 2016 at 8:47 AM, Rob Audenaerde

Implementation of LambdaModel

2016-11-15 Thread Emond Papegaaij
Hi, Martijn was doing some memory benchmarking on models, including LambdaModel, so I decided to take a closer look at its current implementation. First of all, I've got some doubts about the current implementation of equals and hashCode: are 2 LambdaModels really equal when their getters and

Re: buildbot failure in on wicket-master

2016-11-15 Thread Emond Papegaaij
IModel.map(Function) indeed is functionally equivalent to LambdaModel.of(IModel, Function), but its memory footprint is significantly larger (120 vs 80 bytes). Also, there's no equivalent method for of(IModel, Function, BiConsumer). Naturally, we can add the corresponding method, but it will

Re: buildbot failure in on wicket-master

2016-11-15 Thread Martin Grigorov
On Tue, Nov 15, 2016 at 2:51 PM, Emond Papegaaij wrote: > It seems I've hit a bug in javac: > LambdaModelTest[46,61] reference to of is ambiguous: >of(SerializableSupplier, SerializableConsumer) > of(IModel, SerializableFunction) > > This

Re: buildbot failure in on wicket-master

2016-11-15 Thread Emond Papegaaij
It seems I've hit a bug in javac: LambdaModelTest[46,61] reference to of is ambiguous: of(SerializableSupplier, SerializableConsumer) of(IModel, SerializableFunction) This clearly is wrong: IModel personNameModel = LambdaModel.of( () -> person.getName(), (name)

Re: Implementation of LambdaModel

2016-11-15 Thread Sven Meier
Hi, >are 2 LambdaModels really equal when their getters and setters are equal? I don't think this is a necessity or useful anyway. >I've managed to get these improvements by making LambdaModel an abstract class >and creating specific implementations for all three methods. Sounds good. Have

Make IXyzListener's methods default with empty body

2016-11-15 Thread Martin Grigorov
What do you think about making methods like IApplicationListener#onAfterInitialized() a 'default' method with empty body ? Same for #onBeforeDestroyed() and all other similar methods in other classes This way there won't be a need to create adapters like AjaxRequestTarger.AbstractListener and

Re: buildbot failure in on wicket-master

2016-11-15 Thread Sven Meier
Hi, >We could rename the methods taking an IModel as first parameter to >"chained" or "from". or "map": LambdaModel.map(IModel, SerializableFunction, SerializableBiConsumer) LambdaModel.map(IModel, SerializableFunction) Sven Am 15.11.2016 um 20:52 schrieb Emond Papegaaij: