The following issues were found
src/test/java/com/alibaba/json/test/entity/case1/LongObject_100_Entity.java
3 issues
Line: 1
package com.alibaba.json.test.entity.case1;
public class LongObject_100_Entity {
private Long f0;
private Long f1;
private Long f2;
private Long f3;
private Long f4;
Reported by PMD.
Line: 3
package com.alibaba.json.test.entity.case1;
public class LongObject_100_Entity {
private Long f0;
private Long f1;
private Long f2;
private Long f3;
private Long f4;
Reported by PMD.
Line: 3
package com.alibaba.json.test.entity.case1;
public class LongObject_100_Entity {
private Long f0;
private Long f1;
private Long f2;
private Long f3;
private Long f4;
Reported by PMD.
src/test/java/com/alibaba/json/test/TestSysProperty.java
3 issues
Line: 8
public class TestSysProperty extends TestCase {
public void test_0 () throws Exception {
System.out.println(System.getProperty("java.vm.name"));
}
}
Reported by PMD.
Line: 7
public class TestSysProperty extends TestCase {
public void test_0 () throws Exception {
System.out.println(System.getProperty("java.vm.name"));
}
}
Reported by PMD.
Line: 7
public class TestSysProperty extends TestCase {
public void test_0 () throws Exception {
System.out.println(System.getProperty("java.vm.name"));
}
}
Reported by PMD.
src/test/java/com/alibaba/json/demo/MapDemo.java
3 issues
Line: 17
map.put("name", "张三");
String text = JSON.toJSONString(map);
System.out.println(text);
}
}
Reported by PMD.
Line: 11
import com.alibaba.fastjson.JSON;
public class MapDemo extends TestCase {
public void test_0 () throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
map.put("id", 123);
map.put("name", "张三");
String text = JSON.toJSONString(map);
Reported by PMD.
Line: 11
import com.alibaba.fastjson.JSON;
public class MapDemo extends TestCase {
public void test_0 () throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
map.put("id", 123);
map.put("name", "张三");
String text = JSON.toJSONString(map);
Reported by PMD.
src/test/java/com/alibaba/json/demo/BooleanFieldDemo.java
3 issues
Line: 14
public void test_boolean() throws Exception {
Model model = new Model();
String json = JSON.toJSONString(model, SerializerFeature.IgnoreNonFieldGetter);
System.out.println(json);
}
public static class Model {
Reported by PMD.
Line: 11
* Created by wenshao on 15/02/2017.
*/
public class BooleanFieldDemo extends TestCase {
public void test_boolean() throws Exception {
Model model = new Model();
String json = JSON.toJSONString(model, SerializerFeature.IgnoreNonFieldGetter);
System.out.println(json);
Reported by PMD.
Line: 11
* Created by wenshao on 15/02/2017.
*/
public class BooleanFieldDemo extends TestCase {
public void test_boolean() throws Exception {
Model model = new Model();
String json = JSON.toJSONString(model, SerializerFeature.IgnoreNonFieldGetter);
System.out.println(json);
Reported by PMD.
src/test/java/com/alibaba/json/test/codegen/GenMediaTest.java
3 issues
Line: 17
generator.gen();
System.out.println(out.toString());
}
}
Reported by PMD.
Line: 11
public class GenMediaTest extends TestCase {
public void test_codegen() throws Exception {
StringBuffer out = new StringBuffer();
DeserializerGen generator = new DeserializerGen(Media.class, out);
generator.gen();
Reported by PMD.
Line: 11
public class GenMediaTest extends TestCase {
public void test_codegen() throws Exception {
StringBuffer out = new StringBuffer();
DeserializerGen generator = new DeserializerGen(Media.class, out);
generator.gen();
Reported by PMD.
src/test/java/com/alibaba/json/test/jackson/JacksonUnwrappedTest.java
3 issues
Line: 16
ObjectMapper mapper = new ObjectMapper();
String str = mapper.writeValueAsString(model);
System.out.println(str);
}
public static class Model {
@JsonUnwrapped
public Point point = new Point();
Reported by PMD.
Line: 11
* Created by wenshao on 02/04/2017.
*/
public class JacksonUnwrappedTest extends TestCase {
public void test_for_unwrap() throws Exception {
Model model = new Model();
ObjectMapper mapper = new ObjectMapper();
String str = mapper.writeValueAsString(model);
System.out.println(str);
Reported by PMD.
Line: 11
* Created by wenshao on 02/04/2017.
*/
public class JacksonUnwrappedTest extends TestCase {
public void test_for_unwrap() throws Exception {
Model model = new Model();
ObjectMapper mapper = new ObjectMapper();
String str = mapper.writeValueAsString(model);
System.out.println(str);
Reported by PMD.
src/test/java/com/alibaba/json/test/entity/case1/String_100_Entity.java
3 issues
Line: 1
package com.alibaba.json.test.entity.case1;
public class String_100_Entity {
private String f0;
private String f1;
private String f2;
private String f3;
private String f4;
Reported by PMD.
Line: 3
package com.alibaba.json.test.entity.case1;
public class String_100_Entity {
private String f0;
private String f1;
private String f2;
private String f3;
private String f4;
Reported by PMD.
Line: 3
package com.alibaba.json.test.entity.case1;
public class String_100_Entity {
private String f0;
private String f1;
private String f2;
private String f3;
private String f4;
Reported by PMD.
src/test/java/com/alibaba/json/bvtVO/IncomingDataPoint_ext_double.java
3 issues
Line: 20
orders = {"metric", "timestamp", "value", "tags", "tsuid", "granularity", "aggregator"},
asm = true
)
public class IncomingDataPoint_ext_double {
/** The incoming metric name */
private String metric;
/** The incoming timestamp in Unix epoch seconds or milliseconds */
private long timestamp;
Reported by PMD.
Line: 34
private Tags tags;
/** TSUID for the data point */
private String tsuid;
private String granularity;
private String aggregator;
Reported by PMD.
Line: 6
import com.alibaba.fastjson.annotation.JSONField;
import com.alibaba.fastjson.annotation.JSONType;
import com.alibaba.fastjson.parser.Feature;
import com.alibaba.fastjson.parser.deserializer.ExtraProcessable;
import com.alibaba.fastjson.serializer.SerializerFeature;
import java.util.HashMap;
import java.util.Map;
Reported by PMD.
src/test/java/com/alibaba/json/test/benchmark/decode/BooleanArray1000Decode.java
3 issues
Line: 8
public class BooleanArray1000Decode extends BenchmarkCase {
private String text;
public BooleanArray1000Decode(){
super("BooleanArray1000Decode");
StringBuilder buf = new StringBuilder();
Reported by PMD.
Line: 8
public class BooleanArray1000Decode extends BenchmarkCase {
private String text;
public BooleanArray1000Decode(){
super("BooleanArray1000Decode");
StringBuilder buf = new StringBuilder();
Reported by PMD.
Line: 18
buf.append('[');
for (int i = 0; i < 1000; ++i) {
if (i != 0) {
buf.append(",");
}
buf.append(i % 2 == 0 ? "true" : "false");
}
buf.append(']');
this.text = buf.toString();
Reported by PMD.
src/test/java/com/alibaba/json/test/Issue1001.java
3 issues
Line: 15
* Created by wenshao on 21/01/2017.
*/
public class Issue1001 extends TestCase {
public void test_for_issue() throws Exception {
File file = new File("/Users/wenshao/Downloads/issue_1001.json");
String json = FileUtils.readFileToString(file);
JSONReader reader = new JSONReader(new StringReader(json));
Reported by PMD.
Line: 15
* Created by wenshao on 21/01/2017.
*/
public class Issue1001 extends TestCase {
public void test_for_issue() throws Exception {
File file = new File("/Users/wenshao/Downloads/issue_1001.json");
String json = FileUtils.readFileToString(file);
JSONReader reader = new JSONReader(new StringReader(json));
Reported by PMD.
Line: 3
package com.alibaba.json.test;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONReader;
import junit.framework.TestCase;
import org.apache.commons.io.FileUtils;
import java.io.File;
import java.io.StringReader;
Reported by PMD.