Skip to content

Instrumentation verification doesn't help when abstract/interface call sites are not instrumented #86

@circlespainter

Description

@circlespainter

For example, the code below triggers a strange exception that instrumentation verification can't diagnose while marking the interface as suspendable solves it.

public class Test { /////////////////////////////////////////////////////////////////////// // Uncomment this to solve the issue /////////////////////////////////////////////////////////////////////// // @Suspendable interface I { void doIt(); } static class C implements I { @Override @Suspendable public void doIt() { try { Fiber.sleep(10); } catch (InterruptedException e) { throw new AssertionError(e); } catch (SuspendExecution suspendExecution) { throw new AssertionError(suspendExecution); } } } static public Integer doAll() throws ExecutionException, InterruptedException { final I i = new C(); Fiber<Integer> increasing = new Fiber<>("INCREASER", new SuspendableCallable<Integer>() { @Override public Integer run() throws SuspendExecution, InterruptedException { Object o = new Object(); try { i.doIt(); } finally { i.doIt(); o.toString(); } return 1; }}).start(); return increasing.get(); } static public void main(String[] args) throws ExecutionException, InterruptedException { doAll(); } }

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions