You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@servicecomb.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2018/10/10 03:57:00 UTC

[jira] [Commented] (SCB-947) delete old jackson protobuf logic

    [ https://issues.apache.org/jira/browse/SCB-947?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16644414#comment-16644414 ] 

ASF GitHub Bot commented on SCB-947:
------------------------------------

liubao68 closed pull request #933: [SCB-947] delete old jackson protobuf logic
URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/933
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/common/common-protobuf/pom.xml b/common/common-protobuf/pom.xml
index 2eea75317..fa999abee 100644
--- a/common/common-protobuf/pom.xml
+++ b/common/common-protobuf/pom.xml
@@ -39,11 +39,6 @@
       <groupId>io.protostuff</groupId>
       <artifactId>protostuff-runtime</artifactId>
     </dependency>
-    <!-- 当前没作用,但是后续还是要改回jackson插件机制的,相关代码先保留吧 -->
-    <dependency>
-      <groupId>com.fasterxml.jackson.dataformat</groupId>
-      <artifactId>jackson-dataformat-protobuf</artifactId>
-    </dependency>
     <dependency>
       <groupId>org.apache.servicecomb</groupId>
       <artifactId>common-javassist</artifactId>
diff --git a/common/common-protobuf/src/main/java/org/apache/servicecomb/codec/protobuf/codec/AbstractCodec.java b/common/common-protobuf/src/main/java/org/apache/servicecomb/codec/protobuf/codec/AbstractCodec.java
deleted file mode 100644
index 3098b19a6..000000000
--- a/common/common-protobuf/src/main/java/org/apache/servicecomb/codec/protobuf/codec/AbstractCodec.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.servicecomb.codec.protobuf.codec;
-
-import java.lang.reflect.Type;
-
-import com.fasterxml.jackson.databind.ObjectReader;
-import com.fasterxml.jackson.databind.ObjectWriter;
-import com.fasterxml.jackson.dataformat.protobuf.schema.ProtobufSchema;
-
-public abstract class AbstractCodec {
-  protected ObjectWriter writer;
-
-  protected ObjectReader reader;
-
-  public ObjectWriter getWriter() {
-    return writer;
-  }
-
-  public ObjectReader getReader() {
-    return reader;
-  }
-
-  public abstract void init(ProtobufSchema schema, Type... types);
-}
diff --git a/common/common-protobuf/src/main/java/org/apache/servicecomb/codec/protobuf/codec/AbstractFieldCodec.java b/common/common-protobuf/src/main/java/org/apache/servicecomb/codec/protobuf/codec/AbstractFieldCodec.java
deleted file mode 100644
index be664e3d1..000000000
--- a/common/common-protobuf/src/main/java/org/apache/servicecomb/codec/protobuf/codec/AbstractFieldCodec.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.servicecomb.codec.protobuf.codec;
-
-import java.lang.reflect.Type;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-import org.apache.servicecomb.codec.protobuf.jackson.CseObjectReader;
-
-import com.fasterxml.jackson.databind.JavaType;
-import com.fasterxml.jackson.databind.JsonDeserializer;
-import com.fasterxml.jackson.databind.type.TypeFactory;
-import com.fasterxml.jackson.dataformat.protobuf.schema.ProtobufField;
-import com.fasterxml.jackson.dataformat.protobuf.schema.ProtobufSchema;
-
-public class AbstractFieldCodec extends AbstractCodec {
-  public static class ReaderHelpData {
-    // 在reader返回的Object[]中的下标
-    private int index;
-
-    private JsonDeserializer<Object> deser;
-
-    public int getIndex() {
-      return index;
-    }
-
-    public void setIndex(int index) {
-      this.index = index;
-    }
-
-    public JsonDeserializer<Object> getDeser() {
-      return deser;
-    }
-
-    public void setDeser(JsonDeserializer<Object> deser) {
-      this.deser = deser;
-    }
-  }
-
-  // key为field name
-  protected Map<String, ReaderHelpData> readerHelpDataMap = new HashMap<>();
-
-  @Override
-  public void init(ProtobufSchema schema, Type... types) {
-    initFieldMap(schema, types);
-  }
-
-  private void initFieldMap(ProtobufSchema schema, Type[] types) {
-    Iterator<ProtobufField> fieldIter = schema.getRootType().fields().iterator();
-    for (int idx = 0; idx < schema.getRootType().getFieldCount(); idx++) {
-      JavaType type = TypeFactory.defaultInstance().constructType(types[idx]);
-      ProtobufField field = fieldIter.next();
-
-      ReaderHelpData helpData = new ReaderHelpData();
-      helpData.index = idx;
-      helpData.deser = ((CseObjectReader) reader).findDeserializer(type);
-
-      readerHelpDataMap.put(field.name, helpData);
-    }
-  }
-
-  public ReaderHelpData findInfo(String name) {
-    return readerHelpDataMap.get(name);
-  }
-}
diff --git a/common/common-protobuf/src/main/java/org/apache/servicecomb/codec/protobuf/codec/ParamFieldCodec.java b/common/common-protobuf/src/main/java/org/apache/servicecomb/codec/protobuf/codec/ParamFieldCodec.java
deleted file mode 100644
index 356e01aa0..000000000
--- a/common/common-protobuf/src/main/java/org/apache/servicecomb/codec/protobuf/codec/ParamFieldCodec.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.servicecomb.codec.protobuf.codec;
-
-import java.lang.reflect.Type;
-
-import org.apache.servicecomb.codec.protobuf.definition.ProtobufManager;
-import org.apache.servicecomb.codec.protobuf.jackson.CseObjectReader;
-import org.apache.servicecomb.codec.protobuf.jackson.CseObjectWriter;
-import org.apache.servicecomb.codec.protobuf.jackson.ParamDeserializer;
-import org.apache.servicecomb.codec.protobuf.jackson.ParamSerializer;
-
-import com.fasterxml.jackson.dataformat.protobuf.schema.ProtobufSchema;
-
-public class ParamFieldCodec extends AbstractFieldCodec {
-  @Override
-  public void init(ProtobufSchema schema, Type... types) {
-    writer = new CseObjectWriter(ProtobufManager.getWriter(), schema, new ParamSerializer());
-    reader =
-        new CseObjectReader(ProtobufManager.getReader(), schema, new ParamDeserializer(readerHelpDataMap));
-
-    super.init(schema, types);
-  }
-}
diff --git a/common/common-protobuf/src/main/java/org/apache/servicecomb/codec/protobuf/codec/ResultFieldCodec.java b/common/common-protobuf/src/main/java/org/apache/servicecomb/codec/protobuf/codec/ResultFieldCodec.java
deleted file mode 100644
index 819c8c984..000000000
--- a/common/common-protobuf/src/main/java/org/apache/servicecomb/codec/protobuf/codec/ResultFieldCodec.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.servicecomb.codec.protobuf.codec;
-
-import java.lang.reflect.Type;
-
-import org.apache.servicecomb.codec.protobuf.definition.ProtobufManager;
-import org.apache.servicecomb.codec.protobuf.jackson.CseObjectReader;
-import org.apache.servicecomb.codec.protobuf.jackson.CseObjectWriter;
-import org.apache.servicecomb.codec.protobuf.jackson.ResultDeserializer;
-import org.apache.servicecomb.codec.protobuf.jackson.ResultSerializer;
-
-import com.fasterxml.jackson.dataformat.protobuf.schema.ProtobufSchema;
-
-public class ResultFieldCodec extends AbstractFieldCodec {
-  @Override
-  public void init(ProtobufSchema schema, Type... types) {
-    writer = new CseObjectWriter(ProtobufManager.getWriter(), schema, new ResultSerializer());
-    reader =
-        new CseObjectReader(ProtobufManager.getReader(), schema, new ResultDeserializer(readerHelpDataMap));
-
-    super.init(schema, types);
-  }
-}
diff --git a/common/common-protobuf/src/main/java/org/apache/servicecomb/codec/protobuf/codec/StandardParamCodec.java b/common/common-protobuf/src/main/java/org/apache/servicecomb/codec/protobuf/codec/StandardParamCodec.java
deleted file mode 100644
index a62a408c3..000000000
--- a/common/common-protobuf/src/main/java/org/apache/servicecomb/codec/protobuf/codec/StandardParamCodec.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.servicecomb.codec.protobuf.codec;
-
-import java.lang.reflect.Type;
-
-import org.apache.servicecomb.codec.protobuf.definition.ProtobufManager;
-import org.apache.servicecomb.codec.protobuf.jackson.StandardObjectReader;
-import org.apache.servicecomb.codec.protobuf.jackson.StandardObjectWriter;
-
-import com.fasterxml.jackson.databind.JavaType;
-import com.fasterxml.jackson.databind.type.TypeFactory;
-import com.fasterxml.jackson.dataformat.protobuf.schema.ProtobufSchema;
-
-public class StandardParamCodec extends AbstractCodec {
-  @Override
-  public void init(ProtobufSchema schema, Type... types) {
-    writer = ProtobufManager.getMapper().writer(schema);
-    reader = ProtobufManager.getMapper().reader(schema);
-
-    // 需要考虑没参数的场景
-    if (types.length == 1) {
-      JavaType javaType = TypeFactory.defaultInstance().constructType(types[0]);
-      writer = new StandardObjectWriter(writer.forType(javaType));
-      reader = new StandardObjectReader(reader.forType(javaType));
-    }
-  }
-}
diff --git a/common/common-protobuf/src/main/java/org/apache/servicecomb/codec/protobuf/codec/StandardResultCodec.java b/common/common-protobuf/src/main/java/org/apache/servicecomb/codec/protobuf/codec/StandardResultCodec.java
deleted file mode 100644
index bffb13547..000000000
--- a/common/common-protobuf/src/main/java/org/apache/servicecomb/codec/protobuf/codec/StandardResultCodec.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.servicecomb.codec.protobuf.codec;
-
-import java.lang.reflect.Type;
-
-import org.apache.servicecomb.codec.protobuf.definition.ProtobufManager;
-
-import com.fasterxml.jackson.databind.JavaType;
-import com.fasterxml.jackson.databind.type.TypeFactory;
-import com.fasterxml.jackson.dataformat.protobuf.schema.ProtobufSchema;
-
-public class StandardResultCodec extends AbstractCodec {
-  @Override
-  public void init(ProtobufSchema schema, Type... types) {
-    writer = ProtobufManager.getMapper().writer(schema);
-    reader = ProtobufManager.getMapper().reader(schema);
-
-    // 需要考虑void场景
-    if (types.length == 1) {
-      JavaType javaType = TypeFactory.defaultInstance().constructType(types[0]);
-      writer = writer.forType(javaType);
-      reader = reader.forType(javaType);
-    }
-  }
-}
diff --git a/common/common-protobuf/src/main/java/org/apache/servicecomb/codec/protobuf/definition/ProtobufManager.java b/common/common-protobuf/src/main/java/org/apache/servicecomb/codec/protobuf/definition/ProtobufManager.java
index ca8f9bad6..0d6278ceb 100644
--- a/common/common-protobuf/src/main/java/org/apache/servicecomb/codec/protobuf/definition/ProtobufManager.java
+++ b/common/common-protobuf/src/main/java/org/apache/servicecomb/codec/protobuf/definition/ProtobufManager.java
@@ -22,20 +22,9 @@
 import org.apache.servicecomb.core.definition.OperationMeta;
 import org.apache.servicecomb.foundation.common.utils.JvmUtils;
 
-import com.fasterxml.jackson.databind.ObjectReader;
-import com.fasterxml.jackson.databind.ObjectWriter;
-import com.fasterxml.jackson.databind.SerializationFeature;
-import com.fasterxml.jackson.dataformat.protobuf.ProtobufMapper;
-
 public final class ProtobufManager {
   private static ProtobufManager instance = new ProtobufManager();
 
-  private static ProtobufMapper mapper = new ProtobufMapper();
-
-  private static ObjectWriter writer = mapper.writer();
-
-  private static ObjectReader reader = mapper.reader();
-
   public static final String EXT_ID = "protobuf";
 
   private static final Object LOCK = new Object();
@@ -43,11 +32,6 @@
   private static ScopedProtobufSchemaManager defaultScopedProtobufSchemaManager = new ScopedProtobufSchemaManager(
       JvmUtils.findClassLoader());
 
-  static {
-    // 支持在idl中定义empty message
-    mapper.disable(SerializationFeature.FAIL_ON_EMPTY_BEANS);
-  }
-
   private ProtobufManager() {
   }
 
@@ -84,16 +68,4 @@ public static OperationProtobuf getOrCreateOperation(OperationMeta operationMeta
   public static ProtobufManager getInstance() {
     return instance;
   }
-
-  public static ProtobufMapper getMapper() {
-    return mapper;
-  }
-
-  public static ObjectWriter getWriter() {
-    return writer;
-  }
-
-  public static ObjectReader getReader() {
-    return reader;
-  }
 }
diff --git a/common/common-protobuf/src/main/java/org/apache/servicecomb/codec/protobuf/jackson/AbstractDeserializer.java b/common/common-protobuf/src/main/java/org/apache/servicecomb/codec/protobuf/jackson/AbstractDeserializer.java
deleted file mode 100644
index 591aee5ad..000000000
--- a/common/common-protobuf/src/main/java/org/apache/servicecomb/codec/protobuf/jackson/AbstractDeserializer.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.servicecomb.codec.protobuf.jackson;
-
-import java.io.IOException;
-import java.util.Map;
-
-import org.apache.servicecomb.codec.protobuf.codec.AbstractFieldCodec.ReaderHelpData;
-
-import com.fasterxml.jackson.core.JsonParser;
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.core.JsonToken;
-import com.fasterxml.jackson.databind.DeserializationContext;
-import com.fasterxml.jackson.databind.JsonDeserializer;
-
-public abstract class AbstractDeserializer extends JsonDeserializer<Object> {
-  protected Map<String, ReaderHelpData> readerHelpDataMap;
-
-  public AbstractDeserializer(Map<String, ReaderHelpData> readerHelpDataMap) {
-    this.readerHelpDataMap = readerHelpDataMap;
-  }
-
-  @Override
-  public Object deserialize(JsonParser p, DeserializationContext ctxt) throws IOException, JsonProcessingException {
-    Object result = createResult();
-    for (String fieldName = p.nextFieldName(); fieldName != null; fieldName = p.nextFieldName()) {
-      // p实际是ProtobufParser,其内部是可以直接取到proto field的,理论上可以根据id来索引
-      // 可是field默认没暴露出来,所以,直接用name索引了
-      ReaderHelpData helpData = readerHelpDataMap.get(fieldName);
-      if (helpData == null) {
-        continue;
-      }
-
-      JsonToken t = p.nextToken();
-      // Note: must handle null explicitly here; value deserializers won't
-      Object value = null;
-      if (t == JsonToken.VALUE_NULL) {
-        value = helpData.getDeser().getNullValue(ctxt);
-      } else {
-        value = helpData.getDeser().deserialize(p, ctxt);
-      }
-
-      result = updateResult(result, value, helpData);
-    }
-
-    return result;
-  }
-
-  protected abstract Object createResult();
-
-  protected abstract Object updateResult(Object result, Object value, ReaderHelpData helpData);
-}
diff --git a/common/common-protobuf/src/main/java/org/apache/servicecomb/codec/protobuf/jackson/CseObjectReader.java b/common/common-protobuf/src/main/java/org/apache/servicecomb/codec/protobuf/jackson/CseObjectReader.java
deleted file mode 100644
index 9e1d6cf4e..000000000
--- a/common/common-protobuf/src/main/java/org/apache/servicecomb/codec/protobuf/jackson/CseObjectReader.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.servicecomb.codec.protobuf.jackson;
-
-import com.fasterxml.jackson.core.FormatSchema;
-import com.fasterxml.jackson.databind.JavaType;
-import com.fasterxml.jackson.databind.JsonDeserializer;
-import com.fasterxml.jackson.databind.ObjectReader;
-
-public class CseObjectReader extends ObjectReader {
-  private static final long serialVersionUID = -4154834940923475928L;
-
-  public CseObjectReader(ObjectReader base, FormatSchema schema, JsonDeserializer<Object> rootDeser) {
-    super(base, base.getConfig(), null, rootDeser, null, schema, null, null);
-  }
-
-  public JsonDeserializer<Object> findDeserializer(JavaType valueType) {
-    return _prefetchRootDeserializer(valueType);
-  }
-}
diff --git a/common/common-protobuf/src/main/java/org/apache/servicecomb/codec/protobuf/jackson/CseObjectWriter.java b/common/common-protobuf/src/main/java/org/apache/servicecomb/codec/protobuf/jackson/CseObjectWriter.java
deleted file mode 100644
index c2c133051..000000000
--- a/common/common-protobuf/src/main/java/org/apache/servicecomb/codec/protobuf/jackson/CseObjectWriter.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.servicecomb.codec.protobuf.jackson;
-
-import java.lang.reflect.Constructor;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import com.fasterxml.jackson.core.FormatSchema;
-import com.fasterxml.jackson.databind.JsonSerializer;
-import com.fasterxml.jackson.databind.ObjectWriter;
-
-@SuppressWarnings("unchecked")
-public class CseObjectWriter extends ObjectWriter {
-
-  private static final Logger LOGGER = LoggerFactory.getLogger(CseObjectWriter.class);
-
-  private static final long serialVersionUID = -6435897284942268001L;
-
-  private static Constructor<Prefetch> prefetchConstructor;
-
-  static {
-    prefetchConstructor = (Constructor<Prefetch>) Prefetch.class.getDeclaredConstructors()[0];
-    prefetchConstructor.setAccessible(true);
-  }
-
-  private static Prefetch createPrefetch(JsonSerializer<Object> valueSerializer) {
-    try {
-      return prefetchConstructor.newInstance(null, valueSerializer, null);
-    } catch (Exception e) {
-      LOGGER.error("create prefetch error:", e);
-    }
-    return null;
-  }
-
-  public CseObjectWriter(ObjectWriter base, FormatSchema schema, JsonSerializer<Object> valueSerializer) {
-
-    super(base, base.getConfig(), new GeneratorSettings(null, schema, null, null),
-        createPrefetch(valueSerializer));
-  }
-}
diff --git a/common/common-protobuf/src/main/java/org/apache/servicecomb/codec/protobuf/jackson/ParamDeserializer.java b/common/common-protobuf/src/main/java/org/apache/servicecomb/codec/protobuf/jackson/ParamDeserializer.java
deleted file mode 100644
index 34c999733..000000000
--- a/common/common-protobuf/src/main/java/org/apache/servicecomb/codec/protobuf/jackson/ParamDeserializer.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.servicecomb.codec.protobuf.jackson;
-
-import java.util.Map;
-
-import org.apache.servicecomb.codec.protobuf.codec.AbstractFieldCodec.ReaderHelpData;
-
-public class ParamDeserializer extends AbstractDeserializer {
-
-  public ParamDeserializer(Map<String, ReaderHelpData> readerHelpDataMap) {
-    super(readerHelpDataMap);
-  }
-
-  @Override
-  protected Object createResult() {
-    return new Object[readerHelpDataMap.size()];
-  }
-
-  @Override
-  protected Object updateResult(Object result, Object value, ReaderHelpData helpData) {
-    ((Object[]) result)[helpData.getIndex()] = value;
-    return result;
-  }
-}
diff --git a/common/common-protobuf/src/main/java/org/apache/servicecomb/codec/protobuf/jackson/ParamSerializer.java b/common/common-protobuf/src/main/java/org/apache/servicecomb/codec/protobuf/jackson/ParamSerializer.java
deleted file mode 100644
index 4e959b6e5..000000000
--- a/common/common-protobuf/src/main/java/org/apache/servicecomb/codec/protobuf/jackson/ParamSerializer.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.servicecomb.codec.protobuf.jackson;
-
-import java.io.IOException;
-import java.util.Iterator;
-
-import com.fasterxml.jackson.core.JsonGenerator;
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.databind.JsonSerializer;
-import com.fasterxml.jackson.databind.SerializerProvider;
-import com.fasterxml.jackson.dataformat.protobuf.ProtobufGenerator;
-import com.fasterxml.jackson.dataformat.protobuf.schema.ProtobufField;
-
-public class ParamSerializer extends JsonSerializer<Object> {
-  @Override
-  public void serialize(Object value, JsonGenerator gen,
-      SerializerProvider serializers) throws IOException, JsonProcessingException {
-    gen.writeStartObject();
-
-    ProtobufGenerator protobufGenerator = (ProtobufGenerator) gen;
-    Iterator<ProtobufField> iter = protobufGenerator.getSchema().getRootType().fields().iterator();
-    Object[] values = (Object[]) value;
-    for (Object value1 : values) {
-      gen.writeObjectField(iter.next().name, value1);
-    }
-
-    gen.writeEndObject();
-  }
-}
diff --git a/common/common-protobuf/src/main/java/org/apache/servicecomb/codec/protobuf/jackson/ResultDeserializer.java b/common/common-protobuf/src/main/java/org/apache/servicecomb/codec/protobuf/jackson/ResultDeserializer.java
deleted file mode 100644
index a5e261f97..000000000
--- a/common/common-protobuf/src/main/java/org/apache/servicecomb/codec/protobuf/jackson/ResultDeserializer.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.servicecomb.codec.protobuf.jackson;
-
-import java.util.Map;
-
-import org.apache.servicecomb.codec.protobuf.codec.AbstractFieldCodec.ReaderHelpData;
-
-public class ResultDeserializer extends AbstractDeserializer {
-
-  public ResultDeserializer(Map<String, ReaderHelpData> readerHelpDataMap) {
-    super(readerHelpDataMap);
-  }
-
-  @Override
-  protected Object createResult() {
-    return null;
-  }
-
-  @Override
-  protected Object updateResult(Object result, Object value, ReaderHelpData helpData) {
-    return value;
-  }
-}
diff --git a/common/common-protobuf/src/main/java/org/apache/servicecomb/codec/protobuf/jackson/ResultSerializer.java b/common/common-protobuf/src/main/java/org/apache/servicecomb/codec/protobuf/jackson/ResultSerializer.java
deleted file mode 100644
index 8bdf231c7..000000000
--- a/common/common-protobuf/src/main/java/org/apache/servicecomb/codec/protobuf/jackson/ResultSerializer.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.servicecomb.codec.protobuf.jackson;
-
-import java.io.IOException;
-
-import com.fasterxml.jackson.core.JsonGenerator;
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.databind.JsonSerializer;
-import com.fasterxml.jackson.databind.SerializerProvider;
-import com.fasterxml.jackson.dataformat.protobuf.ProtobufGenerator;
-import com.fasterxml.jackson.dataformat.protobuf.schema.ProtobufField;
-
-public class ResultSerializer extends JsonSerializer<Object> {
-  @Override
-  public void serialize(Object value, JsonGenerator gen,
-      SerializerProvider serializers) throws IOException, JsonProcessingException {
-    gen.writeStartObject();
-
-    ProtobufGenerator protobufGenerator = (ProtobufGenerator) gen;
-    ProtobufField field = protobufGenerator.getSchema().getRootType().firstField();
-    gen.writeObjectField(field.name, value);
-
-    gen.writeEndObject();
-  }
-}
diff --git a/common/common-protobuf/src/main/java/org/apache/servicecomb/codec/protobuf/jackson/StandardObjectReader.java b/common/common-protobuf/src/main/java/org/apache/servicecomb/codec/protobuf/jackson/StandardObjectReader.java
deleted file mode 100644
index bc118348a..000000000
--- a/common/common-protobuf/src/main/java/org/apache/servicecomb/codec/protobuf/jackson/StandardObjectReader.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.servicecomb.codec.protobuf.jackson;
-
-import java.io.IOException;
-import java.io.InputStream;
-
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.databind.ObjectReader;
-
-public class StandardObjectReader extends ObjectReader {
-  private static final long serialVersionUID = -8162644250351645123L;
-
-  public StandardObjectReader(ObjectReader base) {
-    super(base, base.getConfig());
-  }
-
-  @SuppressWarnings("unchecked")
-  @Override
-  public <T> T readValue(InputStream src) throws IOException, JsonProcessingException {
-    T result = super.readValue(src);
-    return (T) new Object[] {result};
-  }
-}
diff --git a/common/common-protobuf/src/main/java/org/apache/servicecomb/codec/protobuf/jackson/StandardObjectWriter.java b/common/common-protobuf/src/main/java/org/apache/servicecomb/codec/protobuf/jackson/StandardObjectWriter.java
deleted file mode 100644
index 59d5d6e87..000000000
--- a/common/common-protobuf/src/main/java/org/apache/servicecomb/codec/protobuf/jackson/StandardObjectWriter.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.servicecomb.codec.protobuf.jackson;
-
-import java.io.IOException;
-import java.io.OutputStream;
-
-import com.fasterxml.jackson.core.JsonGenerationException;
-import com.fasterxml.jackson.databind.JsonMappingException;
-import com.fasterxml.jackson.databind.ObjectWriter;
-
-public class StandardObjectWriter extends ObjectWriter {
-  private static final long serialVersionUID = -8162644250351645123L;
-
-  public StandardObjectWriter(ObjectWriter base) {
-    super(base, base.getConfig());
-  }
-
-  @Override
-  public void writeValue(OutputStream out,
-      Object value) throws IOException, JsonGenerationException, JsonMappingException {
-    Object[] values = (Object[]) value;
-    super.writeValue(out, values[0]);
-  }
-}
diff --git a/common/common-protobuf/src/test/java/org/apache/servicecomb/codec/protobuf/codec/TestAbstractCodec.java b/common/common-protobuf/src/test/java/org/apache/servicecomb/codec/protobuf/codec/TestAbstractCodec.java
deleted file mode 100644
index c364d4897..000000000
--- a/common/common-protobuf/src/test/java/org/apache/servicecomb/codec/protobuf/codec/TestAbstractCodec.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.servicecomb.codec.protobuf.codec;
-
-import java.lang.reflect.Type;
-
-import org.junit.After;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-
-import com.fasterxml.jackson.dataformat.protobuf.schema.ProtobufSchema;
-
-public class TestAbstractCodec extends AbstractCodec {
-
-  private AbstractCodec abstractCodecTest = null;
-
-  @Before
-  public void setUp() throws Exception {
-    abstractCodecTest = new TestAbstractCodec();
-  }
-
-  @After
-  public void tearDown() throws Exception {
-    abstractCodecTest = null;
-  }
-
-  @Test
-  public void testGetWriter() {
-    Assert.assertNull(abstractCodecTest.getWriter());
-  }
-
-  @Test
-  public void testGetReader() {
-    Assert.assertNull(abstractCodecTest.getReader());
-  }
-
-  @Override
-  public void init(ProtobufSchema schema, Type... types) {
-    /* Do not worry, overridden method*/
-  }
-}
diff --git a/common/common-protobuf/src/test/java/org/apache/servicecomb/codec/protobuf/codec/TestAbstractFieldCodec.java b/common/common-protobuf/src/test/java/org/apache/servicecomb/codec/protobuf/codec/TestAbstractFieldCodec.java
deleted file mode 100644
index d74ff8941..000000000
--- a/common/common-protobuf/src/test/java/org/apache/servicecomb/codec/protobuf/codec/TestAbstractFieldCodec.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.servicecomb.codec.protobuf.codec;
-
-import java.lang.reflect.Type;
-import java.util.Arrays;
-
-import org.apache.servicecomb.codec.protobuf.definition.ProtobufManager;
-import org.apache.servicecomb.codec.protobuf.jackson.CseObjectReader;
-import org.apache.servicecomb.codec.protobuf.jackson.CseObjectWriter;
-import org.apache.servicecomb.codec.protobuf.jackson.ParamDeserializer;
-import org.apache.servicecomb.codec.protobuf.jackson.ParamSerializer;
-import org.junit.After;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-import org.mockito.Mockito;
-
-import com.fasterxml.jackson.databind.JsonDeserializer;
-import com.fasterxml.jackson.databind.ObjectReader;
-import com.fasterxml.jackson.databind.ObjectWriter;
-import com.fasterxml.jackson.dataformat.protobuf.protoparser.protoparser.FieldElement;
-import com.fasterxml.jackson.dataformat.protobuf.schema.FieldType;
-import com.fasterxml.jackson.dataformat.protobuf.schema.ProtobufField;
-import com.fasterxml.jackson.dataformat.protobuf.schema.ProtobufMessage;
-import com.fasterxml.jackson.dataformat.protobuf.schema.ProtobufSchema;
-
-public class TestAbstractFieldCodec extends AbstractFieldCodec {
-
-  private AbstractFieldCodec abstractFieldCodec = null;
-
-  private ProtobufSchema schema = null;
-
-  @Before
-  public void setUp() throws Exception {
-    abstractFieldCodec = new TestAbstractFieldCodec();
-    schema = Mockito.mock(ProtobufSchema.class);
-  }
-
-  @After
-  public void tearDown() throws Exception {
-    abstractFieldCodec = null;
-    schema = null;
-  }
-
-  @Override
-  public ObjectWriter getWriter() {
-    return writer;
-  }
-
-  @Override
-  public ObjectReader getReader() {
-    return reader;
-  }
-
-  @Test
-  public void testInit() {
-    ProtobufField[] protobufFieldArray = new ProtobufField[5];
-    FieldElement rawType = null;
-    FieldType type = FieldType.STRING;
-    ProtobufField p = new ProtobufField(rawType, type);
-    protobufFieldArray[0] = p;
-    Type[] types = new Type[1];
-    types[0] = Integer.TYPE;
-
-    Mockito.when(schema.getRootType()).thenReturn(Mockito.mock(ProtobufMessage.class));
-    Mockito.when(schema.getRootType().getFieldCount()).thenReturn(1);
-    Mockito.when(schema.getRootType().fields()).thenReturn(Arrays.asList(protobufFieldArray));
-    abstractFieldCodec.init(schema, types);
-    Assert.assertNotNull(abstractFieldCodec.readerHelpDataMap.get("UNKNOWN"));
-  }
-
-  @Test
-  public void testFindInfo() {
-    Assert.assertNull(abstractFieldCodec.findInfo("name"));
-  }
-
-  @Override
-  public void init(ProtobufSchema schema, Type... types) {
-    writer = new CseObjectWriter(ProtobufManager.getWriter(), schema, new ParamSerializer());
-    reader = new CseObjectReader(ProtobufManager.getReader(), schema, new ParamDeserializer(readerHelpDataMap));
-    super.init(schema, types);
-  }
-
-  @Test
-  public void testReaderHelpData() {
-    ReaderHelpData ReaderHelpData = new ReaderHelpData();
-    ReaderHelpData.setIndex(10);
-    ReaderHelpData.getDeser();
-    @SuppressWarnings("unchecked")
-    JsonDeserializer<Object> j = Mockito.mock(JsonDeserializer.class);
-    ReaderHelpData.setDeser(j);
-    Assert.assertEquals(10, ReaderHelpData.getIndex());
-  }
-}
diff --git a/common/common-protobuf/src/test/java/org/apache/servicecomb/codec/protobuf/codec/TestParamFieldCodec.java b/common/common-protobuf/src/test/java/org/apache/servicecomb/codec/protobuf/codec/TestParamFieldCodec.java
deleted file mode 100644
index 3eaddee58..000000000
--- a/common/common-protobuf/src/test/java/org/apache/servicecomb/codec/protobuf/codec/TestParamFieldCodec.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.servicecomb.codec.protobuf.codec;
-
-import java.lang.reflect.Type;
-import java.util.Arrays;
-
-import org.junit.After;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-import org.mockito.Mockito;
-
-import com.fasterxml.jackson.dataformat.protobuf.protoparser.protoparser.FieldElement;
-import com.fasterxml.jackson.dataformat.protobuf.schema.FieldType;
-import com.fasterxml.jackson.dataformat.protobuf.schema.ProtobufField;
-import com.fasterxml.jackson.dataformat.protobuf.schema.ProtobufMessage;
-import com.fasterxml.jackson.dataformat.protobuf.schema.ProtobufSchema;
-
-public class TestParamFieldCodec {
-
-  private ParamFieldCodec paramFieldCodec = null;
-
-  private ProtobufSchema schema = null;
-
-  @Before
-  public void setUp() throws Exception {
-    paramFieldCodec = new ParamFieldCodec();
-    schema = Mockito.mock(ProtobufSchema.class);
-  }
-
-  @After
-  public void tearDown() throws Exception {
-    paramFieldCodec = null;
-    schema = null;
-  }
-
-  @Test
-  public void testInit() {
-    Assert.assertNotNull(paramFieldCodec);
-
-    ProtobufField[] protobufFieldArray = new ProtobufField[5];
-    FieldElement rawType = null;
-    FieldType type = FieldType.STRING;
-    ProtobufField p = new ProtobufField(rawType, type);
-    protobufFieldArray[0] = p;
-    Type[] types = new Type[10];
-    types[0] = Integer.TYPE;
-
-    Mockito.when(schema.getRootType()).thenReturn(Mockito.mock(ProtobufMessage.class));
-    Mockito.when(schema.getRootType().getFieldCount()).thenReturn(1);
-    Mockito.when(schema.getRootType().fields()).thenReturn(Arrays.asList(protobufFieldArray));
-    Assert.assertNull(paramFieldCodec.reader);
-    Assert.assertNull(paramFieldCodec.writer);
-    paramFieldCodec.init(schema, types);
-    Assert.assertNotNull(paramFieldCodec.reader);
-    Assert.assertNotNull(paramFieldCodec.writer);
-  }
-}
diff --git a/common/common-protobuf/src/test/java/org/apache/servicecomb/codec/protobuf/codec/TestResultFieldCodec.java b/common/common-protobuf/src/test/java/org/apache/servicecomb/codec/protobuf/codec/TestResultFieldCodec.java
deleted file mode 100644
index 1874cbe1f..000000000
--- a/common/common-protobuf/src/test/java/org/apache/servicecomb/codec/protobuf/codec/TestResultFieldCodec.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.servicecomb.codec.protobuf.codec;
-
-import java.lang.reflect.Type;
-import java.util.Arrays;
-
-import org.junit.After;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-import org.mockito.Mockito;
-
-import com.fasterxml.jackson.dataformat.protobuf.protoparser.protoparser.FieldElement;
-import com.fasterxml.jackson.dataformat.protobuf.schema.FieldType;
-import com.fasterxml.jackson.dataformat.protobuf.schema.ProtobufField;
-import com.fasterxml.jackson.dataformat.protobuf.schema.ProtobufMessage;
-import com.fasterxml.jackson.dataformat.protobuf.schema.ProtobufSchema;
-
-public class TestResultFieldCodec {
-  private ResultFieldCodec resultFieldCodec = null;
-
-  private ProtobufSchema schema = null;
-
-  @Before
-  public void setUp() throws Exception {
-    resultFieldCodec = new ResultFieldCodec();
-    schema = Mockito.mock(ProtobufSchema.class);
-  }
-
-  @After
-  public void tearDown() throws Exception {
-    resultFieldCodec = null;
-    schema = null;
-  }
-
-  @Test
-  public void testInit() {
-    Assert.assertNotNull(resultFieldCodec);
-
-    ProtobufField[] protobufFieldArray = new ProtobufField[5];
-    FieldElement rawType = null;
-    FieldType type = FieldType.STRING;
-    ProtobufField p = new ProtobufField(rawType, type);
-    protobufFieldArray[0] = p;
-    Type[] types = new Type[10];
-    types[0] = Integer.TYPE;
-
-    Mockito.when(schema.getRootType()).thenReturn(Mockito.mock(ProtobufMessage.class));
-    Mockito.when(schema.getRootType().getFieldCount()).thenReturn(1);
-    Mockito.when(schema.getRootType().fields()).thenReturn(Arrays.asList(protobufFieldArray));
-    Assert.assertNull(resultFieldCodec.reader);
-    Assert.assertNull(resultFieldCodec.writer);
-    resultFieldCodec.init(schema, types);
-    Assert.assertNotNull(resultFieldCodec.reader);
-    Assert.assertNotNull(resultFieldCodec.writer);
-  }
-}
diff --git a/common/common-protobuf/src/test/java/org/apache/servicecomb/codec/protobuf/codec/TestStandardParamCodec.java b/common/common-protobuf/src/test/java/org/apache/servicecomb/codec/protobuf/codec/TestStandardParamCodec.java
deleted file mode 100644
index f07195eae..000000000
--- a/common/common-protobuf/src/test/java/org/apache/servicecomb/codec/protobuf/codec/TestStandardParamCodec.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.servicecomb.codec.protobuf.codec;
-
-import java.lang.reflect.Type;
-import java.util.Arrays;
-
-import org.junit.After;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-import org.mockito.Mockito;
-
-import com.fasterxml.jackson.dataformat.protobuf.protoparser.protoparser.FieldElement;
-import com.fasterxml.jackson.dataformat.protobuf.schema.FieldType;
-import com.fasterxml.jackson.dataformat.protobuf.schema.ProtobufField;
-import com.fasterxml.jackson.dataformat.protobuf.schema.ProtobufMessage;
-import com.fasterxml.jackson.dataformat.protobuf.schema.ProtobufSchema;
-
-public class TestStandardParamCodec {
-  public final static String FORMAT_NAME_PROTOBUF = "protobuf";
-
-  private StandardParamCodec standardParamCodec = null;
-
-  private ProtobufSchema schema = null;
-
-  @Before
-  public void setUp() throws Exception {
-    standardParamCodec = new StandardParamCodec();
-    schema = Mockito.mock(ProtobufSchema.class);
-  }
-
-  @After
-  public void tearDown() throws Exception {
-    standardParamCodec = null;
-    schema = null;
-  }
-
-  @Test
-  public void testInit() {
-    Assert.assertNotNull(standardParamCodec);
-    ProtobufField[] protobufFieldArray = new ProtobufField[5];
-    FieldElement rawType = null;
-    FieldType type = FieldType.STRING;
-    ProtobufField p = new ProtobufField(rawType, type);
-    protobufFieldArray[0] = p;
-    Type[] types = new Type[1];
-    types[0] = Integer.TYPE;
-
-    Mockito.when(schema.getSchemaType()).thenReturn(FORMAT_NAME_PROTOBUF);
-    Mockito.when(schema.getRootType()).thenReturn(Mockito.mock(ProtobufMessage.class));
-    Mockito.when(schema.getRootType().getFieldCount()).thenReturn(1);
-    Mockito.when(schema.getRootType().fields()).thenReturn(Arrays.asList(protobufFieldArray));
-    Assert.assertNull(standardParamCodec.writer);
-    Assert.assertNull(standardParamCodec.reader);
-    standardParamCodec.init(schema, types);
-    Assert.assertNotNull(standardParamCodec.writer);
-    Assert.assertNotNull(standardParamCodec.reader);
-  }
-}
diff --git a/common/common-protobuf/src/test/java/org/apache/servicecomb/codec/protobuf/codec/TestStandardResultCodec.java b/common/common-protobuf/src/test/java/org/apache/servicecomb/codec/protobuf/codec/TestStandardResultCodec.java
deleted file mode 100644
index b99738a8c..000000000
--- a/common/common-protobuf/src/test/java/org/apache/servicecomb/codec/protobuf/codec/TestStandardResultCodec.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.servicecomb.codec.protobuf.codec;
-
-import java.lang.reflect.Type;
-import java.util.Arrays;
-
-import org.junit.After;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-import org.mockito.Mockito;
-
-import com.fasterxml.jackson.dataformat.protobuf.protoparser.protoparser.FieldElement;
-import com.fasterxml.jackson.dataformat.protobuf.schema.FieldType;
-import com.fasterxml.jackson.dataformat.protobuf.schema.ProtobufField;
-import com.fasterxml.jackson.dataformat.protobuf.schema.ProtobufMessage;
-import com.fasterxml.jackson.dataformat.protobuf.schema.ProtobufSchema;
-
-public class TestStandardResultCodec {
-
-  private StandardResultCodec standardResultCodec = null;
-
-  private ProtobufSchema schema = null;
-
-  public final static String FORMAT_NAME_PROTOBUF = "protobuf";
-
-  @Before
-  public void setUp() throws Exception {
-    standardResultCodec = new StandardResultCodec();
-    schema = Mockito.mock(ProtobufSchema.class);
-  }
-
-  @After
-  public void tearDown() throws Exception {
-    standardResultCodec = null;
-    schema = null;
-  }
-
-  @Test
-  public void testInit() {
-    Assert.assertNotNull(standardResultCodec);
-
-    ProtobufField[] protobufFieldArray = new ProtobufField[5];
-    FieldElement rawType = null;
-    FieldType type = FieldType.STRING;
-    ProtobufField p = new ProtobufField(rawType, type);
-    protobufFieldArray[0] = p;
-    Type[] types = new Type[1];
-    types[0] = Integer.TYPE;
-
-    Mockito.when(schema.getSchemaType()).thenReturn(FORMAT_NAME_PROTOBUF);
-    Mockito.when(schema.getRootType()).thenReturn(Mockito.mock(ProtobufMessage.class));
-    Mockito.when(schema.getRootType().getFieldCount()).thenReturn(1);
-    Mockito.when(schema.getRootType().fields()).thenReturn(Arrays.asList(protobufFieldArray));
-    Assert.assertNull(standardResultCodec.reader);
-    Assert.assertNull(standardResultCodec.writer);
-    standardResultCodec.init(schema, types);
-    Assert.assertNotNull(standardResultCodec.reader);
-    Assert.assertNotNull(standardResultCodec.writer);
-  }
-}
diff --git a/common/common-protobuf/src/test/java/org/apache/servicecomb/codec/protobuf/jackson/TestAbstractDeserializer.java b/common/common-protobuf/src/test/java/org/apache/servicecomb/codec/protobuf/jackson/TestAbstractDeserializer.java
deleted file mode 100644
index ca033ea68..000000000
--- a/common/common-protobuf/src/test/java/org/apache/servicecomb/codec/protobuf/jackson/TestAbstractDeserializer.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.servicecomb.codec.protobuf.jackson;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.servicecomb.codec.protobuf.codec.AbstractFieldCodec.ReaderHelpData;
-import org.junit.After;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-import org.mockito.Mockito;
-
-import com.fasterxml.jackson.core.JsonParser;
-import com.fasterxml.jackson.core.JsonToken;
-import com.fasterxml.jackson.databind.DeserializationContext;
-import com.fasterxml.jackson.databind.JsonDeserializer;
-
-public class TestAbstractDeserializer extends AbstractDeserializer {
-
-  private AbstractDeserializer abstractDeserializer = null;
-
-  private JsonParser jsonParser = Mockito.mock(JsonParser.class);
-
-  static ReaderHelpData readerHelpData = Mockito.mock(ReaderHelpData.class);
-
-  static Map<String, ReaderHelpData> readerHelpDataMap = new HashMap<>();
-
-  public static void setReaderHelpDataMap(Map<String, ReaderHelpData> readerHelpDataMap) {
-    TestAbstractDeserializer.readerHelpDataMap = readerHelpDataMap;
-    readerHelpDataMap.put("abc", readerHelpData);
-    readerHelpDataMap.put("null", readerHelpData);
-  }
-
-  static {
-    TestAbstractDeserializer.setReaderHelpDataMap(readerHelpDataMap);
-  }
-
-  public TestAbstractDeserializer() {
-    super(readerHelpDataMap);
-  }
-
-  @Before
-  public void setUp() throws Exception {
-    abstractDeserializer = new TestAbstractDeserializer();
-  }
-
-  @After
-  public void tearDown() throws Exception {
-    abstractDeserializer = null;
-    jsonParser = null;
-  }
-
-  @SuppressWarnings("unchecked")
-  @Test
-  public void testDeserialize() {
-    boolean status = false;
-    try {
-      DeserializationContext ctxt = Mockito.mock(DeserializationContext.class);
-      @SuppressWarnings("rawtypes")
-      JsonDeserializer JsonDeserializer = Mockito.mock(JsonDeserializer.class);
-      Object object = null;
-      Mockito.when(jsonParser.nextFieldName()).thenReturn("abc", (String) null);
-      Mockito.when(readerHelpData.getDeser()).thenReturn(JsonDeserializer);
-      Mockito.when(JsonDeserializer.deserialize(jsonParser, ctxt)).thenReturn(object);
-      Object deserializeObject = abstractDeserializer.deserialize(jsonParser, ctxt);
-      Assert.assertNotNull(deserializeObject);
-    } catch (Exception e) {
-      status = true;
-    }
-    Assert.assertFalse(status);
-  }
-
-  @Override
-  protected Object createResult() {
-    return null;
-  }
-
-  @Override
-  protected Object updateResult(Object result, Object value, ReaderHelpData helpData) {
-    /* Do not worry, overridden method*/
-    try {
-      Mockito.when(jsonParser.nextToken()).thenReturn(JsonToken.VALUE_NULL);
-    } catch (Exception e) {
-    }
-    return new Object();
-  }
-}
diff --git a/common/common-protobuf/src/test/java/org/apache/servicecomb/codec/protobuf/jackson/TestParamDeserializer.java b/common/common-protobuf/src/test/java/org/apache/servicecomb/codec/protobuf/jackson/TestParamDeserializer.java
deleted file mode 100644
index 97cd52c9b..000000000
--- a/common/common-protobuf/src/test/java/org/apache/servicecomb/codec/protobuf/jackson/TestParamDeserializer.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.servicecomb.codec.protobuf.jackson;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.servicecomb.codec.protobuf.codec.AbstractFieldCodec.ReaderHelpData;
-import org.junit.After;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-
-public class TestParamDeserializer {
-
-  private ParamDeserializer paramDeserializer = null;
-
-  private Map<String, ReaderHelpData> readerHelpDataMap = new HashMap<>();
-
-  @Before
-  public void setUp() throws Exception {
-    paramDeserializer = new ParamDeserializer(readerHelpDataMap);
-  }
-
-  @After
-  public void tearDown() throws Exception {
-    paramDeserializer = null;
-  }
-
-  @Test
-  public void testCreateResult() {
-    Object object = paramDeserializer.createResult();
-    Assert.assertNotNull(object);
-    // object is created but no values inside to assert
-  }
-
-  @Test
-  public void testUpdateResult() {
-    String[] stringArray = new String[1];
-    stringArray[0] = "abc";
-    Object[] object = new Object[1];
-    Object paramObject = paramDeserializer.updateResult(object, stringArray, new ReaderHelpData());
-    Assert.assertNotNull(paramObject);
-    Assert.assertEquals(paramObject, object);
-  }
-}
diff --git a/common/common-protobuf/src/test/java/org/apache/servicecomb/codec/protobuf/jackson/TestParamSerializer.java b/common/common-protobuf/src/test/java/org/apache/servicecomb/codec/protobuf/jackson/TestParamSerializer.java
deleted file mode 100644
index 6e6dff57f..000000000
--- a/common/common-protobuf/src/test/java/org/apache/servicecomb/codec/protobuf/jackson/TestParamSerializer.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.servicecomb.codec.protobuf.jackson;
-
-import java.io.IOException;
-import java.io.OutputStream;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.junit.After;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-import org.mockito.Mockito;
-
-import com.fasterxml.jackson.core.JsonGenerator;
-import com.fasterxml.jackson.core.ObjectCodec;
-import com.fasterxml.jackson.core.io.IOContext;
-import com.fasterxml.jackson.databind.SerializerProvider;
-import com.fasterxml.jackson.dataformat.protobuf.ProtobufGenerator;
-import com.fasterxml.jackson.dataformat.protobuf.schema.ProtobufField;
-import com.fasterxml.jackson.dataformat.protobuf.schema.ProtobufMessage;
-import com.fasterxml.jackson.dataformat.protobuf.schema.ProtobufSchema;
-
-import mockit.Mock;
-import mockit.MockUp;
-
-public class TestParamSerializer {
-
-  private ParamSerializer paramSerializer = null;
-
-  @Before
-  public void setUp() throws Exception {
-    paramSerializer = new ParamSerializer();
-  }
-
-  @After
-  public void tearDown() throws Exception {
-    paramSerializer = null;
-  }
-
-  @Test
-  public void testSerialize() {
-    boolean status = true;
-    Assert.assertNotNull(paramSerializer);
-    String[] stringArray = new String[1];
-    stringArray[0] = "abc";
-
-    ProtobufGenerator obj = null;
-    try {
-      obj = new ProtobufGenerator(Mockito.mock(IOContext.class), 2, Mockito.mock(ObjectCodec.class),
-          Mockito.mock(OutputStream.class));
-    } catch (IOException exce) {
-    }
-
-    Assert.assertNotNull(obj);
-    new MockUp<ProtobufGenerator>() {
-
-      @Mock
-      public void writeStartObject() throws IOException {
-
-      }
-
-      ProtobufSchema protobufSchema = new ProtobufSchema(null, null);
-
-      @Mock
-      public ProtobufSchema getSchema() {
-        return protobufSchema;
-      }
-    };
-
-    ProtobufMessage protobufMessage = new ProtobufMessage(null, null);
-    new MockUp<ProtobufSchema>() {
-      @Mock
-      public ProtobufMessage getRootType() {
-        return protobufMessage;
-      }
-    };
-
-    List<ProtobufField> listProtobufField = new ArrayList<>();
-    listProtobufField.add(Mockito.mock(ProtobufField.class));
-
-    new MockUp<ProtobufMessage>() {
-      @Mock
-      public Iterable<ProtobufField> fields() {
-        return listProtobufField;
-      }
-    };
-
-    new MockUp<JsonGenerator>() {
-      @Mock
-      public void writeObjectField(String fieldName, Object pojo) throws IOException {
-
-      }
-    };
-
-    new MockUp<ProtobufGenerator>() {
-
-      @Mock
-      public void writeEndObject() throws IOException {
-
-      }
-    };
-
-    try {
-      paramSerializer.serialize(stringArray,
-          obj,
-          Mockito.mock(SerializerProvider.class));
-    } catch (IOException e) {
-      status = false;
-    }
-
-    Assert.assertTrue(status);
-  }
-}
diff --git a/common/common-protobuf/src/test/java/org/apache/servicecomb/codec/protobuf/jackson/TestResultSerializer.java b/common/common-protobuf/src/test/java/org/apache/servicecomb/codec/protobuf/jackson/TestResultSerializer.java
deleted file mode 100644
index 67da58b72..000000000
--- a/common/common-protobuf/src/test/java/org/apache/servicecomb/codec/protobuf/jackson/TestResultSerializer.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.servicecomb.codec.protobuf.jackson;
-
-import java.io.IOException;
-import java.io.OutputStream;
-
-import org.apache.servicecomb.foundation.vertx.stream.BufferOutputStream;
-import org.junit.After;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-import org.mockito.Mockito;
-
-import com.fasterxml.jackson.core.JsonGenerator;
-import com.fasterxml.jackson.core.ObjectCodec;
-import com.fasterxml.jackson.core.io.IOContext;
-import com.fasterxml.jackson.databind.SerializerProvider;
-import com.fasterxml.jackson.dataformat.protobuf.ProtobufGenerator;
-import com.fasterxml.jackson.dataformat.protobuf.schema.ProtobufField;
-import com.fasterxml.jackson.dataformat.protobuf.schema.ProtobufMessage;
-import com.fasterxml.jackson.dataformat.protobuf.schema.ProtobufSchema;
-
-import mockit.Mock;
-import mockit.MockUp;
-
-public class TestResultSerializer {
-
-  private ResultSerializer resultSerializer = null;
-
-  OutputStream outputStream = null;
-
-  @Before
-  public void setUp() throws Exception {
-    resultSerializer = new ResultSerializer();
-    outputStream = new BufferOutputStream();
-  }
-
-  @After
-  public void tearDown() throws Exception {
-    resultSerializer = null;
-    outputStream = null;
-  }
-
-  @Test
-  public void testSerialize() {
-    boolean status = true;
-    Assert.assertNotNull(resultSerializer);
-    String[] stringArray = new String[1];
-    stringArray[0] = "abc";
-
-    ProtobufGenerator obj = null;
-    try {
-      obj = new ProtobufGenerator(Mockito.mock(IOContext.class), 2, Mockito.mock(ObjectCodec.class),
-          outputStream);
-    } catch (IOException exce) {
-    }
-
-    Assert.assertNotNull(obj);
-
-    new MockUp<ProtobufGenerator>() {
-
-      @Mock
-      public void writeStartObject() throws IOException {
-
-      }
-
-      ProtobufSchema protobufSchema = new ProtobufSchema(null, null);
-
-      @Mock
-      public ProtobufSchema getSchema() {
-        return protobufSchema;
-      }
-    };
-    ProtobufMessage protobufMessage = new ProtobufMessage(null, null);
-    new MockUp<ProtobufSchema>() {
-      @Mock
-      public ProtobufMessage getRootType() {
-        return protobufMessage;
-      }
-    };
-
-    new MockUp<ProtobufMessage>() {
-      @Mock
-      public ProtobufField firstField() {
-        return Mockito.mock(ProtobufField.class);
-      }
-    };
-
-    new MockUp<JsonGenerator>() {
-      @Mock
-      public void writeObjectField(String fieldName, Object pojo) throws IOException {
-
-      }
-    };
-
-    new MockUp<ProtobufGenerator>() {
-
-      @Mock
-      public void writeEndObject() throws IOException {
-
-      }
-    };
-
-    try {
-      resultSerializer.serialize(stringArray,
-          obj,
-          Mockito.mock(SerializerProvider.class));
-    } catch (IOException e) {
-      status = false;
-    }
-
-    Assert.assertTrue(status);
-  }
-}
diff --git a/common/common-protobuf/src/test/java/org/apache/servicecomb/codec/protobuf/jackson/TestStandardObjectWriter.java b/common/common-protobuf/src/test/java/org/apache/servicecomb/codec/protobuf/jackson/TestStandardObjectWriter.java
deleted file mode 100644
index 68810973c..000000000
--- a/common/common-protobuf/src/test/java/org/apache/servicecomb/codec/protobuf/jackson/TestStandardObjectWriter.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.servicecomb.codec.protobuf.jackson;
-
-import java.io.IOException;
-import java.io.OutputStream;
-
-import org.apache.servicecomb.foundation.vertx.stream.BufferOutputStream;
-import org.junit.After;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-import org.mockito.Mockito;
-
-import com.fasterxml.jackson.core.JsonGenerationException;
-import com.fasterxml.jackson.databind.JsonMappingException;
-import com.fasterxml.jackson.databind.ObjectWriter;
-
-import mockit.Mock;
-import mockit.MockUp;
-
-public class TestStandardObjectWriter {
-
-  private StandardObjectWriter StandardObjectWriter = null;
-
-  private OutputStream outputStream = null;
-
-  @Before
-  public void setUp() throws Exception {
-    StandardObjectWriter = new StandardObjectWriter(Mockito.mock(ObjectWriter.class));
-    outputStream = new BufferOutputStream();
-  }
-
-  @After
-  public void tearDown() throws Exception {
-    StandardObjectWriter = null;
-    outputStream = null;
-  }
-
-  @Test
-  public void testWriteValueOutputStreamObject() {
-    boolean status = true;
-    String[] stringArray = new String[1];
-    stringArray[0] = "abc";
-
-    new MockUp<ObjectWriter>() {
-      @Mock
-      public void writeValue(OutputStream out,
-          Object value) throws IOException, JsonGenerationException, JsonMappingException {
-
-      }
-    };
-    try {
-      StandardObjectWriter.writeValue(outputStream,
-          stringArray);
-    } catch (IOException e) {
-      status = false;
-    }
-
-    Assert.assertTrue(status);
-  }
-}


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> delete old jackson protobuf logic
> ---------------------------------
>
>                 Key: SCB-947
>                 URL: https://issues.apache.org/jira/browse/SCB-947
>             Project: Apache ServiceComb
>          Issue Type: Sub-task
>          Components: Java-Chassis
>            Reporter: wujimin
>            Assignee: wujimin
>            Priority: Major
>             Fix For: java-chassis-1.1.0
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)