From 35e1afd7dcb20c03b53b915ae6c921fe3b43c0a4 Mon Sep 17 00:00:00 2001 From: Ilkka Seppala Date: Fri, 21 Aug 2015 23:25:22 +0300 Subject: [PATCH] #107 Tolerant Reader JavaDoc --- .../src/main/java/com/iluwatar/tolerantreader/App.java | 10 +++++----- .../iluwatar/tolerantreader/RainbowFishSerializer.java | 4 ++-- .../test/java/com/iluwatar/tolerantreader/AppTest.java | 6 +++++- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/tolerant-reader/src/main/java/com/iluwatar/tolerantreader/App.java b/tolerant-reader/src/main/java/com/iluwatar/tolerantreader/App.java index ab4a8bfad..d4ff933d7 100644 --- a/tolerant-reader/src/main/java/com/iluwatar/tolerantreader/App.java +++ b/tolerant-reader/src/main/java/com/iluwatar/tolerantreader/App.java @@ -7,14 +7,14 @@ import java.io.IOException; * Tolerant Reader is an integration pattern that helps creating robust communication * systems. The idea is to be as tolerant as possible when reading data from another * service. This way, when the communication schema changes, the readers must not break. - * - * In this example we use Java serialization to write representations of RainbowFish - * objects to file. RainbowFish is the initial version which we can easily read and - * write using RainbowFishSerializer methods. RainbowFish then evolves to RainbowFishV2 + *

+ * In this example we use Java serialization to write representations of {@link RainbowFish} + * objects to file. {@link RainbowFish} is the initial version which we can easily read and + * write using {@link RainbowFishSerializer} methods. {@link RainbowFish} then evolves to {@link RainbowFishV2} * and we again write it to file with a method designed to do just that. However, the reader * client does not know about the new format and still reads with the method designed for * V1 schema. Fortunately the reading method has been designed with the Tolerant Reader - * pattern and does not break even though RainbowFishV2 has new fields that are serialized. + * pattern and does not break even though {@link RainbowFishV2} has new fields that are serialized. * */ public class App { diff --git a/tolerant-reader/src/main/java/com/iluwatar/tolerantreader/RainbowFishSerializer.java b/tolerant-reader/src/main/java/com/iluwatar/tolerantreader/RainbowFishSerializer.java index ec482a34a..e788bcad4 100644 --- a/tolerant-reader/src/main/java/com/iluwatar/tolerantreader/RainbowFishSerializer.java +++ b/tolerant-reader/src/main/java/com/iluwatar/tolerantreader/RainbowFishSerializer.java @@ -10,8 +10,8 @@ import java.util.Map; /** * - * RainbowFishSerializer provides methods for reading and writing RainbowFish objects to file. - * Tolerant Reader pattern is implemented here by serializing maps instead of RainbowFish objects. + * RainbowFishSerializer provides methods for reading and writing {@link RainbowFish} objects to file. + * Tolerant Reader pattern is implemented here by serializing maps instead of {@link RainbowFish} objects. * This way the reader does not break even though new properties are added to the schema. * */ diff --git a/tolerant-reader/src/test/java/com/iluwatar/tolerantreader/AppTest.java b/tolerant-reader/src/test/java/com/iluwatar/tolerantreader/AppTest.java index cba24ada9..bc5066866 100644 --- a/tolerant-reader/src/test/java/com/iluwatar/tolerantreader/AppTest.java +++ b/tolerant-reader/src/test/java/com/iluwatar/tolerantreader/AppTest.java @@ -9,7 +9,11 @@ import org.junit.Test; import com.iluwatar.tolerantreader.App; - +/** + * + * Application test + * + */ public class AppTest { @Test