Skip to content

Commit

Permalink
Fix H2 native DeletedElementException
Browse files Browse the repository at this point in the history
  • Loading branch information
gwenneg committed Jan 16, 2020
1 parent dea977d commit 2d68b72
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,19 @@
import org.h2.engine.ConnectionInfo;
import org.h2.engine.Session;

import com.oracle.svm.core.SubstrateUtil;
import com.oracle.svm.core.annotate.Substitute;
import com.oracle.svm.core.annotate.TargetClass;

@TargetClass(className = "org.h2.engine.Engine")
@Substitute
public final class Engine {

@Substitute
public static org.h2.engine.Engine getInstance() {
return SubstrateUtil.cast(new Engine(), org.h2.engine.Engine.class);
}

@Substitute
public Session createSession(ConnectionInfo ci) {
throw new UnsupportedOperationException(
Expand Down

0 comments on commit 2d68b72

Please sign in to comment.