-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Description
Starting with google-cloud-datastore:1.2.1, a user exception thrown within a datastore transaction (runInTransaction) triggers a NullPointerException in com.google.cloud.datastore.TransactionExceptionHandler. The original exception is swallowed.
For reference, a minimal build.gradle which triggers the problem on gradle run is:
import com.google.cloud.datastore.DatastoreOptions;
buildscript {
repositories {
mavenCentral()
maven {
url "https://jitpack.io"
}
}
dependencies {
//classpath "com.google.cloud:google-cloud-datastore:1.2.0" // works
classpath "com.google.cloud:google-cloud-datastore:1.2.1" // breaks
//classpath "com.google.cloud:google-cloud-datastore:1.2.2" // breaks
//classpath "com.github.GoogleCloudPlatform.google-cloud-java:google-cloud-datastore:95f0dd7eb3b7b360ce51b1930c1f75cc2bb91140" // breaks
}
}
task run() {
def ds = DatastoreOptions.newBuilder()
.build()
.getService();
ds.runInTransaction({ rw ->
throw new RuntimeException("foobar");
});
}
Metadata
Metadata
Assignees
Labels
No labels