You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tolerant-reader/README.md
+28-24Lines changed: 28 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,7 @@ Allows a system to be more resilient to changes in the data structures it consum
19
19
20
20
## Explanation
21
21
22
-
Realworld example
22
+
Real-world example
23
23
24
24
> Imagine a postal system that delivers letters and packages to recipients. In this system, postal workers deliver mail regardless of additional information or stickers that might be present on the envelopes or packages. If a package has extra labels or instructions that the postal system does not recognize, the postal worker ignores these and focuses only on the essential information like the address. This approach ensures that the delivery process remains functional even when senders use different formats or include unnecessary details, similar to how the Tolerant Reader pattern works in software by ignoring unrecognized data elements to maintain functionality and compatibility.
25
25
@@ -49,7 +49,9 @@ public class RainbowFish implements Serializable {
49
49
privatefinalint lengthMeters;
50
50
privatefinalint weightTons;
51
51
}
52
+
```
52
53
54
+
```java
53
55
@Getter
54
56
publicclassRainbowFishV2extendsRainbowFish {
55
57
@@ -77,7 +79,6 @@ public class RainbowFishV2 extends RainbowFish {
77
79
Next we introduce the `RainbowFishSerializer`. This is the class that implements the Tolerant Reader pattern.
78
80
79
81
```java
80
-
81
82
@NoArgsConstructor
82
83
publicfinalclassRainbowFishSerializer {
83
84
@@ -133,23 +134,30 @@ public final class RainbowFishSerializer {
0 commit comments