As a little experiment, I created the following method in an Android application:
private void test(@NonNull Object o) {
o.toString();
}
, " " ApkTool smali :
.method private test(Ljava/lang/Object;)V
.locals 0
.param p1, "o"
.annotation build Landroid/support/annotation/NonNull;
.end annotation
.end param
.prologue
.line 22
invoke-virtual {p1}, Ljava/lang/Object;->toString()Ljava/lang/String;
.line 23
return-void
.end method
, Nonnull
.
Android, null
. NullPointerExeption
o.toString()
, , . , .
, VM , null
.