Merge "Fix thread-shared field evades lock acquisition reported by Coverity"

This commit is contained in:
John Reck
2021-03-23 19:55:30 +00:00
committed by Gerrit Code Review

View File

@@ -1196,7 +1196,6 @@ public class Typeface {
/** @hide */ /** @hide */
public boolean isSupportedAxes(int axis) { public boolean isSupportedAxes(int axis) {
if (mSupportedAxes == null) {
synchronized (this) { synchronized (this) {
if (mSupportedAxes == null) { if (mSupportedAxes == null) {
mSupportedAxes = nativeGetSupportedAxes(native_instance); mSupportedAxes = nativeGetSupportedAxes(native_instance);
@@ -1205,7 +1204,6 @@ public class Typeface {
} }
} }
} }
}
return Arrays.binarySearch(mSupportedAxes, axis) >= 0; return Arrays.binarySearch(mSupportedAxes, axis) >= 0;
} }