Elffuss BraidHub

kikocis/java-driver public

JAVA-1284: ClockFactory should check system property before attempting to load Native class. (#746)

Changeset86638feb1f1b6ce6413e874d3f7abc10cd8b6c6592b5d18628a344f73ea9c5cf
AuthorAlexandre Dutra <adutra@users.noreply.github.com> · 2016-10-03 18:01 +02:00
CommitterOlivier Michallat <olim7t@users.noreply.github.com> · 2016-10-03 09:01 -07:00
Parentsabdd6dc3f281

Browse the files at this changeset

2 files changed

modified changelog/README.md +2 −0
@@ -2,6 +2,8 @@
22
33 ### 3.1.1
44
5+- [bug] JAVA-1284: ClockFactory should check system property before attempting to load Native class.
6+
57 Merged from 3.0.x:
68
79 - [improvement] JAVA-1246: Driver swallows the real exception in a few cases
modified driver-core/src/main/java/com/datastax/driver/core/Clock.java +1 −1
@@ -48,7 +48,7 @@
4848 private static final String USE_NATIVE_CLOCK_SYSTEM_PROPERTY = "com.datastax.driver.USE_NATIVE_CLOCK";
4949
5050 static Clock newInstance() {
51- if (Native.isGettimeofdayAvailable() && SystemProperties.getBoolean(USE_NATIVE_CLOCK_SYSTEM_PROPERTY, true)) {
51+ if (SystemProperties.getBoolean(USE_NATIVE_CLOCK_SYSTEM_PROPERTY, true) && Native.isGettimeofdayAvailable()) {
5252 LOGGER.info("Using native clock to generate timestamps.");
5353 return new NativeClock();
5454 } else {