Skip to content

Commit 43368df

Browse files
fix checkstyle
1 parent 749b6c0 commit 43368df

File tree

6 files changed

+98
-107
lines changed

6 files changed

+98
-107
lines changed

iterableapi/src/main/java/com/iterable/iterableapi/IterableFirebaseMessagingService.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public static boolean handleMessageReceived(@NonNull Context context, @NonNull R
5858
}
5959

6060
boolean isGhostPush = IterableNotificationHelper.isGhostPush(extras);
61-
61+
6262
if (!isGhostPush) {
6363
if (!IterableNotificationHelper.isEmptyBody(extras)) {
6464
IterableLogger.d(TAG, "Iterable push received " + messageData);
@@ -139,7 +139,7 @@ public static boolean isGhostPush(RemoteMessage remoteMessage) {
139139

140140
private static void enqueueNotificationWork(@NonNull final Context context, @NonNull final Bundle extras, boolean isGhostPush) {
141141
IterableNotificationWorkScheduler scheduler = new IterableNotificationWorkScheduler(context);
142-
142+
143143
scheduler.scheduleNotificationWork(
144144
extras,
145145
isGhostPush,

iterableapi/src/main/java/com/iterable/iterableapi/IterableNotificationWorkScheduler.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class IterableNotificationWorkScheduler {
3131
* Callback interface for work scheduling results.
3232
* Allows caller to handle success/failure appropriately.
3333
*/
34-
public interface SchedulerCallback {
34+
interface SchedulerCallback {
3535
/**
3636
* Called when work is successfully scheduled.
3737
* @param workId UUID of the scheduled work
@@ -49,17 +49,17 @@ public interface SchedulerCallback {
4949
/**
5050
* Constructor for production use.
5151
* Initializes with application context and default WorkManager instance.
52-
*
52+
*
5353
* @param context Application or service context
5454
*/
55-
public IterableNotificationWorkScheduler(@NonNull Context context) {
55+
IterableNotificationWorkScheduler(@NonNull Context context) {
5656
this(context, WorkManager.getInstance(context));
5757
}
5858

5959
/**
6060
* Constructor for testing.
6161
* Allows injection of mock WorkManager for unit testing.
62-
*
62+
*
6363
* @param context Application or service context
6464
* @param workManager WorkManager instance (can be mocked for tests)
6565
*/
@@ -71,11 +71,11 @@ public IterableNotificationWorkScheduler(@NonNull Context context) {
7171

7272
/**
7373
* Schedules notification processing work using WorkManager.
74-
*
74+
*
7575
* Creates an expedited OneTimeWorkRequest and enqueues it with WorkManager.
7676
* Expedited execution ensures high-priority notifications are processed promptly,
7777
* with quota exemption when called from FCM onMessageReceived.
78-
*
78+
*
7979
* @param notificationData Bundle containing notification data
8080
* @param isGhostPush Whether this is a ghost/silent push
8181
* @param callback Optional callback for success/failure (can be null)
@@ -93,7 +93,7 @@ public void scheduleNotificationWork(
9393
try {
9494
IterableLogger.d(TAG, "Step 1: Creating Worker input data");
9595
androidx.work.Data inputData = IterableNotificationWorker.createInputData(
96-
notificationData,
96+
notificationData,
9797
isGhostPush
9898
);
9999
IterableLogger.d(TAG, " ✓ Worker input data created successfully");

iterableapi/src/test/java/com/iterable/iterableapi/IterableFirebaseMessagingServiceTest.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
import static junit.framework.Assert.assertEquals;
3030
import static junit.framework.TestCase.assertFalse;
3131
import static junit.framework.TestCase.assertTrue;
32-
import static junit.framework.TestCase.assertNotNull;
3332
import static org.mockito.ArgumentMatchers.any;
3433
import static org.mockito.ArgumentMatchers.eq;
3534
import static org.mockito.Mockito.atLeastOnce;
@@ -171,7 +170,7 @@ public void testWorkManagerIsUsedForNotifications() throws Exception {
171170
// Verify WorkManager has enqueued work
172171
WorkManager workManager = WorkManager.getInstance(getContext());
173172
List<WorkInfo> workInfos = workManager.getWorkInfosByTag(IterableNotificationWorker.class.getName()).get(5, TimeUnit.SECONDS);
174-
173+
175174
// Note: With SynchronousExecutor, work completes immediately
176175
// Verify that notification helper methods were called (indicating Worker ran)
177176
verify(notificationHelperSpy, atLeastOnce()).createNotification(any(), any(Bundle.class));
@@ -186,9 +185,9 @@ public void testNotificationWorkerProcessesData() throws Exception {
186185
builder.addData(IterableConstants.ITERABLE_DATA_BODY, "Worker test message");
187186
builder.addData(IterableConstants.ITERABLE_DATA_TITLE, "Worker Test");
188187
builder.addData(IterableConstants.ITERABLE_DATA_KEY, IterableTestUtils.getResourceString("push_payload_custom_action.json"));
189-
188+
190189
controller.get().onMessageReceived(builder.build());
191-
190+
192191
// With SynchronousExecutor, work completes immediately
193192
// Verify the notification was processed
194193
verify(notificationHelperSpy, atLeastOnce()).createNotification(eq(getContext()), any(Bundle.class));

0 commit comments

Comments
 (0)