Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update dematerialize so can chain correctly #190

Merged
merged 1 commit into from
Mar 13, 2013

Conversation

prabirshrestha
Copy link
Contributor

Just noticed this when I actually had to chain it.

Observable<File> saveResult = ....;

current:

Observable<Notification<File>> a = saveResult.materialize().dematerialize();

expected:

Observable<File> a = saveResult.materialize().dematerialize();

here is what is happening

Observable<File> x = saveResult;
Observable<Notification<File>> y = x.materialize();
Observable<Notification<File>> currentResult = y.dematerialize();
Observable<File> expectedResult = Observable.dematerialize(y);

workaround is to use static method to get the expected result.

With this change you can chain correctly. Added unit test.

Observable<Integer> obs = Observable.just(1);
Observable<Integer> chained = obs.materialize().dematerialize();

This will be a breaking change. But I think this is the expected way.

@cloudbees-pull-request-builder

RxJava-pull-requests #29 SUCCESS
This pull request looks good

@benjchristensen
Copy link
Member

So it's just the generics that are wrong?

@benjchristensen
Copy link
Member

Yeah ... this works without this fix:

Observable chained = obs.materialize().dematerialize();

but the compiler doesn't like this because the generics are wrong:

Observable<Integer> chained = obs.materialize().dematerialize();

benjchristensen added a commit that referenced this pull request Mar 13, 2013
update dematerialize so can chain correctly
@benjchristensen benjchristensen merged commit 22b2e47 into ReactiveX:master Mar 13, 2013
@prabirshrestha prabirshrestha deleted the chainDematerialize branch March 13, 2013 20:59
@benjchristensen
Copy link
Member

@prabirshrestha
Copy link
Contributor Author

awesome. thanks. now need to wait for the maven repo update :(

I did notice the Gradle Release Plugin - pre tag commit: 'rxjava-0.6.1'. 671db35

is the jar in maven and ci the same?

@benjchristensen
Copy link
Member

The jar is built by internal Netflix build servers and then uploaded to Maven Central.

The public CI (CloudBees) also builds the jar but that one never goes anywhere.

rickbw pushed a commit to rickbw/RxJava that referenced this pull request Jan 9, 2014
update dematerialize so can chain correctly
jihoonson pushed a commit to jihoonson/RxJava that referenced this pull request Mar 6, 2020
Add missing closing statement for code block
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants