@Test(expected = NullPointerException.class) public void testStripPublicSuffixThrowsException() { PublicSuffix.stripPublicSuffix(RuntimeEnvironment.application, null); }
@NonNull @WorkerThread public static String stripPublicSuffix(Context context, @NonNull String domain) { if (domain.length() == 0) { return domain; } final int index = findPublicSuffixIndex(context, domain); if (index == -1) { return domain; } return domain.substring(0, index); }
PublicSuffix { @NonNull @WorkerThread public static String stripPublicSuffix(Context context, @NonNull String domain) { if (domain.length() == 0) { return domain; } final int index = findPublicSuffixIndex(context, domain); if (index == -1) { return domain; } return domain.substring(0, index); } }
PublicSuffix { @NonNull @WorkerThread public static String stripPublicSuffix(Context context, @NonNull String domain) { if (domain.length() == 0) { return domain; } final int index = findPublicSuffixIndex(context, domain); if (index == -1) { return domain; } return domain.substring(0, index); }  }
PublicSuffix { @NonNull @WorkerThread public static String stripPublicSuffix(Context context, @NonNull String domain) { if (domain.length() == 0) { return domain; } final int index = findPublicSuffixIndex(context, domain); if (index == -1) { return domain; } return domain.substring(0, index); }  static void init(Context context); @NonNull @WorkerThread // This method might need to load data from disk static String stripPublicSuffix(Context context, @NonNull String domain); @NonNull @WorkerThread // This method might need to load data from disk static String getPublicSuffix(@NonNull final Context context, @NonNull final String domain, final int additionalPartCount); }
PublicSuffix { @NonNull @WorkerThread public static String stripPublicSuffix(Context context, @NonNull String domain) { if (domain.length() == 0) { return domain; } final int index = findPublicSuffixIndex(context, domain); if (index == -1) { return domain; } return domain.substring(0, index); }  static void init(Context context); @NonNull @WorkerThread // This method might need to load data from disk static String stripPublicSuffix(Context context, @NonNull String domain); @NonNull @WorkerThread // This method might need to load data from disk static String getPublicSuffix(@NonNull final Context context, @NonNull final String domain, final int additionalPartCount);  }