You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@bookkeeper.apache.org by Enrico Olivelli <eo...@gmail.com> on 2017/07/28 14:34:34 UTC

New used classes in 4.5 are deprecated in Java9

Hi all,
I'm back to tring to build and run BookKeeper on java9

recently we added extensive usage of java.uti.Observable and Observer.

This classes have been deprecated in java9 and the build fails, because we
forbid the usage of deprecated APIs.

These classes are not used on client API but only on Bookie, so I think
that in 4.6 we can switch them with other internal classes.

Thoughts ?

Enrico

Re: New used classes in 4.5 are deprecated in Java9

Posted by Enrico Olivelli <eo...@gmail.com>.
Il ven 28 lug 2017, 20:34 Enrico Olivelli <eo...@gmail.com> ha scritto:

>
>
> Il ven 28 lug 2017, 19:54 Sijie Guo <gu...@gmail.com> ha scritto:
>
>> On Jul 28, 2017 7:34 AM, "Enrico Olivelli" <eo...@gmail.com> wrote:
>>
>> Hi all,
>> I'm back to tring to build and run BookKeeper on java9
>>
>> recently we added extensive usage of java.uti.Observable and Observer.
>>
>
> I have just found this good article
>
>
> https://dzone.com/articles/javas-observer-and-observable-are-deprecated-in-jd
>
>
>> This classes have been deprecated in java9 and the build fails, because we
>> forbid the usage of deprecated APIs.
>>
>> These classes are not used on client API but only on Bookie, so I think
>> that in 4.6 we can switch them with other internal classes.
>>
>> Thoughts ?
>>
>>
>> what are the replacements for Observable and Observer in java9?
>>
>
Since we are already using Guava we could take a look at Guava EventBus.
I will create a ticket.
For 4.5 Observable will be ok, we do not want to break things

Enrico



>> regardless, I think we should support java8. if we can't find a good
>> replacement, we can remove '-Werror' from compiler settings.
>>
>
> It would be good, as I think that classes will not be dropped soon.
> We need to pay attention not to use them in public APIs
>
> Enrico
>
>
>> - Sijie
>>
>>
>>
>>
>> Enrico
>>
> --
>
>
> -- Enrico Olivelli
>
-- 


-- Enrico Olivelli

Re: New used classes in 4.5 are deprecated in Java9

Posted by Enrico Olivelli <eo...@gmail.com>.
Il ven 28 lug 2017, 19:54 Sijie Guo <gu...@gmail.com> ha scritto:

> On Jul 28, 2017 7:34 AM, "Enrico Olivelli" <eo...@gmail.com> wrote:
>
> Hi all,
> I'm back to tring to build and run BookKeeper on java9
>
> recently we added extensive usage of java.uti.Observable and Observer.
>

I have just found this good article

https://dzone.com/articles/javas-observer-and-observable-are-deprecated-in-jd


> This classes have been deprecated in java9 and the build fails, because we
> forbid the usage of deprecated APIs.
>
> These classes are not used on client API but only on Bookie, so I think
> that in 4.6 we can switch them with other internal classes.
>
> Thoughts ?
>
>
> what are the replacements for Observable and Observer in java9?
>
> regardless, I think we should support java8. if we can't find a good
> replacement, we can remove '-Werror' from compiler settings.
>

It would be good, as I think that classes will not be dropped soon.
We need to pay attention not to use them in public APIs

Enrico


> - Sijie
>
>
>
>
> Enrico
>
-- 


-- Enrico Olivelli

Re: New used classes in 4.5 are deprecated in Java9

Posted by Sijie Guo <gu...@gmail.com>.
On Jul 28, 2017 7:34 AM, "Enrico Olivelli" <eo...@gmail.com> wrote:

Hi all,
I'm back to tring to build and run BookKeeper on java9

recently we added extensive usage of java.uti.Observable and Observer.

This classes have been deprecated in java9 and the build fails, because we
forbid the usage of deprecated APIs.

These classes are not used on client API but only on Bookie, so I think
that in 4.6 we can switch them with other internal classes.

Thoughts ?


what are the replacements for Observable and Observer in java9?

regardless, I think we should support java8. if we can't find a good
replacement, we can remove '-Werror' from compiler settings.

- Sijie




Enrico