Skip to content

Commit

Permalink
Merge pull request #21118 from wordpress-mobile/bump_checkstyle_8_29
Browse files Browse the repository at this point in the history
Bump `checkstyle` to `10.17.0`
  • Loading branch information
wzieba authored Aug 8, 2024
2 parents 4c6c953 + 72a4b0e commit 4d9631b
Show file tree
Hide file tree
Showing 32 changed files with 80 additions and 77 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@

import javax.inject.Inject;

import dagger.hilt.android.testing.HiltAndroidRule;
import dagger.hilt.android.testing.HiltAndroidTest;

import static junit.framework.TestCase.assertFalse;
import static junit.framework.TestCase.assertNotNull;
import static junit.framework.TestCase.assertTrue;

import dagger.hilt.android.testing.HiltAndroidRule;
import dagger.hilt.android.testing.HiltAndroidTest;

@HiltAndroidTest
public class UserAgentTest {
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
import org.junit.Test;
import org.wordpress.android.FactoryUtils;

import dagger.hilt.android.testing.HiltAndroidTest;

import static junit.framework.TestCase.assertEquals;
import static junit.framework.TestCase.assertNull;

import dagger.hilt.android.testing.HiltAndroidTest;

@HiltAndroidTest
public class AuthenticatorRequestTest {
RestClient mRestClient;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;

import static junit.framework.TestCase.assertTrue;

import dagger.hilt.android.testing.HiltAndroidRule;
import dagger.hilt.android.testing.HiltAndroidTest;

import static junit.framework.TestCase.assertTrue;

@HiltAndroidTest
public class WPNetworkImageViewTest {
@Rule(order = 0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@
import java.util.Locale;
import java.util.TimeZone;

import dagger.hilt.android.testing.HiltAndroidRule;

import static androidx.compose.ui.test.junit4.AndroidComposeTestRule_androidKt.createComposeRule;
import static com.github.tomakehurst.wiremock.core.WireMockConfiguration.options;
import static com.google.android.apps.common.testing.accessibility.framework.AccessibilityCheckResultUtils.matchesTypes;
Expand All @@ -56,8 +58,6 @@
import static org.wordpress.android.BuildConfig.E2E_WP_COM_USER_PASSWORD;
import static org.wordpress.android.support.WPSupportUtils.isElementDisplayed;

import dagger.hilt.android.testing.HiltAndroidRule;

public class BaseTest {
static final String TAG = BaseTest.class.getSimpleName();
public static final int WIREMOCK_PORT = 8080;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
import org.junit.Test;
import org.wordpress.android.util.HtmlUtils;

import dagger.hilt.android.testing.HiltAndroidTest;

import static junit.framework.TestCase.assertEquals;
import static junit.framework.TestCase.assertNotNull;
import static junit.framework.TestCase.assertTrue;

import dagger.hilt.android.testing.HiltAndroidTest;

@HiltAndroidTest
public class NotesParseTest {
@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

import org.junit.Test;

import dagger.hilt.android.testing.HiltAndroidTest;

import static junit.framework.TestCase.assertEquals;
import static junit.framework.TestCase.assertFalse;
import static junit.framework.TestCase.assertTrue;

import dagger.hilt.android.testing.HiltAndroidTest;

@HiltAndroidTest
public class PostUtilsTest {
@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@

import java.util.Locale;

import dagger.hilt.android.testing.HiltAndroidTest;
import tools.fastlane.screengrab.Screengrab;
import tools.fastlane.screengrab.UiAutomatorScreenshotStrategy;
import tools.fastlane.screengrab.locale.LocaleTestRule;

import static androidx.test.espresso.Espresso.onData;
import static androidx.test.espresso.Espresso.onView;
import static androidx.test.espresso.action.ViewActions.click;
Expand Down Expand Up @@ -54,11 +59,6 @@
import static org.wordpress.android.support.WPSupportUtils.waitForElementToBeDisplayedWithoutFailure;
import static org.wordpress.android.support.WPSupportUtils.waitForImagesOfTypeWithPlaceholder;

import dagger.hilt.android.testing.HiltAndroidTest;
import tools.fastlane.screengrab.Screengrab;
import tools.fastlane.screengrab.UiAutomatorScreenshotStrategy;
import tools.fastlane.screengrab.locale.LocaleTestRule;

@LargeTest
@HiltAndroidTest
public class JPScreenshotTest extends BaseTest {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@
import org.wordpress.android.util.UiTestingUtils;
import org.wordpress.android.util.image.ImageType;

import dagger.hilt.android.testing.HiltAndroidTest;
import tools.fastlane.screengrab.Screengrab;
import tools.fastlane.screengrab.UiAutomatorScreenshotStrategy;
import tools.fastlane.screengrab.locale.LocaleTestRule;

import static org.wordpress.android.support.WPSupportUtils.clickOn;
import static org.wordpress.android.support.WPSupportUtils.clickOnViewWithTag;
import static org.wordpress.android.support.WPSupportUtils.getCurrentActivity;
Expand All @@ -38,11 +43,6 @@
import static org.wordpress.android.support.WPSupportUtils.waitForElementToBeDisplayedWithoutFailure;
import static org.wordpress.android.support.WPSupportUtils.waitForImagesOfTypeWithPlaceholder;

import dagger.hilt.android.testing.HiltAndroidTest;
import tools.fastlane.screengrab.Screengrab;
import tools.fastlane.screengrab.UiAutomatorScreenshotStrategy;
import tools.fastlane.screengrab.locale.LocaleTestRule;

@LargeTest
@HiltAndroidTest
public class WPScreenshotTest extends BaseTest {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
import org.junit.Rule;
import org.junit.Test;

import static junit.framework.TestCase.assertEquals;

import dagger.hilt.android.testing.HiltAndroidRule;
import dagger.hilt.android.testing.HiltAndroidTest;

import static junit.framework.TestCase.assertEquals;

@HiltAndroidTest
public class AutolinkUtilsTest {
@Rule
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

import org.junit.Test;

import static junit.framework.TestCase.assertEquals;

import dagger.hilt.android.testing.HiltAndroidTest;

import static junit.framework.TestCase.assertEquals;

@HiltAndroidTest
public class UrlUtilsTest {
@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
import java.net.URISyntaxException;
import java.net.URL;

import dagger.hilt.android.testing.HiltAndroidTest;

import static junit.framework.TestCase.assertFalse;
import static junit.framework.TestCase.assertTrue;

import dagger.hilt.android.testing.HiltAndroidTest;

@HiltAndroidTest
public class WPUrlUtilsTest {
private static final String WPCOM_ADDRESS_1 = "http://wordpress.com/xmlrpc.php";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
import dagger.hilt.android.qualifiers.ApplicationContext;
import dagger.hilt.components.SingletonComponent;
import kotlinx.coroutines.CoroutineScope;

import static org.wordpress.android.modules.ThreadModuleKt.APPLICATION_SCOPE;

@InstallIn(SingletonComponent.class)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@

import javax.inject.Inject;

import static org.wordpress.android.push.GCMMessageHandler.PUSH_TYPE_ZENDESK;

import dagger.hilt.android.AndroidEntryPoint;

import static org.wordpress.android.push.GCMMessageHandler.PUSH_TYPE_ZENDESK;

@AndroidEntryPoint
public class GCMMessageService extends FirebaseMessagingService {
public static final String EXTRA_VOICE_OR_INLINE_REPLY = "extra_voice_or_inline_reply";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,11 @@

import javax.inject.Inject;

import dagger.hilt.android.AndroidEntryPoint;

import static org.wordpress.android.push.NotificationPushIds.GROUP_NOTIFICATION_ID;
import static org.wordpress.android.push.NotificationPushIds.QUICK_START_REMINDER_NOTIFICATION_ID;

import dagger.hilt.android.AndroidEntryPoint;

/**
* service which makes it possible to process Notifications quick actions in the background,
* such as:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,13 @@

import javax.inject.Inject;

import static org.wordpress.android.util.ActivityUtils.hideKeyboard;

import dagger.android.AndroidInjector;
import dagger.android.DispatchingAndroidInjector;
import dagger.android.HasAndroidInjector;
import dagger.hilt.android.AndroidEntryPoint;

import static org.wordpress.android.util.ActivityUtils.hideKeyboard;

@AndroidEntryPoint
public class LoginActivity extends LocaleAwareActivity implements ConnectionCallbacks, OnConnectionFailedListener,
Callback, LoginListener, GoogleListener, LoginPrologueListener,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@

import javax.inject.Inject;

import static org.wordpress.android.ui.comments.unified.CommentConstants.COMMENTS_PER_PAGE;

import dagger.hilt.android.AndroidEntryPoint;

import static org.wordpress.android.ui.comments.unified.CommentConstants.COMMENTS_PER_PAGE;

/**
* @deprecated
* Comments are being refactored as part of Comments Unification project. If you are adding any
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@

import javax.inject.Inject;

import dagger.hilt.android.AndroidEntryPoint;

import static org.wordpress.android.WordPress.getContext;
import static org.wordpress.android.ui.main.WPMainActivity.ARG_BYPASS_MIGRATION;

import dagger.hilt.android.AndroidEntryPoint;

/**
* An activity to handle deep linking and intercepting links like:
* <p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,18 +185,18 @@

import javax.inject.Inject;

import dagger.hilt.android.AndroidEntryPoint;
import kotlin.Unit;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function3;

import static androidx.lifecycle.Lifecycle.State.STARTED;
import static org.wordpress.android.WordPress.SITE;
import static org.wordpress.android.fluxc.store.SiteStore.CompleteQuickStartVariant.NEXT_STEPS;
import static org.wordpress.android.login.LoginAnalyticsListener.CreatedAccountSource.EMAIL;
import static org.wordpress.android.push.NotificationsProcessingService.ARG_NOTIFICATION_TYPE;
import static org.wordpress.android.ui.JetpackConnectionSource.NOTIFICATIONS;

import dagger.hilt.android.AndroidEntryPoint;
import kotlin.Unit;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function3;

/**
* Main activity which hosts sites, reader, me and notifications pages
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@
import javax.inject.Inject;
import javax.inject.Named;

import static org.wordpress.android.modules.ThreadModuleKt.APPLICATION_SCOPE;

import kotlinx.coroutines.CoroutineScope;

import static org.wordpress.android.modules.ThreadModuleKt.APPLICATION_SCOPE;

/**
* An adapter for the media gallery grid.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,14 @@

import javax.inject.Inject;

import dagger.hilt.android.AndroidEntryPoint;

import static org.wordpress.android.models.Note.NOTE_COMMENT_LIKE_TYPE;
import static org.wordpress.android.models.Note.NOTE_COMMENT_TYPE;
import static org.wordpress.android.models.Note.NOTE_FOLLOW_TYPE;
import static org.wordpress.android.models.Note.NOTE_LIKE_TYPE;
import static org.wordpress.android.ui.notifications.services.NotificationsUpdateServiceStarter.IS_TAPPED_ON_NOTIFICATION;

import dagger.hilt.android.AndroidEntryPoint;

@AndroidEntryPoint
@SuppressWarnings("deprecation")
public class NotificationsDetailActivity extends LocaleAwareActivity implements
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@

import javax.inject.Inject;

import kotlin.Unit;

import static com.google.android.material.textfield.TextInputLayout.END_ICON_DROPDOWN_MENU;
import static com.google.android.material.textfield.TextInputLayout.END_ICON_NONE;

import kotlin.Unit;

public class PeopleInviteFragment extends Fragment implements RoleSelectDialogFragment.OnRoleSelectListener,
PeopleManagementActivity.InvitationSender {
private static final String URL_USER_ROLES_DOCUMENTATION = "https://en.support.wordpress.com/user-roles/";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,10 @@

import javax.inject.Inject;

import static org.wordpress.android.ui.prefs.WPComSiteSettings.supportsJetpackSiteAcceleratorSettings;

import kotlin.Triple;

import static org.wordpress.android.ui.prefs.WPComSiteSettings.supportsJetpackSiteAcceleratorSettings;

/**
* Allows interfacing with WordPress site settings. Works with WP.com and WP.org v4.5+ (pending).
* <p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@

import javax.inject.Inject;

import static org.wordpress.android.ui.publicize.PublicizeTwitterDeprecationNoticeConstantsKt.TWITTER_DEPRECATION_FIND_OUT_MORE_URL;

import kotlin.Unit;

import static org.wordpress.android.ui.publicize.PublicizeTwitterDeprecationNoticeConstantsKt.TWITTER_DEPRECATION_FIND_OUT_MORE_URL;

public class PublicizeDetailFragment extends PublicizeBaseFragment
implements PublicizeConnectionAdapter.OnAdapterLoadedListener {
private SiteModel mSite;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@

import javax.inject.Inject;

import static org.wordpress.android.fluxc.store.QuickStartStore.QuickStartNewSiteTask.ENABLE_POST_SHARING;

import dagger.hilt.android.AndroidEntryPoint;
import kotlin.Unit;

import static org.wordpress.android.fluxc.store.QuickStartStore.QuickStartNewSiteTask.ENABLE_POST_SHARING;

@AndroidEntryPoint
public class PublicizeListFragment extends PublicizeBaseFragment {
public interface PublicizeButtonPrefsListener {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@

import javax.inject.Inject;

import static org.wordpress.android.push.NotificationsProcessingService.ARG_NOTIFICATION_TYPE;

import dagger.hilt.android.AndroidEntryPoint;

import static org.wordpress.android.push.NotificationsProcessingService.ARG_NOTIFICATION_TYPE;

@AndroidEntryPoint
public class QuickStartReminderReceiver extends BroadcastReceiver {
public static final String ARG_QUICK_START_TASK_BATCH = "ARG_QUICK_START_TASK_BATCH";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,15 +96,15 @@

import javax.inject.Inject;

import dagger.hilt.android.AndroidEntryPoint;
import kotlin.Unit;

import static org.wordpress.android.ui.CommentFullScreenDialogFragment.RESULT_REPLY;
import static org.wordpress.android.ui.CommentFullScreenDialogFragment.RESULT_SELECTION_END;
import static org.wordpress.android.ui.CommentFullScreenDialogFragment.RESULT_SELECTION_START;
import static org.wordpress.android.ui.reader.FollowConversationUiStateKt.FOLLOW_CONVERSATION_UI_STATE_FLAGS_KEY;
import static org.wordpress.android.util.WPSwipeToRefreshHelper.buildSwipeToRefreshHelper;

import dagger.hilt.android.AndroidEntryPoint;
import kotlin.Unit;

@AndroidEntryPoint
public class ReaderCommentListActivity extends LocaleAwareActivity implements OnConfirmListener,
OnCollapseListener {
Expand Down
Loading

0 comments on commit 4d9631b

Please sign in to comment.