Skip to content

List.get() marked async because of Vector.get() ... Overzealous #248

@shannah

Description

@shannah

I am working on updating to the latest (0.5.0-SNAPSHOT). I'm hitting new build errors caused by false positives of asynchronous code in a synchronous method. One of the stack traces is below:

[ERROR] Method com.codename1.impl.html5.HTML5Implementation$14.onAnimationFrame(I)V is claimed to be synchronous, but it is has invocations of asynchronous methods:
    calling com.codename1.impl.html5.HTML5Implementation$14.onAnimationFrame(I)V
    calling java.util.AbstractList$1.next()Ljava/lang/Object;
    calling java.util.Vector.get(I)Ljava/lang/Object;
    calling java.util.Vector.elementAt(I)Ljava/lang/Object;
    at com.codename1.impl.html5.HTML5Implementation$14.onAnimationFrame

The onAnimationFrame() method uses ArrayList, which internally uses List. It looks like it is marking List.get(int) as async because Vector implements that method.

If I set "stopOnErrors=false", then the build completes (with those warnings printed out), and the app works fine.

Test case: https://github.com/shannah/teavm-issue-248

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions