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

Correct class name in example in Part 3.1 #45

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Part 3 - Taming the sequence/1. Side effects.md
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ Subscription over
Rx is designed in the style of functional programming, but it exists within an object-oriented environment. We also have to protect against object-oriented dangers. Consider this naive implementation for a service that returns an observable.

```java
public class BrakeableService {
public class BreakableService {
public BehaviorSubject<String> items = BehaviorSubject.create("Greet");
public void play() {
items.onNext("Hello");
Expand All @@ -249,7 +249,7 @@ public class BrakeableService {
The code above does not prevent a naughty consumer from changing your `items` with one of their own. After that happens, subscriptions done before the change will no longer receive items, because you are not calling `onNext` on the right `Subject` any more. We obviously need to hide access to our `Subject`

```java
public class BrakeableService {
public class BreakableService {
private final BehaviorSubject<String> items = BehaviorSubject.create("Greet");

public BehaviorSubject<String> getValues() {
Expand Down