@Test public void testReadFromFileNonNullWhenNull() { final String fileName = "protoUtilsReadFromFileNonNullWhenNull"; final Context context = RuntimeEnvironment.application; context.deleteFile(fileName); final SettingsProto.Settings read = ProtoUtils.readFromFileNonNull( context, fileName, new SettingsProto.Settings()); assertNotNull(read); }
@NonNull public static <T extends MessageNano> T readFromFileNonNull(@NonNull final Context context, @NonNull final String fileName, @NonNull final T obj) { final T message = readFromFile(context, fileName, obj); return message != null ? message : obj; }
ProtoUtils { @NonNull public static <T extends MessageNano> T readFromFileNonNull(@NonNull final Context context, @NonNull final String fileName, @NonNull final T obj) { final T message = readFromFile(context, fileName, obj); return message != null ? message : obj; } }
ProtoUtils { @NonNull public static <T extends MessageNano> T readFromFileNonNull(@NonNull final Context context, @NonNull final String fileName, @NonNull final T obj) { final T message = readFromFile(context, fileName, obj); return message != null ? message : obj; } private  ProtoUtils(); }
ProtoUtils { @NonNull public static <T extends MessageNano> T readFromFileNonNull(@NonNull final Context context, @NonNull final String fileName, @NonNull final T obj) { final T message = readFromFile(context, fileName, obj); return message != null ? message : obj; } private  ProtoUtils(); @NonNull static byte[] toByteArray(@NonNull final MessageNano messageNano); static void writeToFile(@NonNull final Context context,
            @NonNull final String fileName,
            @NonNull final MessageNano messageNano); @Nullable static T readFromFile(@NonNull final Context context,
            @NonNull final String fileName,
            @NonNull final T obj); @NonNull static T readFromFileNonNull(@NonNull final Context context,
            @NonNull final String fileName,
            @NonNull final T obj); }
ProtoUtils { @NonNull public static <T extends MessageNano> T readFromFileNonNull(@NonNull final Context context, @NonNull final String fileName, @NonNull final T obj) { final T message = readFromFile(context, fileName, obj); return message != null ? message : obj; } private  ProtoUtils(); @NonNull static byte[] toByteArray(@NonNull final MessageNano messageNano); static void writeToFile(@NonNull final Context context,
            @NonNull final String fileName,
            @NonNull final MessageNano messageNano); @Nullable static T readFromFile(@NonNull final Context context,
            @NonNull final String fileName,
            @NonNull final T obj); @NonNull static T readFromFileNonNull(@NonNull final Context context,
            @NonNull final String fileName,
            @NonNull final T obj);  }