Remove dead code and add/remove empty lines were needed (#99)
This commit is contained in:
parent
c596121319
commit
b93c431e24
3 changed files with 5 additions and 6 deletions
|
@ -43,14 +43,17 @@ public final class BarCode implements Serializable {
|
|||
if (this == object) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!(object instanceof BarCode)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
BarCode barCode = (BarCode) object;
|
||||
|
||||
if (!key.equals(barCode.key)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!type.equals(barCode.type)) {
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -99,11 +99,9 @@ final class RealInternalStore<Raw, Parsed> implements InternalStore<Parsed> {
|
|||
@Override
|
||||
public Observable<Parsed> call() {
|
||||
return cache(barCode);
|
||||
|
||||
}
|
||||
})
|
||||
.onErrorResumeNext(new OnErrorResumeWithEmpty<Parsed>());
|
||||
|
||||
}
|
||||
|
||||
private Observable<Parsed> cache(@Nonnull final BarCode barCode) {
|
||||
|
@ -203,7 +201,6 @@ final class RealInternalStore<Raw, Parsed> implements InternalStore<Parsed> {
|
|||
.flatMap(new Func1<Raw, Observable<Parsed>>() {
|
||||
@Override
|
||||
public Observable<Parsed> call(Raw raw) {
|
||||
//Log.i(TAG,"writing and then reading from Persister");
|
||||
return persister().write(barCode, raw)
|
||||
.flatMap(new Func1<Boolean, Observable<Parsed>>() {
|
||||
@Nonnull
|
||||
|
@ -224,7 +221,6 @@ final class RealInternalStore<Raw, Parsed> implements InternalStore<Parsed> {
|
|||
}
|
||||
|
||||
void notifySubscribers(Parsed data) {
|
||||
//Log.d(TAG,"notify stream subscribers of fresh data");
|
||||
subject.onNext(data);
|
||||
}
|
||||
|
||||
|
@ -303,7 +299,6 @@ final class RealInternalStore<Raw, Parsed> implements InternalStore<Parsed> {
|
|||
* @return memory persister size
|
||||
*/
|
||||
private long getCacheSize() {
|
||||
// return memCache.size();
|
||||
return 100;
|
||||
}
|
||||
|
||||
|
|
|
@ -92,6 +92,7 @@ public class StoreBuilder<T> {
|
|||
if (persister == null) {
|
||||
persister = new NoopPersister<>();
|
||||
}
|
||||
|
||||
InternalStore<T> internalStore;
|
||||
|
||||
if (memCache == null) {
|
||||
|
@ -99,7 +100,7 @@ public class StoreBuilder<T> {
|
|||
} else {
|
||||
internalStore = new RealInternalStore<>(fetcher, persister, new NoopParserFunc<T, T>(), memCache);
|
||||
}
|
||||
return new RealStore<>(internalStore);
|
||||
|
||||
return new RealStore<>(internalStore);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue