Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'[skip ci] [RN][Android] Mark classes of packages reactperflogger as @Nullsafe #42855

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ private constructor(
cxxReactPackages: List<CxxReactPackage>,
) : ReactPackageTurboModuleManagerDelegate(context, packages, initHybrid(cxxReactPackages)) {

override fun initHybrid(): HybridData? {
override fun initHybrid(): HybridData {
throw UnsupportedOperationException(
"DefaultTurboModuleManagerDelegate.initHybrid() must never be called!")
}
Expand Down Expand Up @@ -72,6 +72,6 @@ private constructor(

@DoNotStrip
@JvmStatic
external fun initHybrid(cxxReactPackages: List<CxxReactPackage>): HybridData?
external fun initHybrid(cxxReactPackages: List<CxxReactPackage>): HybridData
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@

package com.facebook.react.internal;

import com.facebook.infer.annotation.Nullsafe;
import com.facebook.react.bridge.UiThreadUtil;

/** An implementation of ChoreographerProvider that directly uses android.view.Choreographer. */
@Nullsafe(Nullsafe.Mode.LOCAL)
public final class AndroidChoreographerProvider implements ChoreographerProvider {

public static final class AndroidChoreographer implements ChoreographerProvider.Choreographer {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,15 @@
package com.facebook.react.internal.turbomodule.core;

import androidx.annotation.Nullable;
import com.facebook.infer.annotation.Nullsafe;
import com.facebook.jni.HybridData;
import com.facebook.proguard.annotations.DoNotStrip;
import com.facebook.react.bridge.NativeModule;
import com.facebook.react.internal.turbomodule.core.interfaces.TurboModule;
import java.util.ArrayList;
import java.util.List;

@Nullsafe(Nullsafe.Mode.LOCAL)
public abstract class TurboModuleManagerDelegate {
@DoNotStrip
@SuppressWarnings("unused")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@

package com.facebook.react.internal.turbomodule.core;

import com.facebook.infer.annotation.Nullsafe;
import com.facebook.proguard.annotations.DoNotStrip;
import com.facebook.react.perflogger.NativeModulePerfLogger;
import javax.annotation.Nullable;

@Nullsafe(Nullsafe.Mode.LOCAL)
@DoNotStrip
class TurboModulePerfLogger {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@

package com.facebook.react.jstasks;

import com.facebook.infer.annotation.Nullsafe;

@Nullsafe(Nullsafe.Mode.LOCAL)
public class LinearCountingRetryPolicy implements HeadlessJsTaskRetryPolicy {

private final int mRetryAttempts;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@

package com.facebook.react.jstasks;

import com.facebook.infer.annotation.Nullsafe;

@Nullsafe(Nullsafe.Mode.LOCAL)
class NoRetryPolicy implements HeadlessJsTaskRetryPolicy {

public static final NoRetryPolicy INSTANCE = new NoRetryPolicy();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import android.util.Base64;
import androidx.annotation.Nullable;
import com.facebook.common.logging.FLog;
import com.facebook.infer.annotation.Nullsafe;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
Expand All @@ -20,6 +21,7 @@
import java.util.Map;
import org.json.JSONObject;

@Nullsafe(Nullsafe.Mode.LOCAL)
public class FileIoHandler implements Runnable {
private static final String TAG = JSPackagerClient.class.getSimpleName();
private static final long FILE_TTL = 30 * 1000;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@

import androidx.annotation.Nullable;
import com.facebook.common.logging.FLog;
import com.facebook.infer.annotation.Nullsafe;

@Nullsafe(Nullsafe.Mode.LOCAL)
public abstract class NotificationOnlyHandler implements RequestHandler {
private static final String TAG = JSPackagerClient.class.getSimpleName();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@
import androidx.annotation.Nullable;
import com.facebook.common.logging.FLog;
import com.facebook.infer.annotation.Assertions;
import com.facebook.infer.annotation.Nullsafe;
import com.facebook.react.modules.systeminfo.AndroidInfoHelpers;

@Nullsafe(Nullsafe.Mode.LOCAL)
public class PackagerConnectionSettings {
private static final String TAG = PackagerConnectionSettings.class.getSimpleName();
private static final String PREFS_DEBUG_SERVER_HOST_KEY = "debug_http_host";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@

import androidx.annotation.Nullable;
import com.facebook.common.logging.FLog;
import com.facebook.infer.annotation.Nullsafe;

@Nullsafe(Nullsafe.Mode.LOCAL)
public abstract class RequestOnlyHandler implements RequestHandler {
private static final String TAG = JSPackagerClient.class.getSimpleName();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@

package com.facebook.react.perflogger;

import com.facebook.infer.annotation.Nullsafe;
import com.facebook.jni.HybridData;
import com.facebook.soloader.SoLoader;

@Nullsafe(Nullsafe.Mode.LOCAL)
public abstract class NativeModulePerfLogger {
private final HybridData mHybridData;

Expand Down
Loading