You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wicket.apache.org by Maxim Solodovnik <so...@gmail.com> on 2020/05/06 10:20:08 UTC

ConcurrentHashSet to be removed from wicket code base

Hello All,

ConcurrentHashSet can be safely removed from wicket codebase due to
since Java8 it is possible to use ConcurrentHashMap.newKeySet()

Can we @deprecate in in wicket9 and remove in Wicket10?

-- 
Best regards,
Maxim

Re: ConcurrentHashSet to be removed from wicket code base

Posted by Maxim Solodovnik <so...@gmail.com>.
Hello Martijn,

On Thu, 7 May 2020 at 19:02, Martijn Dashorst <ma...@gmail.com>
wrote:

> IIRC Micromap was created for serialization and memory efficiency. Has that
> changed?
>

From what I can see using "so to declaration" in JDK11
Map.of(key, value) returns

    static final class Map1<K,V> extends AbstractImmutableMap<K,V> {
        @Stable
        private final K k0;
        @Stable
        private final V v0;
...............................

Which seems to be the same as we have now ....


>
> Martijn
>
> On Wed, May 6, 2020 at 2:18 PM Maxim Solodovnik <so...@gmail.com>
> wrote:
>
> > MicroMap can easily be replaced with Map.of(key, value)
> >
> > I can deprecate it for wicket9 in same PR, should I?
> >
> > On Wed, 6 May 2020 at 18:06, Maxim Solodovnik <so...@gmail.com>
> > wrote:
> >
> > > I would propose to remove it in Wicket9, but don't want to slow down
> the
> > > release :)
> > > Will create PR :)
> > >
> > > On Wed, 6 May 2020 at 17:56, Andrea Del Bene <an...@gmail.com>
> > wrote:
> > >
> > >> +1 to replace it with ConcurrentHashMap.newKeySet()
> > >>
> > >> On 06/05/20 12:53, Martijn Dashorst wrote:
> > >> > I'd go further and deprecate it in wicket 8 as well... Since the
> > >> > replacement is in Java 8.
> > >> >
> > >> > I would be +1 on removing it from Wicket 9 final if it came to a
> vote.
> > >> It
> > >> > is not a core class in Wicket, it was not supposed to be used widely
> > >> > (mostly for our internal stuff), and would make it clear that when
> in
> > >> > doubt: use the JDK provided one.
> > >> >
> > >> > Martijn
> > >> >
> > >> >
> > >> > On Wed, May 6, 2020 at 12:36 PM Martin Grigorov <
> mgrigorov@apache.org
> > >
> > >> > wrote:
> > >> >
> > >> >> On Wed, May 6, 2020 at 1:20 PM Maxim Solodovnik <
> > solomax666@gmail.com>
> > >> >> wrote:
> > >> >>
> > >> >>> Hello All,
> > >> >>>
> > >> >>> ConcurrentHashSet can be safely removed from wicket codebase due
> to
> > >> >>> since Java8 it is possible to use ConcurrentHashMap.newKeySet()
> > >> >>>
> > >> >>> Can we @deprecate in in wicket9 and remove in Wicket10?
> > >> >>>
> > >> >> +1
> > >> >>
> > >> >>
> > >> >>> --
> > >> >>> Best regards,
> > >> >>> Maxim
> > >> >>>
> > >> >
> > >>
> > >
> > >
> > > --
> > > Best regards,
> > > Maxim
> > >
> >
> >
> > --
> > Best regards,
> > Maxim
> >
>
>
> --
> Become a Wicket expert, learn from the best: http://wicketinaction.com
>


-- 
Best regards,
Maxim

Re: ConcurrentHashSet to be removed from wicket code base

Posted by Martin Grigorov <mg...@apache.org>.
On Thu, May 7, 2020 at 3:02 PM Martijn Dashorst <ma...@gmail.com>
wrote:

> IIRC Micromap was created for serialization and memory efficiency. Has that
> changed?
>

Java 9+ has Map.of(k, v) method that
uses java.util.ImmutableCollections.Map1 and it is quite optimized.
I think the replacement is good!

>
> Martijn
>
> On Wed, May 6, 2020 at 2:18 PM Maxim Solodovnik <so...@gmail.com>
> wrote:
>
> > MicroMap can easily be replaced with Map.of(key, value)
> >
> > I can deprecate it for wicket9 in same PR, should I?
> >
> > On Wed, 6 May 2020 at 18:06, Maxim Solodovnik <so...@gmail.com>
> > wrote:
> >
> > > I would propose to remove it in Wicket9, but don't want to slow down
> the
> > > release :)
> > > Will create PR :)
> > >
> > > On Wed, 6 May 2020 at 17:56, Andrea Del Bene <an...@gmail.com>
> > wrote:
> > >
> > >> +1 to replace it with ConcurrentHashMap.newKeySet()
> > >>
> > >> On 06/05/20 12:53, Martijn Dashorst wrote:
> > >> > I'd go further and deprecate it in wicket 8 as well... Since the
> > >> > replacement is in Java 8.
> > >> >
> > >> > I would be +1 on removing it from Wicket 9 final if it came to a
> vote.
> > >> It
> > >> > is not a core class in Wicket, it was not supposed to be used widely
> > >> > (mostly for our internal stuff), and would make it clear that when
> in
> > >> > doubt: use the JDK provided one.
> > >> >
> > >> > Martijn
> > >> >
> > >> >
> > >> > On Wed, May 6, 2020 at 12:36 PM Martin Grigorov <
> mgrigorov@apache.org
> > >
> > >> > wrote:
> > >> >
> > >> >> On Wed, May 6, 2020 at 1:20 PM Maxim Solodovnik <
> > solomax666@gmail.com>
> > >> >> wrote:
> > >> >>
> > >> >>> Hello All,
> > >> >>>
> > >> >>> ConcurrentHashSet can be safely removed from wicket codebase due
> to
> > >> >>> since Java8 it is possible to use ConcurrentHashMap.newKeySet()
> > >> >>>
> > >> >>> Can we @deprecate in in wicket9 and remove in Wicket10?
> > >> >>>
> > >> >> +1
> > >> >>
> > >> >>
> > >> >>> --
> > >> >>> Best regards,
> > >> >>> Maxim
> > >> >>>
> > >> >
> > >>
> > >
> > >
> > > --
> > > Best regards,
> > > Maxim
> > >
> >
> >
> > --
> > Best regards,
> > Maxim
> >
>
>
> --
> Become a Wicket expert, learn from the best: http://wicketinaction.com
>

Re: ConcurrentHashSet to be removed from wicket code base

Posted by Martijn Dashorst <ma...@gmail.com>.
IIRC Micromap was created for serialization and memory efficiency. Has that
changed?

Martijn

On Wed, May 6, 2020 at 2:18 PM Maxim Solodovnik <so...@gmail.com>
wrote:

> MicroMap can easily be replaced with Map.of(key, value)
>
> I can deprecate it for wicket9 in same PR, should I?
>
> On Wed, 6 May 2020 at 18:06, Maxim Solodovnik <so...@gmail.com>
> wrote:
>
> > I would propose to remove it in Wicket9, but don't want to slow down the
> > release :)
> > Will create PR :)
> >
> > On Wed, 6 May 2020 at 17:56, Andrea Del Bene <an...@gmail.com>
> wrote:
> >
> >> +1 to replace it with ConcurrentHashMap.newKeySet()
> >>
> >> On 06/05/20 12:53, Martijn Dashorst wrote:
> >> > I'd go further and deprecate it in wicket 8 as well... Since the
> >> > replacement is in Java 8.
> >> >
> >> > I would be +1 on removing it from Wicket 9 final if it came to a vote.
> >> It
> >> > is not a core class in Wicket, it was not supposed to be used widely
> >> > (mostly for our internal stuff), and would make it clear that when in
> >> > doubt: use the JDK provided one.
> >> >
> >> > Martijn
> >> >
> >> >
> >> > On Wed, May 6, 2020 at 12:36 PM Martin Grigorov <mgrigorov@apache.org
> >
> >> > wrote:
> >> >
> >> >> On Wed, May 6, 2020 at 1:20 PM Maxim Solodovnik <
> solomax666@gmail.com>
> >> >> wrote:
> >> >>
> >> >>> Hello All,
> >> >>>
> >> >>> ConcurrentHashSet can be safely removed from wicket codebase due to
> >> >>> since Java8 it is possible to use ConcurrentHashMap.newKeySet()
> >> >>>
> >> >>> Can we @deprecate in in wicket9 and remove in Wicket10?
> >> >>>
> >> >> +1
> >> >>
> >> >>
> >> >>> --
> >> >>> Best regards,
> >> >>> Maxim
> >> >>>
> >> >
> >>
> >
> >
> > --
> > Best regards,
> > Maxim
> >
>
>
> --
> Best regards,
> Maxim
>


-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com

Re: ConcurrentHashSet to be removed from wicket code base

Posted by Maxim Solodovnik <so...@gmail.com>.
MicroMap can easily be replaced with Map.of(key, value)

I can deprecate it for wicket9 in same PR, should I?

On Wed, 6 May 2020 at 18:06, Maxim Solodovnik <so...@gmail.com> wrote:

> I would propose to remove it in Wicket9, but don't want to slow down the
> release :)
> Will create PR :)
>
> On Wed, 6 May 2020 at 17:56, Andrea Del Bene <an...@gmail.com> wrote:
>
>> +1 to replace it with ConcurrentHashMap.newKeySet()
>>
>> On 06/05/20 12:53, Martijn Dashorst wrote:
>> > I'd go further and deprecate it in wicket 8 as well... Since the
>> > replacement is in Java 8.
>> >
>> > I would be +1 on removing it from Wicket 9 final if it came to a vote.
>> It
>> > is not a core class in Wicket, it was not supposed to be used widely
>> > (mostly for our internal stuff), and would make it clear that when in
>> > doubt: use the JDK provided one.
>> >
>> > Martijn
>> >
>> >
>> > On Wed, May 6, 2020 at 12:36 PM Martin Grigorov <mg...@apache.org>
>> > wrote:
>> >
>> >> On Wed, May 6, 2020 at 1:20 PM Maxim Solodovnik <so...@gmail.com>
>> >> wrote:
>> >>
>> >>> Hello All,
>> >>>
>> >>> ConcurrentHashSet can be safely removed from wicket codebase due to
>> >>> since Java8 it is possible to use ConcurrentHashMap.newKeySet()
>> >>>
>> >>> Can we @deprecate in in wicket9 and remove in Wicket10?
>> >>>
>> >> +1
>> >>
>> >>
>> >>> --
>> >>> Best regards,
>> >>> Maxim
>> >>>
>> >
>>
>
>
> --
> Best regards,
> Maxim
>


-- 
Best regards,
Maxim

Re: ConcurrentHashSet to be removed from wicket code base

Posted by Maxim Solodovnik <so...@gmail.com>.
I would propose to remove it in Wicket9, but don't want to slow down the
release :)
Will create PR :)

On Wed, 6 May 2020 at 17:56, Andrea Del Bene <an...@gmail.com> wrote:

> +1 to replace it with ConcurrentHashMap.newKeySet()
>
> On 06/05/20 12:53, Martijn Dashorst wrote:
> > I'd go further and deprecate it in wicket 8 as well... Since the
> > replacement is in Java 8.
> >
> > I would be +1 on removing it from Wicket 9 final if it came to a vote. It
> > is not a core class in Wicket, it was not supposed to be used widely
> > (mostly for our internal stuff), and would make it clear that when in
> > doubt: use the JDK provided one.
> >
> > Martijn
> >
> >
> > On Wed, May 6, 2020 at 12:36 PM Martin Grigorov <mg...@apache.org>
> > wrote:
> >
> >> On Wed, May 6, 2020 at 1:20 PM Maxim Solodovnik <so...@gmail.com>
> >> wrote:
> >>
> >>> Hello All,
> >>>
> >>> ConcurrentHashSet can be safely removed from wicket codebase due to
> >>> since Java8 it is possible to use ConcurrentHashMap.newKeySet()
> >>>
> >>> Can we @deprecate in in wicket9 and remove in Wicket10?
> >>>
> >> +1
> >>
> >>
> >>> --
> >>> Best regards,
> >>> Maxim
> >>>
> >
>


-- 
Best regards,
Maxim

Re: ConcurrentHashSet to be removed from wicket code base

Posted by Andrea Del Bene <an...@gmail.com>.
+1 to replace it with ConcurrentHashMap.newKeySet()

On 06/05/20 12:53, Martijn Dashorst wrote:
> I'd go further and deprecate it in wicket 8 as well... Since the
> replacement is in Java 8.
>
> I would be +1 on removing it from Wicket 9 final if it came to a vote. It
> is not a core class in Wicket, it was not supposed to be used widely
> (mostly for our internal stuff), and would make it clear that when in
> doubt: use the JDK provided one.
>
> Martijn
>
>
> On Wed, May 6, 2020 at 12:36 PM Martin Grigorov <mg...@apache.org>
> wrote:
>
>> On Wed, May 6, 2020 at 1:20 PM Maxim Solodovnik <so...@gmail.com>
>> wrote:
>>
>>> Hello All,
>>>
>>> ConcurrentHashSet can be safely removed from wicket codebase due to
>>> since Java8 it is possible to use ConcurrentHashMap.newKeySet()
>>>
>>> Can we @deprecate in in wicket9 and remove in Wicket10?
>>>
>> +1
>>
>>
>>> --
>>> Best regards,
>>> Maxim
>>>
>

Re: ConcurrentHashSet to be removed from wicket code base

Posted by Martijn Dashorst <ma...@gmail.com>.
I'd go further and deprecate it in wicket 8 as well... Since the
replacement is in Java 8.

I would be +1 on removing it from Wicket 9 final if it came to a vote. It
is not a core class in Wicket, it was not supposed to be used widely
(mostly for our internal stuff), and would make it clear that when in
doubt: use the JDK provided one.

Martijn


On Wed, May 6, 2020 at 12:36 PM Martin Grigorov <mg...@apache.org>
wrote:

> On Wed, May 6, 2020 at 1:20 PM Maxim Solodovnik <so...@gmail.com>
> wrote:
>
> > Hello All,
> >
> > ConcurrentHashSet can be safely removed from wicket codebase due to
> > since Java8 it is possible to use ConcurrentHashMap.newKeySet()
> >
> > Can we @deprecate in in wicket9 and remove in Wicket10?
> >
>
> +1
>
>
> >
> > --
> > Best regards,
> > Maxim
> >
>


-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com

Re: ConcurrentHashSet to be removed from wicket code base

Posted by Martin Grigorov <mg...@apache.org>.
On Wed, May 6, 2020 at 1:20 PM Maxim Solodovnik <so...@gmail.com>
wrote:

> Hello All,
>
> ConcurrentHashSet can be safely removed from wicket codebase due to
> since Java8 it is possible to use ConcurrentHashMap.newKeySet()
>
> Can we @deprecate in in wicket9 and remove in Wicket10?
>

+1


>
> --
> Best regards,
> Maxim
>