From bde57649fc776aaae574bb916ce26ffc2e245d36 Mon Sep 17 00:00:00 2001 From: Jack Keys Date: Fri, 16 Mar 2018 12:03:45 -0600 Subject: [PATCH] Correct class name in example in Part 3.1 --- Part 3 - Taming the sequence/1. Side effects.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Part 3 - Taming the sequence/1. Side effects.md b/Part 3 - Taming the sequence/1. Side effects.md index a4bcdeb..c0a4eda 100644 --- a/Part 3 - Taming the sequence/1. Side effects.md +++ b/Part 3 - Taming the sequence/1. Side effects.md @@ -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 items = BehaviorSubject.create("Greet"); public void play() { items.onNext("Hello"); @@ -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 items = BehaviorSubject.create("Greet"); public BehaviorSubject getValues() {