You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-dev@jackrabbit.apache.org by Torgeir Veimo <to...@gmail.com> on 2016/12/01 13:26:37 UTC

guava ByteStreams.equal()

The method

ByteStreams.equal(InputSupplier, InputSupplier)

is deprecated in guava 17 and removed in guava 18. Would it be an idea to
replace the call to it by using the

ByteSource.contentEquals(ByteSource)

as suggested in guava 17?

This would make it easier to deploy in a non-ogsi environment when using
guava 18.0+.
-- 
-Tor

Re: guava ByteStreams.equal()

Posted by Torgeir Veimo <to...@gmail.com>.
Ok, filed https://issues.apache.org/jira/browse/OAK-5215 with a patch. It
makes it possible to run with guava up to version 19.0. There are a few
additional changes required to run with version 20.0.

On 1 December 2016 at 23:58, Alex Parvulescu <al...@gmail.com>
wrote:

> Hi,
>
> It's not a bad idea, I see we use this method only in 2 places [0] and [1],
> and this change would not even need to have the guava version updated on
> oak as far as I see it.
> It would be good if you could create an issue and attach a patch for
> review.
>
> best,
> alex
>
>
> [0]
> https://github.com/apache/jackrabbit-oak/blob/trunk/oak-
> core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/
> AbstractBlob.java#L68
> [1]
> https://github.com/apache/jackrabbit-oak/blob/trunk/oak-
> upgrade/src/test/java/org/apache/jackrabbit/oak/upgrade/blob/
> LengthCachingDataStoreTest.java#L109
>
>
>
> On Thu, Dec 1, 2016 at 2:26 PM, Torgeir Veimo <to...@gmail.com>
> wrote:
>
> > The method
> >
> > ByteStreams.equal(InputSupplier, InputSupplier)
> >
> > is deprecated in guava 17 and removed in guava 18. Would it be an idea to
> > replace the call to it by using the
> >
> > ByteSource.contentEquals(ByteSource)
> >
> > as suggested in guava 17?
> >
> > This would make it easier to deploy in a non-ogsi environment when using
> > guava 18.0+.
> > --
> > -Tor
> >
>



-- 
-Tor

Re: guava ByteStreams.equal()

Posted by Alex Parvulescu <al...@gmail.com>.
Hi,

It's not a bad idea, I see we use this method only in 2 places [0] and [1],
and this change would not even need to have the guava version updated on
oak as far as I see it.
It would be good if you could create an issue and attach a patch for review.

best,
alex


[0]
https://github.com/apache/jackrabbit-oak/blob/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/AbstractBlob.java#L68
[1]
https://github.com/apache/jackrabbit-oak/blob/trunk/oak-upgrade/src/test/java/org/apache/jackrabbit/oak/upgrade/blob/LengthCachingDataStoreTest.java#L109



On Thu, Dec 1, 2016 at 2:26 PM, Torgeir Veimo <to...@gmail.com>
wrote:

> The method
>
> ByteStreams.equal(InputSupplier, InputSupplier)
>
> is deprecated in guava 17 and removed in guava 18. Would it be an idea to
> replace the call to it by using the
>
> ByteSource.contentEquals(ByteSource)
>
> as suggested in guava 17?
>
> This would make it easier to deploy in a non-ogsi environment when using
> guava 18.0+.
> --
> -Tor
>