From 00958d0dae7b21f7bf470a0414422423245db5d1 Mon Sep 17 00:00:00 2001 From: wentch <22250530@qq.com> Date: Wed, 6 Jan 2016 14:28:15 +0800 Subject: [PATCH] --- src/org/redkale/convert/bson/BsonConvert.java | 26 +++++++++---------- src/org/redkale/convert/json/JsonConvert.java | 26 +++++++++---------- 2 files changed, 26 insertions(+), 26 deletions(-) diff --git a/src/org/redkale/convert/bson/BsonConvert.java b/src/org/redkale/convert/bson/BsonConvert.java index a9c9a13bd..1bf29c6ce 100644 --- a/src/org/redkale/convert/bson/BsonConvert.java +++ b/src/org/redkale/convert/bson/BsonConvert.java @@ -68,7 +68,7 @@ public final class BsonConvert extends Convert { return readerPool.get(); } - public void offerBsonReader(BsonReader in) { + public void offerBsonReader(final BsonReader in) { if (in != null) readerPool.offer(in); } @@ -85,7 +85,7 @@ public final class BsonConvert extends Convert { return writerPool.get().tiny(tiny); } - public void offerBsonWriter(BsonWriter out) { + public void offerBsonWriter(final BsonWriter out) { if (out != null) writerPool.offer(out); } @@ -95,7 +95,7 @@ public final class BsonConvert extends Convert { return convertFrom(type, bytes, 0, bytes.length); } - public T convertFrom(final Type type, final byte[] bytes, int start, int len) { + public T convertFrom(final Type type, final byte[] bytes, final int start, final int len) { if (type == null) return null; final BsonReader in = readerPool.get(); in.setBytes(bytes, start, len); @@ -123,7 +123,7 @@ public final class BsonConvert extends Convert { } //------------------------------ convertTo ----------------------------------------------------------- - public byte[] convertTo(Object value) { + public byte[] convertTo(final Object value) { if (value == null) { final BsonWriter out = writerPool.get().tiny(tiny); out.writeNull(); @@ -134,7 +134,7 @@ public final class BsonConvert extends Convert { return convertTo(value.getClass(), value); } - public byte[] convertTo(final Type type, Object value) { + public byte[] convertTo(final Type type, final Object value) { if (type == null) return null; final BsonWriter out = writerPool.get().tiny(tiny); factory.loadEncoder(type).convertTo(out, value); @@ -143,7 +143,7 @@ public final class BsonConvert extends Convert { return result; } - public void convertTo(final OutputStream out, Object value) { + public void convertTo(final OutputStream out, final Object value) { if (value == null) { new BsonStreamWriter(tiny, out).writeNull(); } else { @@ -151,7 +151,7 @@ public final class BsonConvert extends Convert { } } - public void convertTo(final OutputStream out, final Type type, Object value) { + public void convertTo(final OutputStream out, final Type type, final Object value) { if (type == null) return; if (value == null) { new BsonStreamWriter(tiny, out).writeNull(); @@ -160,7 +160,7 @@ public final class BsonConvert extends Convert { } } - public ByteBuffer[] convertTo(final Supplier supplier, final Type type, Object value) { + public ByteBuffer[] convertTo(final Supplier supplier, final Type type, final Object value) { if (supplier == null || type == null) return null; BsonByteBufferWriter out = new BsonByteBufferWriter(tiny, supplier); if (value == null) { @@ -171,7 +171,7 @@ public final class BsonConvert extends Convert { return out.toBuffers(); } - public ByteBuffer[] convertTo(final Supplier supplier, Object value) { + public ByteBuffer[] convertTo(final Supplier supplier, final Object value) { if (supplier == null) return null; BsonByteBufferWriter out = new BsonByteBufferWriter(tiny, supplier); if (value == null) { @@ -182,7 +182,7 @@ public final class BsonConvert extends Convert { return out.toBuffers(); } - public void convertTo(final BsonWriter writer, Object value) { + public void convertTo(final BsonWriter writer, final Object value) { if (value == null) { writer.writeNull(); } else { @@ -190,17 +190,17 @@ public final class BsonConvert extends Convert { } } - public void convertTo(final BsonWriter writer, final Type type, Object value) { + public void convertTo(final BsonWriter writer, final Type type, final Object value) { if (type == null) return; factory.loadEncoder(type).convertTo(writer, value); } - public BsonWriter convertToWriter(Object value) { + public BsonWriter convertToWriter(final Object value) { if (value == null) return null; return convertToWriter(value.getClass(), value); } - public BsonWriter convertToWriter(final Type type, Object value) { + public BsonWriter convertToWriter(final Type type, final Object value) { if (type == null) return null; final BsonWriter out = writerPool.get().tiny(tiny); factory.loadEncoder(type).convertTo(out, value); diff --git a/src/org/redkale/convert/json/JsonConvert.java b/src/org/redkale/convert/json/JsonConvert.java index 5bc5e5821..1057794b4 100644 --- a/src/org/redkale/convert/json/JsonConvert.java +++ b/src/org/redkale/convert/json/JsonConvert.java @@ -55,7 +55,7 @@ public final class JsonConvert extends Convert { return readerPool.get(); } - public void offerJsonReader(JsonReader in) { + public void offerJsonReader(final JsonReader in) { if (in != null) readerPool.offer(in); } @@ -76,7 +76,7 @@ public final class JsonConvert extends Convert { return writerPool.get().tiny(tiny); } - public void offerJsonWriter(JsonWriter out) { + public void offerJsonWriter(final JsonWriter out) { if (out != null) writerPool.offer(out); } @@ -91,7 +91,7 @@ public final class JsonConvert extends Convert { return convertFrom(type, text, 0, text.length); } - public T convertFrom(final Type type, final char[] text, int start, int len) { + public T convertFrom(final Type type, final char[] text, final int start, final int len) { if (text == null || type == null) return null; final JsonReader in = readerPool.get(); in.setText(text, start, len); @@ -118,12 +118,12 @@ public final class JsonConvert extends Convert { } //------------------------------ convertTo ----------------------------------------------------------- - public String convertTo(Object value) { + public String convertTo(final Object value) { if (value == null) return "null"; return convertTo(value.getClass(), value); } - public String convertTo(final Type type, Object value) { + public String convertTo(final Type type, final Object value) { if (type == null) return null; if (value == null) return "null"; final JsonWriter out = writerPool.get().tiny(tiny); @@ -133,7 +133,7 @@ public final class JsonConvert extends Convert { return result; } - public void convertTo(final OutputStream out, Object value) { + public void convertTo(final OutputStream out, final Object value) { if (value == null) { new JsonStreamWriter(tiny, out).writeNull(); } else { @@ -141,7 +141,7 @@ public final class JsonConvert extends Convert { } } - public void convertTo(final OutputStream out, final Type type, Object value) { + public void convertTo(final OutputStream out, final Type type, final Object value) { if (type == null) return; if (value == null) { new JsonStreamWriter(tiny, out).writeNull(); @@ -150,7 +150,7 @@ public final class JsonConvert extends Convert { } } - public ByteBuffer[] convertTo(final Supplier supplier, Object value) { + public ByteBuffer[] convertTo(final Supplier supplier, final Object value) { if (supplier == null) return null; JsonByteBufferWriter out = new JsonByteBufferWriter(tiny, null, supplier); if (value == null) { @@ -161,7 +161,7 @@ public final class JsonConvert extends Convert { return out.toBuffers(); } - public ByteBuffer[] convertTo(final Supplier supplier, final Type type, Object value) { + public ByteBuffer[] convertTo(final Supplier supplier, final Type type, final Object value) { if (supplier == null || type == null) return null; JsonByteBufferWriter out = new JsonByteBufferWriter(tiny, null, supplier); if (value == null) { @@ -172,7 +172,7 @@ public final class JsonConvert extends Convert { return out.toBuffers(); } - public void convertTo(final JsonWriter writer, Object value) { + public void convertTo(final JsonWriter writer, final Object value) { if (value == null) { writer.writeNull(); } else { @@ -180,7 +180,7 @@ public final class JsonConvert extends Convert { } } - public void convertTo(final JsonWriter writer, final Type type, Object value) { + public void convertTo(final JsonWriter writer, final Type type, final Object value) { if (type == null) return; if (value == null) { writer.writeNull(); @@ -189,12 +189,12 @@ public final class JsonConvert extends Convert { } } - public JsonWriter convertToWriter(Object value) { + public JsonWriter convertToWriter(final Object value) { if (value == null) return null; return convertToWriter(value.getClass(), value); } - public JsonWriter convertToWriter(final Type type, Object value) { + public JsonWriter convertToWriter(final Type type, final Object value) { if (type == null) return null; final JsonWriter out = writerPool.get().tiny(tiny); factory.loadEncoder(type).convertTo(out, value);