mirror of
https://github.com/plexusorg/toml4j.git
synced 2024-05-16 09:31:36 +00:00
Remove ValueWriters#write(Object, WriterContext)
This commit is contained in:
parent
95e7f28cfa
commit
9358162a58
|
@ -38,7 +38,7 @@ class PrimitiveArrayValueWriter extends ArrayValueWriter {
|
|||
context.write(", ");
|
||||
}
|
||||
|
||||
WRITERS.write(value, context);
|
||||
WRITERS.findWriterFor(value).write(value, context);
|
||||
}
|
||||
|
||||
context.writeArrayDelimiterPadding();
|
||||
|
|
|
@ -13,13 +13,13 @@ class TableArrayValueWriter extends ArrayValueWriter {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void write(Object value, WriterContext context) {
|
||||
Collection<?> values = normalize(value);
|
||||
public void write(Object from, WriterContext context) {
|
||||
Collection<?> values = normalize(from);
|
||||
|
||||
WriterContext subContext = context.pushTableFromArray();
|
||||
|
||||
for (Object elem : values) {
|
||||
WRITERS.write(elem, subContext);
|
||||
for (Object value : values) {
|
||||
WRITERS.findWriterFor(value).write(value, subContext);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -147,6 +147,6 @@ public class TomlWriter {
|
|||
*/
|
||||
public void write(Object from, Writer target) throws IOException {
|
||||
WriterContext context = new WriterContext(indentationPolicy, datePolicy, target);
|
||||
WRITERS.write(from, context);
|
||||
WRITERS.findWriterFor(from).write(from, context);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,10 +24,6 @@ class ValueWriters {
|
|||
return OBJECT_VALUE_WRITER;
|
||||
}
|
||||
|
||||
void write(Object value, WriterContext context) {
|
||||
findWriterFor(value).write(value, context);
|
||||
}
|
||||
|
||||
private ValueWriters() {}
|
||||
|
||||
private static DateConverter getPlatformSpecificDateConverter() {
|
||||
|
|
Loading…
Reference in a new issue