Fix non-async application detection. Fix javadoc comments.

This commit is contained in:
konsoletyper 2015-03-15 19:03:57 +03:00
parent 17ccec57e9
commit 6964c7190d
2 changed files with 9 additions and 3 deletions

View File

@ -14,10 +14,10 @@
* limitations under the License.
*/
/**
* Represents a class model that is alternative to {@link java.lang.reflection} package.
* Represents a class model that is alternative to {@code java.lang.reflection} package.
* Model is suitable for representing classes that are not in class path. Also
* it allows to disassemble method bodies into three-address code that is very
* close to JVM bytecode (see {@link org.teavm.model.instructions}.
* close to JVM bytecode (see {@code org.teavm.model.instructions}.
*
* <p>The entry point is some implementation of {@link org.teavm.model.ClassHolderSource} interface.
*

View File

@ -109,7 +109,13 @@ public class AsyncMethodFinder {
int.class, void.class))) {
--count;
}
return count > 0;
if (asyncMethods.contains(new MethodReference(Object.class, "monitorEnterWait", Object.class,
int.class, void.class))) {
--count;
}
ClassReader cls = classSource.get("java.lang.Thread");
MethodReader method = cls != null ? cls.getMethod(new MethodDescriptor("start", void.class)) : null;
return count > 0 && method != null;
}
private void add(MethodReference methodRef) {