Skip to content

Commit 5b50c3a

Browse files
committed
Merge pull request ReactiveX#3363 from artem-zinnatullin/little-improvements-for-CachedObservable
Remove unused private method from CachedObservable and make "state" final
2 parents 36742c9 + f178fb3 commit 5b50c3a

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

src/main/java/rx/internal/operators/CachedObservable.java

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,9 @@
2929
* @param <T> the source element type
3030
*/
3131
public final class CachedObservable<T> extends Observable<T> {
32+
3233
/** The cache and replay state. */
33-
private CacheState<T> state;
34+
private final CacheState<T> state;
3435

3536
/**
3637
* Creates a cached Observable with a default capacity hint of 16.
@@ -82,15 +83,7 @@ private CachedObservable(OnSubscribe<T> onSubscribe, CacheState<T> state) {
8283
/* public */ boolean hasObservers() {
8384
return state.producers.length != 0;
8485
}
85-
86-
/**
87-
* Returns the number of events currently cached.
88-
* @return
89-
*/
90-
/* public */ int cachedEventCount() {
91-
return state.size();
92-
}
93-
86+
9487
/**
9588
* Contains the active child producers and the values to replay.
9689
*

0 commit comments

Comments
 (0)