Skip to content

Commit 0984aa0

Browse files
committed
modifications as per lint inspection
1 parent 42a5538 commit 0984aa0

File tree

6 files changed

+11
-11
lines changed

6 files changed

+11
-11
lines changed

aztec/src/main/kotlin/org/wordpress/aztec/watchers/event/buckets/Bucket.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
extend from this class to construct a specific bucket
99
*/
1010
public abstract class Bucket {
11-
protected ArrayList<UserOperationEvent> mUserOperations = new ArrayList<>();
11+
final protected ArrayList<UserOperationEvent> mUserOperations = new ArrayList<>();
1212
public ArrayList<UserOperationEvent> getUserOperations() {
1313
return mUserOperations;
1414
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
package org.wordpress.aztec.watchers.event.sequence
22

3-
open class EventSequence<TextWatcherEvent>() : ArrayList<TextWatcherEvent>()
3+
open class EventSequence<TextWatcherEvent> : ArrayList<TextWatcherEvent>()
44

aztec/src/main/kotlin/org/wordpress/aztec/watchers/event/sequence/known/space/API26InWordSpaceInsertionEvent.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
This case implements the behavior observed in https://github.com/wordpress-mobile/AztecEditor-Android/issues/555
1717
*/
1818
public class API26InWordSpaceInsertionEvent extends UserOperationEvent {
19-
private static char SPACE = ' ';
20-
private static String SPACE_STRING = "" + SPACE;
19+
private static final char SPACE = ' ';
20+
private static final String SPACE_STRING = "" + SPACE;
2121
private static final int MAXIMUM_TIME_BETWEEN_EVENTS_IN_PATTERN_MS = 50;
2222

2323
public API26InWordSpaceInsertionEvent() {
@@ -95,8 +95,8 @@ public boolean isUserOperationPartiallyObservedInSequence(@NotNull EventSequence
9595
// WARNING! When debugging with breakpoints, you should disable this check as time can exceed the 50 MS limit and
9696
// create undesired behavior.
9797
if (i > 0) { // only try to compare when we have at least 2 events, so we can compare with the previous one
98-
long timestampForPreviousevent = sequence.get(i-1).getTimestamp();
99-
long timeDistance = observableEvent.getTimestamp() - timestampForPreviousevent;
98+
long timestampForPreviousEvent = sequence.get(i-1).getTimestamp();
99+
long timeDistance = observableEvent.getTimestamp() - timestampForPreviousEvent;
100100
if (timeDistance > MAXIMUM_TIME_BETWEEN_EVENTS_IN_PATTERN_MS) {
101101
return false;
102102
}

aztec/src/main/kotlin/org/wordpress/aztec/watchers/event/sequence/known/space/steps/TextWatcherEventDeleteText.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public class TextWatcherEventDeleteText extends TextWatcherEvent {
1010

1111
private CharSequence beforeText;
1212

13-
public TextWatcherEventDeleteText(BeforeTextChangedEventData beforeEventData, OnTextChangedEventData onEventData,
13+
private TextWatcherEventDeleteText(BeforeTextChangedEventData beforeEventData, OnTextChangedEventData onEventData,
1414
AfterTextChangedEventData afterEventData) {
1515
this.beforeEventData = beforeEventData;
1616
this.onEventData = onEventData;

aztec/src/main/kotlin/org/wordpress/aztec/watchers/event/sequence/known/space/steps/TextWatcherEventInsertText.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public TextWatcherEventInsertText() {
1616

1717
}
1818

19-
public TextWatcherEventInsertText(BeforeTextChangedEventData beforeEventData, OnTextChangedEventData onEventData,
19+
private TextWatcherEventInsertText(BeforeTextChangedEventData beforeEventData, OnTextChangedEventData onEventData,
2020
AfterTextChangedEventData afterEventData) {
2121
this.beforeEventData = beforeEventData;
2222
this.onEventData = onEventData;

aztec/src/main/kotlin/org/wordpress/aztec/watchers/event/text/TextWatcherEvent.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ public class TextWatcherEvent {
66
protected AfterTextChangedEventData afterEventData;
77
private long timestamp;
88

9-
public TextWatcherEvent() {
9+
protected TextWatcherEvent() {
1010

1111
}
1212

13-
public TextWatcherEvent(BeforeTextChangedEventData beforeEventData, OnTextChangedEventData onEventData,
13+
private TextWatcherEvent(BeforeTextChangedEventData beforeEventData, OnTextChangedEventData onEventData,
1414
AfterTextChangedEventData afterEventData) {
1515
this.beforeEventData = beforeEventData;
1616
this.onEventData = onEventData;
@@ -47,7 +47,7 @@ public long getTimestamp() {
4747
}
4848

4949
public boolean testFitsBeforeOnAndAfter() {
50-
// always returns false, subclassess should make an assessment and properly return true/false depending
50+
// always returns false, subclasses should make an assessment and properly return true/false depending
5151
// on their specific data contents
5252
return false;
5353
}

0 commit comments

Comments
 (0)