[java] add `@Nullable` annotations to Integer and Double models

Summary: Let's see if this changes anything in the CI.

Reviewed By: jeremydubreil

Differential Revision: D14024087

fbshipit-source-id: 5d7642b10
master
Jules Villard 6 years ago committed by Facebook Github Bot
parent b52f2eb4be
commit 1ee74dc967

@ -7,6 +7,8 @@
package java.lang;
import javax.annotation.Nullable;
public final class Double {
protected final double value;
@ -19,7 +21,7 @@ public final class Double {
return new Double(i);
}
public boolean equals(Object anObject) {
public boolean equals(@Nullable Object anObject) {
return anObject != null
&& anObject instanceof Double
&& this.value == ((Double) anObject).value;

@ -7,6 +7,8 @@
package java.lang;
import javax.annotation.Nullable;
public final class Integer {
public static int MAX_VALUE = 2147483647; // 2**31-1
@ -22,7 +24,7 @@ public final class Integer {
return new Integer(i);
}
public boolean equals(Object anObject) {
public boolean equals(@Nullable Object anObject) {
return anObject != null
&& anObject instanceof Integer
&& this.value == ((Integer) anObject).value;

Loading…
Cancel
Save