2016-11-04 10 views
1

私はRequeryを使用して、Androidアプリにデータを保存しています。Android用Requery、StackOverflow on select

これは例外を作成するコードです。

@Override 
public Observable<Zone> retrieve(long id) { 
    return db().select(Zone.class) 
       .where(Zone.ID.eq(id)) 
       .get() 
       .toSelfObservable() 
       .map(Result::firstOrNull) 
       .filter(park -> park != null) 
       .flatMap(this::fillTariffs) 
       .flatMap(this::fillFreeDays) 
       .flatMap(this::fillWeekDays) 
       .doOnNext(park -> Logs.model("Loaded: " + park)); 
} 

private Observable<Tariff> fillSubscriptions(Tariff tariff) { 
    return db().select(Subscription.class) 
       .where(Subscription.TARIFF_ID.eq(tariff.getId())) 
       .get() 
       .toSelfObservable() 
       .first() 
       .map(Result::toList) 
       .map(subscriptions -> { 
        tariff.getSubscriptions() 
         .clear(); 
        tariff.getSubscriptions() 
         .addAll(subscriptions); 
        return tariff; 
       }); 
} 


private Observable<Zone> fillFreeDays(Zone zone) { 
    return db().select(FreeDay.class) 
       .where(FreeDay.ZONE_ID.eq(zone.getId())) 
       .get() 
       .toSelfObservable() 
       .first() 
       .map(Result::toList) 
       .map(freeDays -> { 
        zone.getFreeDays() 
         .clear(); 
        zone.getFreeDays() 
         .addAll(freeDays); 
        return zone; 
       }); 
} 

private Observable<Zone> fillWeekDays(Zone zone) { 
    return db().select(WeekDay.class) 
       .where(WeekDay.ZONE_ID.eq(zone.getId())) 
       .get() 
       .toSelfObservable() 
       .first() 
       .map(Result::toList) 
       .flatMap(tariffs -> Observable.from(tariffs) 
              .flatMap(this::fillTimeSlots) 
              .toList()) 
       .map(weekDays -> { 
        zone.getWeekDays() 
         .clear(); 
        zone.getWeekDays() 
         .addAll(weekDays); 
        return zone; 
       }); 
} 

private Observable<WeekDay> fillTimeSlots(WeekDay weekDay) { 
    return db().select(TimeSlot.class) 
       .where(TimeSlot.WEEK_DAY_ID.eq(weekDay.getKey())) 
       .get() 
       .toSelfObservable() 
       .first() 
       .map(Result::toList) 
       .map(slots -> { 
        weekDay.getSlots() 
          .clear(); 
        weekDay.getSlots() 
          .addAll(slots); 
        return weekDay; 
       }); 
} 

private Observable<Zone> fillTariffs(Zone zone) { 
    return db().select(Tariff.class) 
       .where(Tariff.ZONE_ID.eq(zone.getId())) 
       .get() 
       .toSelfObservable() 
       .first() 
       .map(Result::toList) 
       .flatMap(tariffs -> Observable.from(tariffs) 
              .flatMap(this::fillRates) 
              .flatMap(this::fillSubscriptions) 
              .toList()) 
       .map(tariffs -> { 
        zone.getTariffs() 
         .clear(); 
        zone.getTariffs() 
         .addAll(tariffs); 
        return zone; 
       }); 
} 

private Observable<Tariff> fillRates(Tariff tariff) { 
    return db().select(Rate.class) 
       .where(Rate.TARIFF_ID.eq(tariff.getId())) 
       .get() 
       .toSelfObservable() 
       .first() 
       .map(Result::toList) 
       .map(rates -> { 
        tariff.getRates() 
         .clear(); 
        tariff.getRates() 
         .addAll(rates); 
        return tariff; 
       }); 
} 

これは私がファブリックから取得する例外です:

Caused by java.lang.StackOverflowError 
java.lang.String.toLowerCase (String.java:1513) 
io.requery.sql.QueryBuilder.keyword (QueryBuilder.java:102) 
io.requery.sql.gen.SelectGenerator.write (SelectGenerator.java:34) 
io.requery.sql.gen.SelectGenerator.write (SelectGenerator.java:29) 
io.requery.sql.gen.StatementGenerator.write (StatementGenerator.java:70) 
io.requery.sql.gen.DefaultOutput.toSql (DefaultOutput.java:94) 
io.requery.sql.SelectResult.createQuery (SelectResult.java:97) 
io.requery.sql.SelectResult.iterator (SelectResult.java:105) 
io.requery.query.BaseResult.iterator (BaseResult.java:122) 
io.requery.query.BaseResult.collect (BaseResult.java:76) 
io.requery.query.BaseResult.toList (BaseResult.java:70) 
eu.elios.smartpark.mvp.repository.RequeryZoneRepository$$Lambda$13.call (Unknown Source) 
rx.internal.operators.OnSubscribeMap$MapSubscriber.onNext (OnSubscribeMap.java:69) 
rx.internal.producers.SingleProducer.request (SingleProducer.java:65) 
rx.Subscriber.setProducer (Subscriber.java:211) 
rx.internal.operators.OnSubscribeMap$MapSubscriber.setProducer (OnSubscribeMap.java:102) 
rx.internal.operators.OnSubscribeMap$MapSubscriber.setProducer (OnSubscribeMap.java:102) 
rx.internal.operators.OperatorSingle$ParentSubscriber.onCompleted (OperatorSingle.java:110) 
rx.internal.operators.OperatorTake$1.onNext (OperatorTake.java:80) 
rx.observers.SerializedObserver.onNext (SerializedObserver.java:92) 
rx.observers.SerializedSubscriber.onNext (SerializedSubscriber.java:94) 
rx.internal.operators.OnSubscribeConcatMap$ConcatMapSubscriber.innerNext (OnSubscribeConcatMap.java:182) 
rx.internal.operators.OnSubscribeConcatMap$ConcatMapInnerScalarProducer.request (OnSubscribeConcatMap.java:366) 
rx.internal.producers.ProducerArbiter.setProducer (ProducerArbiter.java:126) 
rx.internal.operators.OnSubscribeConcatMap$ConcatMapSubscriber.drain (OnSubscribeConcatMap.java:278) 
rx.internal.operators.OnSubscribeConcatMap$ConcatMapSubscriber.onNext (OnSubscribeConcatMap.java:144) 
rx.internal.operators.OnSubscribeFromArray$FromArrayProducer.slowPath (OnSubscribeFromArray.java:100) 
rx.internal.operators.OnSubscribeFromArray$FromArrayProducer.request (OnSubscribeFromArray.java:63) 
rx.Subscriber.setProducer (Subscriber.java:211) 
rx.internal.operators.OnSubscribeFromArray.call (OnSubscribeFromArray.java:32) 
rx.internal.operators.OnSubscribeFromArray.call (OnSubscribeFromArray.java:24) 
rx.Observable.unsafeSubscribe (Observable.java:10151) 
rx.internal.operators.OnSubscribeConcatMap.call (OnSubscribeConcatMap.java:94) 
rx.internal.operators.OnSubscribeConcatMap.call (OnSubscribeConcatMap.java:42) 
rx.internal.operators.OnSubscribeLift.call (OnSubscribeLift.java:48) 
rx.internal.operators.OnSubscribeLift.call (OnSubscribeLift.java:30) 
rx.internal.operators.OnSubscribeLift.call (OnSubscribeLift.java:48) 
rx.internal.operators.OnSubscribeLift.call (OnSubscribeLift.java:30) 
rx.Observable.unsafeSubscribe (Observable.java:10151) 
rx.internal.operators.OnSubscribeMap.call (OnSubscribeMap.java:48) 
rx.internal.operators.OnSubscribeMap.call (OnSubscribeMap.java:33) 
rx.Observable.unsafeSubscribe (Observable.java:10151) 
rx.internal.operators.OnSubscribeMap.call (OnSubscribeMap.java:48) 
rx.internal.operators.OnSubscribeMap.call (OnSubscribeMap.java:33) 
rx.internal.operators.OnSubscribeLift.call (OnSubscribeLift.java:48) 
rx.internal.operators.OnSubscribeLift.call (OnSubscribeLift.java:30) 
rx.Observable.unsafeSubscribe (Observable.java:10151) 
rx.internal.operators.OnSubscribeMap.call (OnSubscribeMap.java:48) 
rx.internal.operators.OnSubscribeMap.call (OnSubscribeMap.java:33) 
rx.Observable.unsafeSubscribe (Observable.java:10151) 
rx.internal.operators.OperatorMerge$MergeSubscriber.onNext (OperatorMerge.java:251) 
rx.internal.operators.OperatorMerge$MergeSubscriber.onNext (OperatorMerge.java:148) 
rx.internal.operators.OnSubscribeMap$MapSubscriber.onNext (OnSubscribeMap.java:77) 
rx.internal.operators.OperatorMerge$MergeSubscriber.emitScalar (OperatorMerge.java:398) 
rx.internal.operators.OperatorMerge$MergeSubscriber.tryEmit (OperatorMerge.java:358) 
rx.internal.operators.OperatorMerge$InnerSubscriber.onNext (OperatorMerge.java:849) 
rx.internal.operators.OnSubscribeMap$MapSubscriber.onNext (OnSubscribeMap.java:77) 
rx.internal.operators.OnSubscribeMap$MapSubscriber.onNext (OnSubscribeMap.java:77) 
rx.internal.producers.SingleProducer.request (SingleProducer.java:65) 
rx.Subscriber.setProducer (Subscriber.java:211) 
rx.internal.operators.OnSubscribeMap$MapSubscriber.setProducer (OnSubscribeMap.java:102) 
rx.internal.operators.OnSubscribeMap$MapSubscriber.setProducer (OnSubscribeMap.java:102) 
rx.internal.operators.OperatorSingle$ParentSubscriber.onCompleted (OperatorSingle.java:110) 
rx.internal.operators.OperatorTake$1.onNext (OperatorTake.java:80) 
rx.observers.SerializedObserver.onNext (SerializedObserver.java:92) 
rx.observers.SerializedSubscriber.onNext (SerializedSubscriber.java:94) 
rx.internal.operators.OnSubscribeConcatMap$ConcatMapSubscriber.innerNext (OnSubscribeConcatMap.java:182) 
rx.internal.operators.OnSubscribeConcatMap$ConcatMapInnerScalarProducer.request (OnSubscribeConcatMap.java:366) 
rx.internal.producers.ProducerArbiter.setProducer (ProducerArbiter.java:126) 
rx.internal.operators.OnSubscribeConcatMap$ConcatMapSubscriber.drain (OnSubscribeConcatMap.java:278) 
rx.internal.operators.OnSubscribeConcatMap$ConcatMapSubscriber.onNext (OnSubscribeConcatMap.java:144) 
rx.internal.operators.OnSubscribeFromArray$FromArrayProducer.slowPath (OnSubscribeFromArray.java:100) 
rx.internal.operators.OnSubscribeFromArray$FromArrayProducer.request (OnSubscribeFromArray.java:63) 
rx.Subscriber.setProducer (Subscriber.java:211) 
rx.internal.operators.OnSubscribeFromArray.call (OnSubscribeFromArray.java:32) 
rx.internal.operators.OnSubscribeFromArray.call (OnSubscribeFromArray.java:24) 
rx.Observable.unsafeSubscribe (Observable.java:10151) 
rx.internal.operators.OnSubscribeConcatMap.call (OnSubscribeConcatMap.java:94) 
rx.internal.operators.OnSubscribeConcatMap.call (OnSubscribeConcatMap.java:42) 
rx.internal.operators.OnSubscribeLift.call (OnSubscribeLift.java:48) 
rx.internal.operators.OnSubscribeLift.call (OnSubscribeLift.java:30) 
rx.internal.operators.OnSubscribeLift.call (OnSubscribeLift.java:48) 
rx.internal.operators.OnSubscribeLift.call (OnSubscribeLift.java:30) 
rx.Observable.unsafeSubscribe (Observable.java:10151) 
rx.internal.operators.OnSubscribeMap.call (OnSubscribeMap.java:48) 
rx.internal.operators.OnSubscribeMap.call (OnSubscribeMap.java:33) 
rx.Observable.unsafeSubscribe (Observable.java:10151) 
rx.internal.operators.OnSubscribeMap.call (OnSubscribeMap.java:48) 
rx.internal.operators.OnSubscribeMap.call (OnSubscribeMap.java:33) 
rx.Observable.unsafeSubscribe (Observable.java:10151) 
rx.internal.operators.OperatorMerge$MergeSubscriber.onNext (OperatorMerge.java:251) 
rx.internal.operators.OperatorMerge$MergeSubscriber.onNext (OperatorMerge.java:148) 
rx.internal.operators.OnSubscribeMap$MapSubscriber.onNext (OnSubscribeMap.java:77) 
rx.internal.operators.OperatorMerge$MergeSubscriber.emitScalar (OperatorMerge.java:398) 
rx.internal.operators.OperatorMerge$MergeSubscriber.tryEmit (OperatorMerge.java:358) 
rx.internal.operators.OperatorMerge$InnerSubscriber.onNext (OperatorMerge.java:849) 
rx.internal.operators.OnSubscribeMap$MapSubscriber.onNext (OnSubscribeMap.java:77) 
rx.internal.operators.OperatorMerge$MergeSubscriber.emitScalar (OperatorMerge.java:398) 
rx.internal.operators.OperatorMerge$MergeSubscriber.tryEmit (OperatorMerge.java:358) 
rx.internal.operators.OperatorMerge$InnerSubscriber.onNext (OperatorMerge.java:849) 
rx.internal.producers.SingleDelayedProducer.emit (SingleDelayedProducer.java:102) 
rx.internal.producers.SingleDelayedProducer.setValue (SingleDelayedProducer.java:85) 
rx.internal.operators.OperatorToObservableList$1.onCompleted (OperatorToObservableList.java:98) 
rx.internal.operators.OperatorMerge$MergeSubscriber.emitLoop (OperatorMerge.java:659) 
rx.internal.operators.OperatorMerge$MergeSubscriber.emit (OperatorMerge.java:571) 
rx.internal.operators.OperatorMerge$MergeSubscriber.onCompleted (OperatorMerge.java:284) 
rx.internal.operators.OnSubscribeMap$MapSubscriber.onCompleted (OnSubscribeMap.java:97) 
rx.internal.operators.OperatorMerge$MergeSubscriber.emitLoop (OperatorMerge.java:659) 
rx.internal.operators.OperatorMerge$MergeSubscriber.emit (OperatorMerge.java:571) 
rx.internal.operators.OperatorMerge$MergeSubscriber.onCompleted (OperatorMerge.java:284) 
rx.internal.operators.OnSubscribeMap$MapSubscriber.onCompleted (OnSubscribeMap.java:97) 
rx.internal.operators.OnSubscribeFromIterable$IterableProducer.fastPath (OnSubscribeFromIterable.java:190) 
rx.internal.operators.OnSubscribeFromIterable$IterableProducer.request (OnSubscribeFromIterable.java:86) 
rx.Subscriber.setProducer (Subscriber.java:211) 
rx.internal.operators.OnSubscribeMap$MapSubscriber.setProducer (OnSubscribeMap.java:102) 
rx.internal.operators.OnSubscribeFromIterable.call (OnSubscribeFromIterable.java:63) 
rx.internal.operators.OnSubscribeFromIterable.call (OnSubscribeFromIterable.java:34) 
rx.Observable.unsafeSubscribe (Observable.java:10151) 
rx.internal.operators.OnSubscribeMap.call (OnSubscribeMap.java:48) 
rx.internal.operators.OnSubscribeMap.call (OnSubscribeMap.java:33) 
rx.internal.operators.OnSubscribeLift.call (OnSubscribeLift.java:48) 
rx.internal.operators.OnSubscribeLift.call (OnSubscribeLift.java:30) 
rx.Observable.unsafeSubscribe (Observable.java:10151) 
rx.internal.operators.OnSubscribeMap.call (OnSubscribeMap.java:48) 
rx.internal.operators.OnSubscribeMap.call (OnSubscribeMap.java:33) 
rx.internal.operators.OnSubscribeLift.call (OnSubscribeLift.java:48) 
rx.internal.operators.OnSubscribeLift.call (OnSubscribeLift.java:30) 
rx.internal.operators.OnSubscribeLift.call (OnSubscribeLift.java:48) 
rx.internal.operators.OnSubscribeLift.call (OnSubscribeLift.java:30) 
rx.Observable.unsafeSubscribe (Observable.java:10151) 
rx.internal.operators.OperatorMerge$MergeSubscriber.onNext (OperatorMerge.java:251) 
rx.internal.operators.OperatorMerge$MergeSubscriber.onNext (OperatorMerge.java:148) 
rx.internal.operators.OnSubscribeMap$MapSubscriber.onNext (OnSubscribeMap.java:77) 
rx.internal.operators.OnSubscribeMap$MapSubscriber.onNext (OnSubscribeMap.java:77) 
rx.internal.producers.SingleProducer.request (SingleProducer.java:65) 
rx.Subscriber.setProducer (Subscriber.java:211) 
rx.internal.operators.OnSubscribeMap$MapSubscriber.setProducer (OnSubscribeMap.java:102) 
rx.internal.operators.OnSubscribeMap$MapSubscriber.setProducer (OnSubscribeMap.java:102) 
rx.internal.operators.OperatorSingle$ParentSubscriber.onCompleted (OperatorSingle.java:110) 
rx.internal.operators.OperatorTake$1.onNext (OperatorTake.java:80) 
rx.observers.SerializedObserver.onNext (SerializedObserver.java:92) 
rx.observers.SerializedSubscriber.onNext (SerializedSubscriber.java:94) 
rx.internal.operators.OnSubscribeConcatMap$ConcatMapSubscriber.innerNext (OnSubscribeConcatMap.java:182) 
rx.internal.operators.OnSubscribeConcatMap$ConcatMapInnerScalarProducer.request (OnSubscribeConcatMap.java:366) 
rx.internal.producers.ProducerArbiter.setProducer (ProducerArbiter.java:126) 
rx.internal.operators.OnSubscribeConcatMap$ConcatMapSubscriber.drain (OnSubscribeConcatMap.java:278) 
rx.internal.operators.OnSubscribeConcatMap$ConcatMapSubscriber.onNext (OnSubscribeConcatMap.java:144) 
rx.internal.operators.OnSubscribeFromArray$FromArrayProducer.slowPath (OnSubscribeFromArray.java:100) 
rx.internal.operators.OnSubscribeFromArray$FromArrayProducer.request (OnSubscribeFromArray.java:63) 
rx.Subscriber.setProducer (Subscriber.java:211) 
rx.internal.operators.OnSubscribeFromArray.call (OnSubscribeFromArray.java:32) 
rx.internal.operators.OnSubscribeFromArray.call (OnSubscribeFromArray.java:24) 
rx.Observable.unsafeSubscribe (Observable.java:10151) 
rx.internal.operators.OnSubscribeConcatMap.call (OnSubscribeConcatMap.java:94) 
rx.internal.operators.OnSubscribeConcatMap.call (OnSubscribeConcatMap.java:42) 
rx.internal.operators.OnSubscribeLift.call (OnSubscribeLift.java:48) 
rx.internal.operators.OnSubscribeLift.call (OnSubscribeLift.java:30) 
rx.internal.operators.OnSubscribeLift.call (OnSubscribeLift.java:48) 
rx.internal.operators.OnSubscribeLift.call (OnSubscribeLift.java:30) 
rx.Observable.unsafeSubscribe (Observable.java:10151) 
rx.internal.operators.OnSubscribeMap.call (OnSubscribeMap.java:48) 
rx.internal.operators.OnSubscribeMap.call (OnSubscribeMap.java:33) 
rx.Observable.unsafeSubscribe (Observable.java:10151) 
rx.internal.operators.OnSubscribeMap.call (OnSubscribeMap.java:48) 
rx.internal.operators.OnSubscribeMap.call (OnSubscribeMap.java:33) 
rx.internal.operators.OnSubscribeLift.call (OnSubscribeLift.java:48) 
rx.internal.operators.OnSubscribeLift.call (OnSubscribeLift.java:30) 
rx.Observable.unsafeSubscribe (Observable.java:10151) 
rx.internal.operators.OnSubscribeMap.call (OnSubscribeMap.java:48) 
rx.internal.operators.OnSubscribeMap.call (OnSubscribeMap.java:33) 
rx.Observable.unsafeSubscribe (Observable.java:10151) 
rx.internal.operators.OperatorMerge$MergeSubscriber.onNext (OperatorMerge.java:251) 
rx.internal.operators.OperatorMerge$MergeSubscriber.onNext (OperatorMerge.java:148) 
rx.internal.operators.OnSubscribeMap$MapSubscriber.onNext (OnSubscribeMap.java:77) 
rx.internal.operators.OnSubscribeFilter$FilterSubscriber.onNext (OnSubscribeFilter.java:76) 
rx.internal.operators.OnSubscribeMap$MapSubscriber.onNext (OnSubscribeMap.java:77) 
rx.observers.SerializedObserver.onNext (SerializedObserver.java:92) 
rx.observers.SerializedSubscriber.onNext (SerializedSubscriber.java:94) 
rx.internal.operators.OnSubscribeConcatMap$ConcatMapSubscriber.innerNext (OnSubscribeConcatMap.java:182) 
rx.internal.operators.OnSubscribeConcatMap$ConcatMapInnerScalarProducer.request (OnSubscribeConcatMap.java:366) 
rx.internal.producers.ProducerArbiter.setProducer (ProducerArbiter.java:126) 
rx.internal.operators.OnSubscribeConcatMap$ConcatMapSubscriber.drain (OnSubscribeConcatMap.java:278) 
rx.internal.operators.OnSubscribeConcatMap$ConcatMapSubscriber.onNext (OnSubscribeConcatMap.java:144) 
rx.internal.operators.OnSubscribeFromArray$FromArrayProducer.slowPath (OnSubscribeFromArray.java:100) 
rx.internal.operators.OnSubscribeFromArray$FromArrayProducer.request (OnSubscribeFromArray.java:63) 
rx.Subscriber.setProducer (Subscriber.java:211) 
rx.internal.operators.OnSubscribeFromArray.call (OnSubscribeFromArray.java:32) 
rx.internal.operators.OnSubscribeFromArray.call (OnSubscribeFromArray.java:24) 
rx.Observable.unsafeSubscribe (Observable.java:10151) 
rx.internal.operators.OnSubscribeConcatMap.call (OnSubscribeConcatMap.java:94) 
rx.internal.operators.OnSubscribeConcatMap.call (OnSubscribeConcatMap.java:42) 
rx.Observable.unsafeSubscribe (Observable.java:10151) 
rx.internal.operators.OnSubscribeMap.call (OnSubscribeMap.java:48) 
rx.internal.operators.OnSubscribeMap.call (OnSubscribeMap.java:33) 
rx.Observable.unsafeSubscribe (Observable.java:10151) 
rx.internal.operators.OnSubscribeFilter.call (OnSubscribeFilter.java:45) 
rx.internal.operators.OnSubscribeFilter.call (OnSubscribeFilter.java:30) 
rx.Observable.unsafeSubscribe (Observable.java:10151) 
rx.internal.operators.OnSubscribeMap.call (OnSubscribeMap.java:48) 
rx.internal.operators.OnSubscribeMap.call (OnSubscribeMap.java:33) 
rx.internal.operators.OnSubscribeLift.call (OnSubscribeLift.java:48) 
rx.internal.operators.OnSubscribeLift.call (OnSubscribeLift.java:30) 
rx.Observable.unsafeSubscribe (Observable.java:10151) 
rx.internal.operators.OnSubscribeMap.call (OnSubscribeMap.java:48) 
rx.internal.operators.OnSubscribeMap.call (OnSubscribeMap.java:33) 
rx.internal.operators.OnSubscribeLift.call (OnSubscribeLift.java:48) 
rx.internal.operators.OnSubscribeLift.call (OnSubscribeLift.java:30) 
rx.Observable.unsafeSubscribe (Observable.java:10151) 
rx.internal.operators.OnSubscribeMap.call (OnSubscribeMap.java:48) 
rx.internal.operators.OnSubscribeMap.call (OnSubscribeMap.java:33) 
rx.internal.operators.OnSubscribeLift.call (OnSubscribeLift.java:48) 
rx.internal.operators.OnSubscribeLift.call (OnSubscribeLift.java:30) 
rx.Observable.unsafeSubscribe (Observable.java:10151) 
rx.internal.operators.OnSubscribeDoOnEach.call (OnSubscribeDoOnEach.java:41) 
rx.internal.operators.OnSubscribeDoOnEach.call (OnSubscribeDoOnEach.java:30) 
rx.Observable.unsafeSubscribe (Observable.java:10151) 
rx.internal.operators.OnSubscribeFilter.call (OnSubscribeFilter.java:45) 
rx.internal.operators.OnSubscribeFilter.call (OnSubscribeFilter.java:30) 
rx.internal.operators.OnSubscribeLift.call (OnSubscribeLift.java:48) 
rx.internal.operators.OnSubscribeLift.call (OnSubscribeLift.java:30) 
rx.internal.operators.OnSubscribeLift.call (OnSubscribeLift.java:48) 
rx.internal.operators.OnSubscribeLift.call (OnSubscribeLift.java:30) 
rx.Observable.unsafeSubscribe (Observable.java:10151) 
rx.internal.operators.OnSubscribeSingle.call (OnSubscribeSingle.java:81) 
rx.internal.operators.OnSubscribeSingle.call (OnSubscribeSingle.java:27) 
rx.Single$1.call (Single.java:89) 
rx.Single$1.call (Single.java:69) 
rx.Single.subscribe (Single.java:1824) 
rx.Single.subscribe (Single.java:1901) 
rx.internal.operators.SingleOnSubscribeMap.call (SingleOnSubscribeMap.java:45) 
rx.internal.operators.SingleOnSubscribeMap.call (SingleOnSubscribeMap.java:30) 
rx.Single$1.call (Single.java:89) 
rx.Single$1.call (Single.java:69) 
rx.Single.unsafeSubscribe (Single.java:1714) 
rx.internal.util.ScalarSynchronousSingle$2.call (ScalarSynchronousSingle.java:153) 
rx.internal.util.ScalarSynchronousSingle$2.call (ScalarSynchronousSingle.java:128) 
rx.Single$1.call (Single.java:89) 
rx.Single$1.call (Single.java:69) 
rx.Single.subscribe (Single.java:1824) 
rx.Single.subscribe (Single.java:1901) 
rx.internal.operators.SingleOnSubscribeMap.call (SingleOnSubscribeMap.java:45) 
rx.internal.operators.SingleOnSubscribeMap.call (SingleOnSubscribeMap.java:30) 
rx.Single$1.call (Single.java:89) 
rx.Single$1.call (Single.java:69) 
rx.Single.subscribe (Single.java:1824) 
rx.Single.subscribe (Single.java:1901) 
rx.Single$5$1.onSuccess (Single.java:677) 
rx.Single$5$1.onSuccess (Single.java:673) 
rx.Single$18.onNext (Single.java:1896) 
rx.observers.SafeSubscriber.onNext (SafeSubscriber.java:134) 
rx.internal.producers.SingleDelayedProducer.emit (SingleDelayedProducer.java:102) 
rx.internal.producers.SingleDelayedProducer.setValue (SingleDelayedProducer.java:85) 
rx.Single$1$1.onSuccess (Single.java:79) 
rx.internal.operators.SingleOnSubscribeMap$MapSubscriber.onSuccess (SingleOnSubscribeMap.java:74) 
rx.Single$18.onNext (Single.java:1896) 
rx.observers.SafeSubscriber.onNext (SafeSubscriber.java:134) 
rx.internal.producers.SingleDelayedProducer.emit (SingleDelayedProducer.java:102) 
rx.internal.producers.SingleDelayedProducer.setValue (SingleDelayedProducer.java:85) 
rx.Single$1$1.onSuccess (Single.java:79) 
rx.Single$18.onNext (Single.java:1896) 
rx.observers.SafeSubscriber.onNext (SafeSubscriber.java:134) 
rx.internal.producers.SingleDelayedProducer.emit (SingleDelayedProducer.java:102) 
rx.internal.producers.SingleDelayedProducer.setValue (SingleDelayedProducer.java:85) 
rx.Single$1$1.onSuccess (Single.java:79) 
rx.internal.operators.OnSubscribeSingle$1.onCompleted (OnSubscribeSingle.java:55) 
rx.internal.producers.SingleProducer.request (SingleProducer.java:75) 
rx.Subscriber.setProducer (Subscriber.java:211) 
rx.internal.operators.OperatorSingle$ParentSubscriber.onCompleted (OperatorSingle.java:110) 
rx.internal.operators.OperatorTake$1.onNext (OperatorTake.java:80) 
rx.internal.operators.OnSubscribeMap$MapSubscriber.onNext (OnSubscribeMap.java:77) 
rx.internal.operators.OnSubscribeFilter$FilterSubscriber.onNext (OnSubscribeFilter.java:76) 
rx.observers.SerializedObserver.onNext (SerializedObserver.java:92) 
rx.observers.SerializedSubscriber.onNext (SerializedSubscriber.java:94) 
rx.internal.operators.OnSubscribeConcatMap$ConcatMapSubscriber.innerNext (OnSubscribeConcatMap.java:182) 
rx.internal.operators.OnSubscribeConcatMap$ConcatMapInnerScalarProducer.request (OnSubscribeConcatMap.java:366) 
rx.internal.producers.ProducerArbiter.setProducer (ProducerArbiter.java:126) 
rx.internal.operators.OnSubscribeConcatMap$ConcatMapSubscriber.drain (OnSubscribeConcatMap.java:278) 
rx.internal.operators.OnSubscribeConcatMap$ConcatMapSubscriber.onNext (OnSubscribeConcatMap.java:144) 
rx.internal.operators.OnSubscribeFromArray$FromArrayProducer.slowPath (OnSubscribeFromArray.java:100) 
rx.internal.operators.OnSubscribeFromArray$FromArrayProducer.request (OnSubscribeFromArray.java:63) 
rx.Subscriber.setProducer (Subscriber.java:211) 
rx.internal.operators.OnSubscribeFromArray.call (OnSubscribeFromArray.java:32) 
rx.internal.operators.OnSubscribeFromArray.call (OnSubscribeFromArray.java:24) 
rx.Observable.unsafeSubscribe (Observable.java:10151) 
rx.internal.operators.OnSubscribeConcatMap.call (OnSubscribeConcatMap.java:94) 
rx.internal.operators.OnSubscribeConcatMap.call (OnSubscribeConcatMap.java:42) 
rx.Observable.unsafeSubscribe (Observable.java:10151) 
rx.internal.operators.OnSubscribeFilter.call (OnSubscribeFilter.java:45) 
rx.internal.operators.OnSubscribeFilter.call (OnSubscribeFilter.java:30) 
rx.Observable.unsafeSubscribe (Observable.java:10151) 
rx.internal.operators.OnSubscribeMap.call (OnSubscribeMap.java:48) 
rx.internal.operators.OnSubscribeMap.call (OnSubscribeMap.java:33) 
rx.internal.operators.OnSubscribeLift.call (OnSubscribeLift.java:48) 
rx.internal.operators.OnSubscribeLift.call (OnSubscribeLift.java:30) 
rx.internal.operators.OnSubscribeLift.call (OnSubscribeLift.java:48) 
rx.internal.operators.OnSubscribeLift.call (OnSubscribeLift.java:30) 
rx.Observable.unsafeSubscribe (Observable.java:10151) 
rx.internal.operators.OnSubscribeSingle.call (OnSubscribeSingle.java:81) 
rx.internal.operators.OnSubscribeSingle.call (OnSubscribeSingle.java:27) 
rx.Single$1.call (Single.java:89) 
rx.Single$1.call (Single.java:69) 
rx.Single.subscribe (Single.java:1824) 
rx.Single.subscribe (Single.java:1901) 
rx.Single$5$1.onSuccess (Single.java:677) 
rx.Single$5$1.onSuccess (Single.java:673) 
rx.Single$18.onNext (Single.java:1896) 
rx.observers.SafeSubscriber.onNext (SafeSubscriber.java:134) 
rx.internal.producers.SingleDelayedProducer.emit (SingleDelayedProducer.java:102) 
rx.internal.producers.SingleDelayedProducer.setValue (SingleDelayedProducer.java:85) 
rx.Single$1$1.onSuccess (Single.java:79) 
rx.internal.operators.SingleOnSubscribeMap$MapSubscriber.onSuccess (SingleOnSubscribeMap.java:74) 
rx.Single$18.onNext (Single.java:1896) 
rx.observers.SafeSubscriber.onNext (SafeSubscriber.java:134) 
rx.internal.producers.SingleDelayedProducer.emit (SingleDelayedProducer.java:102) 
rx.internal.producers.SingleDelayedProducer.setValue (SingleDelayedProducer.java:85) 
rx.Single$1$1.onSuccess (Single.java:79) 
rx.internal.operators.OnSubscribeSingle$1.onCompleted (OnSubscribeSingle.java:55) 
rx.internal.producers.SingleProducer.request (SingleProducer.java:75) 
rx.Subscriber.setProducer (Subscriber.java:211) 
rx.internal.operators.OperatorSingle$ParentSubscriber.onCompleted (OperatorSingle.java:110) 
rx.internal.operators.OperatorTake$1.onNext (OperatorTake.java:80) 
rx.internal.operators.NotificationLite.accept (NotificationLite.java:152) 
rx.subjects.SubjectSubscriptionManager$SubjectObserver.accept (SubjectSubscriptionManager.java:320) 
rx.subjects.SubjectSubscriptionManager$SubjectObserver.emitLoop (SubjectSubscriptionManager.java:293) 
rx.subjects.SubjectSubscriptionManager$SubjectObserver.emitFirst (SubjectSubscriptionManager.java:272) 
rx.subjects.BehaviorSubject$1.call (BehaviorSubject.java:110) 
rx.subjects.BehaviorSubject$1.call (BehaviorSubject.java:106) 
rx.subjects.SubjectSubscriptionManager.add (SubjectSubscriptionManager.java:102) 
rx.subjects.SubjectSubscriptionManager.call (SubjectSubscriptionManager.java:62) 
rx.subjects.SubjectSubscriptionManager.call (SubjectSubscriptionManager.java:35) 
rx.internal.operators.OnSubscribeLift.call (OnSubscribeLift.java:48) 
rx.internal.operators.OnSubscribeLift.call (OnSubscribeLift.java:30) 
rx.internal.operators.OnSubscribeLift.call (OnSubscribeLift.java:48) 
rx.internal.operators.OnSubscribeLift.call (OnSubscribeLift.java:30) 
rx.Observable.unsafeSubscribe (Observable.java:10151) 
rx.internal.operators.OnSubscribeSingle.call (OnSubscribeSingle.java:81) 
rx.internal.operators.OnSubscribeSingle.call (OnSubscribeSingle.java:27) 
rx.Single$1.call (Single.java:89) 
rx.Single$1.call (Single.java:69) 
rx.Single.subscribe (Single.java:1824) 
rx.Single.subscribe (Single.java:1901) 
rx.internal.operators.SingleOnSubscribeMap.call (SingleOnSubscribeMap.java:45) 
rx.internal.operators.SingleOnSubscribeMap.call (SingleOnSubscribeMap.java:30) 
...a few more lines 

私は何が起こっているかを把握することはできません。

答えて

0

それは問題は、ラムダのから来ているかを理解することは困難ですが、私はそれはあなたの第二の方法では、これらの線から来ることを推測したい:

.toSelfObservable() 
.first() 
.map(Result::toList) 

toSelfObservable()そのオブジェクトのストリームを返します。基礎となるデータが変更されたときに発生します。first()はそのストリームから最初の要素を取り、それ以外はすべて無視します。直後に、最初の項目をリストに戻します。

.toSelfObservable() 
.flatMap(new Func1<Result<Tarrif>, Observable<Tarrif>>() { 
    @Override 
    public Observable<Tarrif> call(final Result<Tarrif> tarrifs) { 
     return tarrifs.toObservable(); 
     } 
}) 

私の提案は最初に削除して、このような何かを行くことです

関連する問題