Guava 14.0 compatibility issue - NPE #234

Closed
apakulov opened this Issue Mar 12, 2013 · 3 comments

Comments

Projects
None yet
3 participants

Guava v14.0 only, v13.0.1 works fine:

java.lang.NullPointerException
at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:191)
at com.google.common.collect.ImmutableClassToInstanceMap.getInstance(ImmutableClassToInstanceMap.java:147)
at com.netflix.astyanax.model.AbstractComposite.serializerForComparator(AbstractComposite.java:301)
at com.netflix.astyanax.model.AbstractComposite.getSerializer(AbstractComposite.java:323)
at com.netflix.astyanax.model.AbstractComposite.deserialize(AbstractComposite.java:680)
at com.netflix.astyanax.serializers.CompositeSerializer.fromByteBuffer(CompositeSerializer.java:26)
at com.netflix.astyanax.serializers.CompositeSerializer.fromByteBuffer(CompositeSerializer.java:8)
at com.netflix.astyanax.serializers.AbstractSerializer.fromBytes(AbstractSerializer.java:44)
at com.netflix.astyanax.thrift.model.ThriftColumnOrSuperColumnListImpl$1IteratorImpl.next(ThriftColumnOrSuperColumnListImpl.java:86)
at com.netflix.astyanax.thrift.model.ThriftColumnOrSuperColumnListImpl$1IteratorImpl.next(ThriftColumnOrSuperColumnListImpl.java:57)
Member

elandau commented Mar 13, 2013

Can you provide a specific unit test that reproduces this problem.

elandau closed this Mar 27, 2013

smreed commented Apr 1, 2013

I'm seeing this issue with astyanax 1.56.34 and Guava 14.0.1.

Here's a unit test that reproduces the issue.

  @Test
  public void isAstyanaxCompatibleWithGuava() {
    CompositeSerializer serializer = CompositeSerializer.get();
    ByteBuffer buffer = serializer.toByteBuffer(new Composite(ImmutableList.of("foo", "bar")));
    // throws NPE from AbstractComposite:308
    Composite composite = serializer.fromByteBuffer(buffer); 
  }

The test passes when I downgrade to Guava 13.0.1.

apakulov commented Apr 3, 2013

@elandau still not fixed for me, removing @nullable annotation is a bad idea, I'd rather have them in place.
Please check unit-test by @smreed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment