Skip to content

Commit

Permalink
Merge pull request #3651 from artem-zinnatullin/remove-redundant-final
Browse files Browse the repository at this point in the history
1.x: Remove redundant "final" modifiers
  • Loading branch information
zsxwing committed Jan 31, 2016
2 parents 503d369 + 9cf3754 commit be493f1
Show file tree
Hide file tree
Showing 14 changed files with 155 additions and 155 deletions.
194 changes: 97 additions & 97 deletions src/main/java/rx/Observable.java

Large diffs are not rendered by default.

66 changes: 33 additions & 33 deletions src/main/java/rx/Single.java

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/main/java/rx/exceptions/CompositeException.java
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ public String getMessage() {
}
}

private final List<Throwable> getListOfCauses(Throwable ex) {
private List<Throwable> getListOfCauses(Throwable ex) {
List<Throwable> list = new ArrayList<Throwable>();
Throwable root = ex.getCause();
if (root == null) {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/rx/internal/operators/OnSubscribeAmb.java
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ private static final class AmbSubscriber<T> extends Subscriber<T> {
request(requested);
}

private final void requestMore(long n) {
private void requestMore(long n) {
request(n);
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/rx/internal/util/IndexedRingBuffer.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ protected IndexedRingBuffer<?> createObject() {
};

@SuppressWarnings("unchecked")
public final static <T> IndexedRingBuffer<T> getInstance() {
public static <T> IndexedRingBuffer<T> getInstance() {
return (IndexedRingBuffer<T>) POOL.borrowObject();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ static <T> Producer createProducer(Subscriber<? super T> s, T v) {
* @param t the value to emit when requested
* @return the new Observable
*/
public static final <T> ScalarSynchronousObservable<T> create(T t) {
public static <T> ScalarSynchronousObservable<T> create(T t) {
return new ScalarSynchronousObservable<T>(t);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -242,17 +242,17 @@ private void soConsumerIndex(long v) {
CONSUMER_INDEX.lazySet(this, v);
}

private static final int calcWrappedOffset(long index, int mask) {
private static int calcWrappedOffset(long index, int mask) {
return calcDirectOffset((int)index & mask);
}
private static final int calcDirectOffset(int index) {
private static int calcDirectOffset(int index) {
return index;
}
private static final void soElement(AtomicReferenceArray<Object> buffer, int offset, Object e) {
private static void soElement(AtomicReferenceArray<Object> buffer, int offset, Object e) {
buffer.lazySet(offset, e);
}

private static final <E> Object lvElement(AtomicReferenceArray<Object> buffer, int offset) {
private static <E> Object lvElement(AtomicReferenceArray<Object> buffer, int offset) {
return buffer.get(offset);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -243,17 +243,17 @@ private void soConsumerIndex(long v) {
CONSUMER_INDEX.lazySet(this, v);
}

private static final int calcWrappedOffset(long index, int mask) {
private static int calcWrappedOffset(long index, int mask) {
return calcDirectOffset((int)index & mask);
}
private static final int calcDirectOffset(int index) {
private static int calcDirectOffset(int index) {
return index;
}
private static final void soElement(AtomicReferenceArray<Object> buffer, int offset, Object e) {
private static void soElement(AtomicReferenceArray<Object> buffer, int offset, Object e) {
buffer.lazySet(offset, e);
}

private static final <E> Object lvElement(AtomicReferenceArray<Object> buffer, int offset) {
private static <E> Object lvElement(AtomicReferenceArray<Object> buffer, int offset) {
return buffer.get(offset);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -264,17 +264,17 @@ private void soConsumerIndex(long v) {
UNSAFE.putOrderedLong(this, C_INDEX_OFFSET, v);
}

private static final long calcWrappedOffset(long index, long mask) {
private static long calcWrappedOffset(long index, long mask) {
return calcDirectOffset(index & mask);
}
private static final long calcDirectOffset(long index) {
private static long calcDirectOffset(long index) {
return REF_ARRAY_BASE + (index << REF_ELEMENT_SHIFT);
}
private static final void soElement(Object[] buffer, long offset, Object e) {
private static void soElement(Object[] buffer, long offset, Object e) {
UNSAFE.putOrderedObject(buffer, offset, e);
}

private static final <E> Object lvElement(E[] buffer, long offset) {
private static <E> Object lvElement(E[] buffer, long offset) {
return UNSAFE.getObjectVolatile(buffer, offset);
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/rx/internal/util/unsafe/UnsafeAccess.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ private UnsafeAccess() {
UNSAFE = u;
}

public static final boolean isUnsafeAvailable() {
public static boolean isUnsafeAvailable() {
return UNSAFE != null;
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/rx/observables/GroupedObservable.java
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public void call(Subscriber<? super T> s) {
* @return a GroupedObservable that, when a {@link Subscriber} subscribes to it, will execute the specified
* function
*/
public final static <K, T> GroupedObservable<K, T> create(K key, OnSubscribe<T> f) {
public static <K, T> GroupedObservable<K, T> create(K key, OnSubscribe<T> f) {
return new GroupedObservable<K, T>(key, f);
}

Expand Down
6 changes: 3 additions & 3 deletions src/main/java/rx/observers/Observers.java
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public static <T> Observer<T> empty() {
* @return an {@code Observer} that calls {@code onNext} for each emitted item from the {@code Observable}
* the {@code Observer} subscribes to
*/
public static final <T> Observer<T> create(final Action1<? super T> onNext) {
public static <T> Observer<T> create(final Action1<? super T> onNext) {
if (onNext == null) {
throw new IllegalArgumentException("onNext can not be null");
}
Expand Down Expand Up @@ -111,7 +111,7 @@ public final void onNext(T args) {
* the {@code Observer} subscribes to, and calls {@code onError} if the {@code Observable} notifies
* of an error
*/
public static final <T> Observer<T> create(final Action1<? super T> onNext, final Action1<Throwable> onError) {
public static <T> Observer<T> create(final Action1<? super T> onNext, final Action1<Throwable> onError) {
if (onNext == null) {
throw new IllegalArgumentException("onNext can not be null");
}
Expand Down Expand Up @@ -157,7 +157,7 @@ public final void onNext(T args) {
* of an error, and calls {@code onComplete} if the {@code Observable} notifies that the observable
* sequence is complete
*/
public static final <T> Observer<T> create(final Action1<? super T> onNext, final Action1<Throwable> onError, final Action0 onComplete) {
public static <T> Observer<T> create(final Action1<? super T> onNext, final Action1<Throwable> onError, final Action0 onComplete) {
if (onNext == null) {
throw new IllegalArgumentException("onNext can not be null");
}
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/rx/observers/Subscribers.java
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public void onNext(T t) {
* @return a {@code Subscriber} that calls {@code onNext} for each emitted item from the {@code Observable}
* the {@code Subscriber} subscribes to
*/
public static final <T> Subscriber<T> create(final Action1<? super T> onNext) {
public static <T> Subscriber<T> create(final Action1<? super T> onNext) {
if (onNext == null) {
throw new IllegalArgumentException("onNext can not be null");
}
Expand Down Expand Up @@ -119,7 +119,7 @@ public final void onNext(T args) {
* the {@code Subscriber} subscribes to, and calls {@code onError} if the {@code Observable}
* notifies of an error
*/
public static final <T> Subscriber<T> create(final Action1<? super T> onNext, final Action1<Throwable> onError) {
public static <T> Subscriber<T> create(final Action1<? super T> onNext, final Action1<Throwable> onError) {
if (onNext == null) {
throw new IllegalArgumentException("onNext can not be null");
}
Expand Down Expand Up @@ -165,7 +165,7 @@ public final void onNext(T args) {
* of an error, and calls {@code onComplete} if the {@code Observable} notifies that the observable
* sequence is complete
*/
public static final <T> Subscriber<T> create(final Action1<? super T> onNext, final Action1<Throwable> onError, final Action0 onComplete) {
public static <T> Subscriber<T> create(final Action1<? super T> onNext, final Action1<Throwable> onError, final Action0 onComplete) {
if (onNext == null) {
throw new IllegalArgumentException("onNext can not be null");
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/rx/subjects/ReplaySubject.java
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ public static <T> ReplaySubject<T> createWithTimeAndSize(long time, TimeUnit uni
* the shared state
* @return the created subject
*/
static final <T> ReplaySubject<T> createWithState(final BoundedState<T> state,
static <T> ReplaySubject<T> createWithState(final BoundedState<T> state,
Action1<SubjectObserver<T>> onStart) {
SubjectSubscriptionManager<T> ssm = new SubjectSubscriptionManager<T>();
ssm.onStart = onStart;
Expand Down

0 comments on commit be493f1

Please sign in to comment.