Skip to content

Commit b019a34

Browse files
...
1 parent e3ba1a9 commit b019a34

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

SerialX-core/src/main/java/org/ugp/serialx/converters/DataConverter.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public interface DataConverter extends DataParser
2020
* @param args | Some additional args. This can be anything and it demands on implementation of DataConverter. Default SerialX API implementation will provide some flags about formating (2 ints)!
2121
*
2222
* @return Object converted to string. Easiest way to do this is obj.toString() but you most likely want some more sofisticated formating.
23-
* Return {@link DataParser#CONTINUE} to tell that this converter is not suitable for converting this object! You most likely want to do this when obtained obj is not suitable instance!
23+
* <br>Return {@link DataParser#CONTINUE} to tell that this converter is not suitable for converting this object! You most likely want to do this when obtained obj is not suitable instance!
2424
*
2525
* @since 1.3.0
2626
*/
@@ -44,7 +44,8 @@ default CharSequence toString(ParserRegistry myHomeRegistry, Object obj, Object.
4444
* @param args | Some additional args. This can be anything and it demands on implementation of DataConverter. Default SerialX API implementation will provide some flags about formating (2 ints)!
4545
*
4646
* @return The source appendable after stringified object (obj) was appropriately appended into it. Alternatively you can return null to signify error or that everything necessary was already appended and no further chars should be appended immediately after this obj's stringification.
47-
* Return {@link DataParser#CONTINUE} to tell that this converter is not suitable for converting this object! You most likely want to do this when obtained obj is not suitable instance!
47+
* <br>Return {@link DataParser#CONTINUE} to tell that this converter is not suitable for converting this object! You most likely want to do this when obtained obj is not suitable instance!
48+
* <br>Note: It is highly discouraged to append into this return!
4849
*
4950
* @throws IOException When appending into source throws it...
5051
*

SerialX-core/src/main/java/org/ugp/serialx/converters/DataParser.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public interface DataParser
3434
*
3535
* @since 1.3.0
3636
*/
37-
public static final Appendable CONTINUE = new StringBuilder();
37+
public static final Appendable CONTINUE = new StringBuilder(0);
3838

3939
/**
4040
* This is DataParser registry. Here your parser implementations should be registered in order to work properly!
@@ -186,7 +186,8 @@ public CharSequence toString(Object obj, Object... args)
186186
* @param args | Additional arguments that will be obtained in {@link DataParser#toString(String, Object...)}!
187187
*
188188
* @return The source appendable after stringified object (obj) was appropriately appended into it. Alternatively you can return null to signify error or that everything necessary was already appended and no further chars should be appended immediately after this obj's stringification.
189-
* Return {@link DataParser#CONTINUE} to tell that this converter is not suitable for converting this object! You most likely want to do this when obtained obj is not suitable instance!
189+
* <br>Return {@link DataParser#CONTINUE} to tell that this converter is not suitable for converting this object! You most likely want to do this when obtained obj is not suitable instance!
190+
* <br>Note: It is highly discouraged to append into this return!
190191
*
191192
* @throws IOException When appending into source throws it...
192193
*

SerialX-core/src/main/java/org/ugp/serialx/converters/ProtocolConverter.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,8 +179,7 @@ public Appendable toString(Appendable source, ParserRegistry myHomeRegistry, Obj
179179
* @param preferedProtocol | Protocol to use preferably.
180180
* @param args | Some additional args. This can be anything and it demands on implementation of DataConverter. Default SerialX API implementation will provide some flags about formating (2 ints)!
181181
*
182-
* @return The source appendable after stringified object (obj) was appropriately appended into it. Alternatively you can return null to signify error or that everything necessary was already appended and no further chars should be appended immediately after this obj's stringification.
183-
* Return {@link DataParser#CONTINUE} to tell that this converter is not suitable for converting this object! You most likely want to do this when obtained obj is not suitable instance!
182+
* @return In accordance with {@link DataConverter#toString(Appendable, org.ugp.serialx.converters.DataParser.ParserRegistry, Object, Object...)}.
184183
*
185184
* @since 1.3.5
186185
*/

0 commit comments

Comments
 (0)