diff --git a/src/main/java/net/openhft/chronicle/map/JsonSerializer.java b/src/main/java/net/openhft/chronicle/map/JsonSerializer.java index d0b84b359..5edd6eac0 100644 --- a/src/main/java/net/openhft/chronicle/map/JsonSerializer.java +++ b/src/main/java/net/openhft/chronicle/map/JsonSerializer.java @@ -51,7 +51,9 @@ final class JsonSerializer { "\n"; private static final Logger LOG = LoggerFactory.getLogger(JsonSerializer.class); - static synchronized void getAll(File toFile, Map map, List jsonConverters) throws IOException { + static synchronized void getAll(final File toFile, + final Map map, + final List jsonConverters) throws IOException { final XStream xstream = xStream(map, jsonConverters); try (OutputStream outputStream = createOutputStream(toFile)) { @@ -59,7 +61,9 @@ final class JsonSerializer { } } - static synchronized void putAll(File fromFile, Map map, List jsonConverters) throws IOException { + static synchronized void putAll(final File fromFile, + final Map map, + final List jsonConverters) throws IOException { final XStream xstream = xStream(map, jsonConverters); try (InputStream inputStream = createInputStream(fromFile)) { @@ -67,21 +71,21 @@ final class JsonSerializer { } } - private static InputStream createInputStream(File toFile) throws IOException { + private static InputStream createInputStream(final File toFile) throws IOException { if (toFile.getName().toLowerCase().endsWith(".gz")) return new GZIPInputStream(new FileInputStream(toFile)); else return new FileInputStream(toFile); } - private static OutputStream createOutputStream(File toFile) throws IOException { + private static OutputStream createOutputStream(final File toFile) throws IOException { if (toFile.getName().toLowerCase().endsWith(".gz")) return new GZIPOutputStream(new FileOutputStream(toFile)); else return new FileOutputStream(toFile); } - private static XStream xStream(Map map, List jsonConverters) { + private static XStream xStream(final Map map, final List jsonConverters) { try { final XStream xstream = new XStream(new JettisonMappedXmlDriver()); xstream.setMode(XStream.NO_REFERENCES); @@ -109,7 +113,7 @@ final class JsonSerializer { } } - private static void registerChronicleMapConverter(Map map, XStream xstream) { + private static void registerChronicleMapConverter(final Map map, final XStream xstream) { xstream.registerConverter(new VanillaChronicleMapConverter<>(map)); } } \ No newline at end of file