Skip to content

Conversation

@dekobon
Copy link
Contributor

@dekobon dekobon commented Nov 27, 2017

Referencing #356

  • Adds support for the Azul Zulu JDK to the Travis CI test matrix.
  • Fixes runtime issues with Kryo module on Java 9.

@dekobon dekobon requested a review from tjcelaya November 27, 2017 21:32
import org.bouncycastle.jcajce.spec.GOST28147ParameterSpec;
import org.bouncycastle.jcajce.util.BCJcaJceHelper;
import org.objenesis.instantiator.sun.MagicInstantiator;
import org.objenesis.instantiator.sun.UnsafeFactoryInstantiator;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The implementation of MagicInstantiator was using a security problem in the JDK to perform construction less instantiation and in Java 9 the "security problem" was resolved with no backwards compatibility added. I switched to using the UnsafeFactoryInstantiator because it uses the Java unsafe package which is still available in Java 9 and is also available across different JVM vendors.

Copy link
Contributor

@tjcelaya tjcelaya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see warnings about module encapsulation in the Azul 9 logs, only deprecated usage of isAccessible, unchecked-casts and raw types. Please fix these wherever possible or add suppressions:

[WARNING] /home/travis/build/joyent/java-manta/java-manta-client-kryo-serialization/src/main/java/com/joyent/manta/serialization/ReflectionUtils.java:[122,19] isAccessible() in java.lang.reflect.AccessibleObject has been deprecated
[WARNING] /home/travis/build/joyent/java-manta/java-manta-client-kryo-serialization/src/main/java/com/joyent/manta/serialization/ReflectionUtils.java:[149,19] isAccessible() in java.lang.reflect.AccessibleObject has been deprecated
[WARNING] /home/travis/build/joyent/java-manta/java-manta-client-kryo-serialization/src/main/java/com/joyent/manta/serialization/BaseBlockCipherSerializer.java:[145,38] found raw type: org.objenesis.instantiator.sun.UnsafeFactoryInstantiator
  missing type arguments for generic class org.objenesis.instantiator.sun.UnsafeFactoryInstantiator<T>
[WARNING] /home/travis/build/joyent/java-manta/java-manta-client-kryo-serialization/src/main/java/com/joyent/manta/serialization/BaseBlockCipherSerializer.java:[145,34] unchecked call to UnsafeFactoryInstantiator(java.lang.Class<T>) as a member of the raw type org.objenesis.instantiator.sun.UnsafeFactoryInstantiator
[WARNING] /home/travis/build/joyent/java-manta/java-manta-client-kryo-serialization/src/main/java/com/joyent/manta/serialization/BaseBlockCipherSerializer.java:[147,38] found raw type: org.objenesis.instantiator.sun.UnsafeFactoryInstantiator
  missing type arguments for generic class org.objenesis.instantiator.sun.UnsafeFactoryInstantiator<T>
[WARNING] /home/travis/build/joyent/java-manta/java-manta-client-kryo-serialization/src/main/java/com/joyent/manta/serialization/BaseBlockCipherSerializer.java:[147,34] unchecked call to UnsafeFactoryInstantiator(java.lang.Class<T>) as a member of the raw type org.objenesis.instantiator.sun.UnsafeFactoryInstantiator

@dekobon
Copy link
Contributor Author

dekobon commented Nov 27, 2017

Warnings have been resolved.

@tjcelaya
Copy link
Contributor

tjcelaya commented Nov 27, 2017

One last deprecation remains:

[WARNING] /home/travis/build/joyent/java-manta/java-manta-client-kryo-serialization/src/main/java/com/joyent/manta/serialization/ReflectionUtils.java:[150,19] isAccessible() in java.lang.reflect.AccessibleObject has been deprecated

@tjcelaya tjcelaya merged commit 9c65a25 into TritonDataCenter:master Nov 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants