The following issues were found
src/test/java/com/alibaba/json/bvtVO/IncomingDataPoint.java
10 issues
Line: 19
orders = {"metric", "timestamp", "value", "tags", "tsuid", "granularity", "aggregator"},
asm = true
)
public class IncomingDataPoint {
/** The incoming metric name */
private String metric;
/** The incoming timestamp in Unix epoch seconds or milliseconds */
private long timestamp;
Reported by PMD.
Line: 33
private Map<String, String> tags;
/** TSUID for the data point */
private String tsuid;
private String granularity;
private String aggregator;
Reported by PMD.
Line: 56
public IncomingDataPoint(final String metric,
final long timestamp,
final String value,
final HashMap<String, String> tags,
final String granularity,
final String aggregator) {
this.metric = metric;
this.granularity = granularity;
this.timestamp = timestamp;
Reported by PMD.
Line: 88
*/
@Override
public String toString() {
final StringBuilder buf = new StringBuilder();
buf.append(" metric=").append(this.metric);
buf.append(" granularity=").append(this.granularity);
buf.append(" aggregator=").append(this.aggregator);
buf.append(" ts=").append(this.timestamp);
buf.append(" value=").append(this.value);
Reported by PMD.
Line: 89
@Override
public String toString() {
final StringBuilder buf = new StringBuilder();
buf.append(" metric=").append(this.metric);
buf.append(" granularity=").append(this.granularity);
buf.append(" aggregator=").append(this.aggregator);
buf.append(" ts=").append(this.timestamp);
buf.append(" value=").append(this.value);
if (this.tags != null) {
Reported by PMD.
Line: 90
public String toString() {
final StringBuilder buf = new StringBuilder();
buf.append(" metric=").append(this.metric);
buf.append(" granularity=").append(this.granularity);
buf.append(" aggregator=").append(this.aggregator);
buf.append(" ts=").append(this.timestamp);
buf.append(" value=").append(this.value);
if (this.tags != null) {
for (Map.Entry<String, String> entry : this.tags.entrySet()) {
Reported by PMD.
Line: 91
final StringBuilder buf = new StringBuilder();
buf.append(" metric=").append(this.metric);
buf.append(" granularity=").append(this.granularity);
buf.append(" aggregator=").append(this.aggregator);
buf.append(" ts=").append(this.timestamp);
buf.append(" value=").append(this.value);
if (this.tags != null) {
for (Map.Entry<String, String> entry : this.tags.entrySet()) {
buf.append(" ").append(entry.getKey()).append("=").append(entry.getValue());
Reported by PMD.
Line: 92
buf.append(" metric=").append(this.metric);
buf.append(" granularity=").append(this.granularity);
buf.append(" aggregator=").append(this.aggregator);
buf.append(" ts=").append(this.timestamp);
buf.append(" value=").append(this.value);
if (this.tags != null) {
for (Map.Entry<String, String> entry : this.tags.entrySet()) {
buf.append(" ").append(entry.getKey()).append("=").append(entry.getValue());
}
Reported by PMD.
Line: 96
buf.append(" value=").append(this.value);
if (this.tags != null) {
for (Map.Entry<String, String> entry : this.tags.entrySet()) {
buf.append(" ").append(entry.getKey()).append("=").append(entry.getValue());
}
}
return buf.toString();
}
Reported by PMD.
Line: 96
buf.append(" value=").append(this.value);
if (this.tags != null) {
for (Map.Entry<String, String> entry : this.tags.entrySet()) {
buf.append(" ").append(entry.getKey()).append("=").append(entry.getValue());
}
}
return buf.toString();
}
Reported by PMD.
src/test/java/com/alibaba/json/bvt/serializer/SpecialTest.java
10 issues
Line: 16
count++;
}
}
System.out.println(count);
}
final static long flags;
static {
long val = 0L;
Reported by PMD.
Line: 5
import com.alibaba.fastjson.serializer.SerializerFeature;
public class SpecialTest {
public static void main(String[] args) throws Exception {
int count = 0;
for (int i = 0; i < 1000; ++i) {
Reported by PMD.
Line: 7
public class SpecialTest {
public static void main(String[] args) throws Exception {
int count = 0;
for (int i = 0; i < 1000; ++i) {
char ch = (char) i;
if(isSpecial(ch)) {
Reported by PMD.
Line: 28
}
static boolean isSpecial(char ch) {
if (ch <= 31) {
return true;
}
if (ch > '\\') { // 92
return false;
Reported by PMD.
Line: 32
return true;
}
if (ch > '\\') { // 92
return false;
}
return ((1L << (ch - 31)) & flags) != 0;
}
Reported by PMD.
Line: 44
// return false;
// }
if (ch == ' ') { // 32
return false;
}
if (ch == '/') { // 47
return SerializerFeature.isEnabled(features, SerializerFeature.WriteSlashAsSpecial);
Reported by PMD.
Line: 48
return false;
}
if (ch == '/') { // 47
return SerializerFeature.isEnabled(features, SerializerFeature.WriteSlashAsSpecial);
}
if (ch > '#' // 35
&& ch != '\\' // 92
Reported by PMD.
Line: 58
return false;
}
if (ch <= 0x1F // 31
|| ch == '\\' // 92
|| ch == '"' // 34
) {
return true;
}
Reported by PMD.
Line: 9
public static void main(String[] args) throws Exception {
int count = 0;
for (int i = 0; i < 1000; ++i) {
char ch = (char) i;
if(isSpecial(ch)) {
count++;
}
Reported by PMD.
Line: 13
for (int i = 0; i < 1000; ++i) {
char ch = (char) i;
if(isSpecial(ch)) {
count++;
}
}
System.out.println(count);
}
Reported by PMD.
src/test/java/com/alibaba/json/bvt/issue_2300/Issue2343.java
10 issues
Line: 9
import junit.framework.TestCase;
public class Issue2343 extends TestCase {
public void test_for_issue() throws Exception {
A a = new A();
a.f1 = 101;
a.f2 = 102;
a.f3 = 103;
Reported by PMD.
Line: 9
import junit.framework.TestCase;
public class Issue2343 extends TestCase {
public void test_for_issue() throws Exception {
A a = new A();
a.f1 = 101;
a.f2 = 102;
a.f3 = 103;
Reported by PMD.
Line: 16
a.f3 = 103;
String str = JSON.toJSONString(a);
assertEquals("{\"f2\":102,\"f1\":101,\"f3\":103}", str);
JSONObject object = JSON.parseObject(str);
A a1 = object.toJavaObject(A.class);
assertEquals(a.f1, a1.f1);
assertEquals(a.f2, a1.f2);
Reported by PMD.
Line: 19
assertEquals("{\"f2\":102,\"f1\":101,\"f3\":103}", str);
JSONObject object = JSON.parseObject(str);
A a1 = object.toJavaObject(A.class);
assertEquals(a.f1, a1.f1);
assertEquals(a.f2, a1.f2);
assertEquals(a.f3, a1.f3);
}
Reported by PMD.
Line: 20
JSONObject object = JSON.parseObject(str);
A a1 = object.toJavaObject(A.class);
assertEquals(a.f1, a1.f1);
assertEquals(a.f2, a1.f2);
assertEquals(a.f3, a1.f3);
}
public static class A {
Reported by PMD.
Line: 21
JSONObject object = JSON.parseObject(str);
A a1 = object.toJavaObject(A.class);
assertEquals(a.f1, a1.f1);
assertEquals(a.f2, a1.f2);
assertEquals(a.f3, a1.f3);
}
public static class A {
@JSONField(ordinal = 1)
Reported by PMD.
Line: 22
A a1 = object.toJavaObject(A.class);
assertEquals(a.f1, a1.f1);
assertEquals(a.f2, a1.f2);
assertEquals(a.f3, a1.f3);
}
public static class A {
@JSONField(ordinal = 1)
public int f1;
Reported by PMD.
Line: 27
public static class A {
@JSONField(ordinal = 1)
public int f1;
@JSONField(ordinal = 0)
public int f2;
@JSONField(ordinal = 2)
Reported by PMD.
Line: 30
public int f1;
@JSONField(ordinal = 0)
public int f2;
@JSONField(ordinal = 2)
public int f3;
}
}
Reported by PMD.
Line: 33
public int f2;
@JSONField(ordinal = 2)
public int f3;
}
}
Reported by PMD.
src/test/java/com/alibaba/json/bvtVO/IncomingDataPoint_double.java
10 issues
Line: 19
orders = {"metric", "timestamp", "value", "tags", "tsuid", "granularity", "aggregator"},
asm = true
)
public class IncomingDataPoint_double {
/** The incoming metric name */
private String metric;
/** The incoming timestamp in Unix epoch seconds or milliseconds */
private long timestamp;
Reported by PMD.
Line: 33
private Map<String, String> tags;
/** TSUID for the data point */
private String tsuid;
private String granularity;
private String aggregator;
Reported by PMD.
Line: 56
public IncomingDataPoint_double(final String metric,
final long timestamp,
final double value,
final HashMap<String, String> tags,
final String granularity,
final String aggregator) {
this.metric = metric;
this.granularity = granularity;
this.timestamp = timestamp;
Reported by PMD.
Line: 88
*/
@Override
public String toString() {
final StringBuilder buf = new StringBuilder();
buf.append(" metric=").append(this.metric);
buf.append(" granularity=").append(this.granularity);
buf.append(" aggregator=").append(this.aggregator);
buf.append(" ts=").append(this.timestamp);
buf.append(" value=").append(this.value);
Reported by PMD.
Line: 89
@Override
public String toString() {
final StringBuilder buf = new StringBuilder();
buf.append(" metric=").append(this.metric);
buf.append(" granularity=").append(this.granularity);
buf.append(" aggregator=").append(this.aggregator);
buf.append(" ts=").append(this.timestamp);
buf.append(" value=").append(this.value);
if (this.tags != null) {
Reported by PMD.
Line: 90
public String toString() {
final StringBuilder buf = new StringBuilder();
buf.append(" metric=").append(this.metric);
buf.append(" granularity=").append(this.granularity);
buf.append(" aggregator=").append(this.aggregator);
buf.append(" ts=").append(this.timestamp);
buf.append(" value=").append(this.value);
if (this.tags != null) {
for (Map.Entry<String, String> entry : this.tags.entrySet()) {
Reported by PMD.
Line: 91
final StringBuilder buf = new StringBuilder();
buf.append(" metric=").append(this.metric);
buf.append(" granularity=").append(this.granularity);
buf.append(" aggregator=").append(this.aggregator);
buf.append(" ts=").append(this.timestamp);
buf.append(" value=").append(this.value);
if (this.tags != null) {
for (Map.Entry<String, String> entry : this.tags.entrySet()) {
buf.append(" ").append(entry.getKey()).append("=").append(entry.getValue());
Reported by PMD.
Line: 92
buf.append(" metric=").append(this.metric);
buf.append(" granularity=").append(this.granularity);
buf.append(" aggregator=").append(this.aggregator);
buf.append(" ts=").append(this.timestamp);
buf.append(" value=").append(this.value);
if (this.tags != null) {
for (Map.Entry<String, String> entry : this.tags.entrySet()) {
buf.append(" ").append(entry.getKey()).append("=").append(entry.getValue());
}
Reported by PMD.
Line: 96
buf.append(" value=").append(this.value);
if (this.tags != null) {
for (Map.Entry<String, String> entry : this.tags.entrySet()) {
buf.append(" ").append(entry.getKey()).append("=").append(entry.getValue());
}
}
return buf.toString();
}
Reported by PMD.
Line: 96
buf.append(" value=").append(this.value);
if (this.tags != null) {
for (Map.Entry<String, String> entry : this.tags.entrySet()) {
buf.append(" ").append(entry.getKey()).append("=").append(entry.getValue());
}
}
return buf.toString();
}
Reported by PMD.
src/test/java/com/alibaba/json/bvt/basicType/BigDecimal_type.java
10 issues
Line: 13
import static com.alibaba.fastjson.serializer.SerializerFeature.BrowserCompatible;
public class BigDecimal_type extends TestCase {
public void test_for_issue() throws Exception {
assertEquals("{\"value\":\"9007199254741992\"}"
, JSON.toJSONString(
new Model(9007199254741992L)));
assertEquals("{\"value\":\"-9007199254741992\"}"
Reported by PMD.
Line: 13
import static com.alibaba.fastjson.serializer.SerializerFeature.BrowserCompatible;
public class BigDecimal_type extends TestCase {
public void test_for_issue() throws Exception {
assertEquals("{\"value\":\"9007199254741992\"}"
, JSON.toJSONString(
new Model(9007199254741992L)));
assertEquals("{\"value\":\"-9007199254741992\"}"
Reported by PMD.
Line: 14
public class BigDecimal_type extends TestCase {
public void test_for_issue() throws Exception {
assertEquals("{\"value\":\"9007199254741992\"}"
, JSON.toJSONString(
new Model(9007199254741992L)));
assertEquals("{\"value\":\"-9007199254741992\"}"
, JSON.toJSONString(
Reported by PMD.
Line: 18
, JSON.toJSONString(
new Model(9007199254741992L)));
assertEquals("{\"value\":\"-9007199254741992\"}"
, JSON.toJSONString(
new Model(-9007199254741992L)));
assertEquals("{\"value\":9007199254740990}"
, JSON.toJSONString(
Reported by PMD.
Line: 22
, JSON.toJSONString(
new Model(-9007199254741992L)));
assertEquals("{\"value\":9007199254740990}"
, JSON.toJSONString(
new Model(9007199254740990L)));
assertEquals("{\"value\":-9007199254740990}"
, JSON.toJSONString(
Reported by PMD.
Line: 26
, JSON.toJSONString(
new Model(9007199254740990L)));
assertEquals("{\"value\":-9007199254740990}"
, JSON.toJSONString(
new Model(-9007199254740990L)));
assertEquals("{\"value\":100}"
, JSON.toJSONString(
Reported by PMD.
Line: 30
, JSON.toJSONString(
new Model(-9007199254740990L)));
assertEquals("{\"value\":100}"
, JSON.toJSONString(
new Model(100)));
assertEquals("{\"value\":-100}"
, JSON.toJSONString(
Reported by PMD.
Line: 34
, JSON.toJSONString(
new Model(100)));
assertEquals("{\"value\":-100}"
, JSON.toJSONString(
new Model(-100)));
}
Reported by PMD.
Line: 43
@JSONType(serialzeFeatures = BrowserCompatible)
public static class Model {
public BigDecimal value;
public Model() {
}
Reported by PMD.
Line: 8
import junit.framework.TestCase;
import java.math.BigDecimal;
import java.math.BigInteger;
import static com.alibaba.fastjson.serializer.SerializerFeature.BrowserCompatible;
public class BigDecimal_type extends TestCase {
public void test_for_issue() throws Exception {
Reported by PMD.
src/test/java/com/alibaba/json/bvt/basicType/BigDecimal_field.java
10 issues
Line: 13
import static com.alibaba.fastjson.serializer.SerializerFeature.BrowserCompatible;
public class BigDecimal_field extends TestCase {
public void test_for_issue() throws Exception {
assertEquals("{\"value\":\"9007199254741992\"}"
, JSON.toJSONString(
new Model(9007199254741992L)));
assertEquals("{\"value\":\"-9007199254741992\"}"
Reported by PMD.
Line: 13
import static com.alibaba.fastjson.serializer.SerializerFeature.BrowserCompatible;
public class BigDecimal_field extends TestCase {
public void test_for_issue() throws Exception {
assertEquals("{\"value\":\"9007199254741992\"}"
, JSON.toJSONString(
new Model(9007199254741992L)));
assertEquals("{\"value\":\"-9007199254741992\"}"
Reported by PMD.
Line: 14
public class BigDecimal_field extends TestCase {
public void test_for_issue() throws Exception {
assertEquals("{\"value\":\"9007199254741992\"}"
, JSON.toJSONString(
new Model(9007199254741992L)));
assertEquals("{\"value\":\"-9007199254741992\"}"
, JSON.toJSONString(
Reported by PMD.
Line: 18
, JSON.toJSONString(
new Model(9007199254741992L)));
assertEquals("{\"value\":\"-9007199254741992\"}"
, JSON.toJSONString(
new Model(-9007199254741992L)));
assertEquals("{\"value\":9007199254740990}"
, JSON.toJSONString(
Reported by PMD.
Line: 22
, JSON.toJSONString(
new Model(-9007199254741992L)));
assertEquals("{\"value\":9007199254740990}"
, JSON.toJSONString(
new Model(9007199254740990L)));
assertEquals("{\"value\":-9007199254740990}"
, JSON.toJSONString(
Reported by PMD.
Line: 26
, JSON.toJSONString(
new Model(9007199254740990L)));
assertEquals("{\"value\":-9007199254740990}"
, JSON.toJSONString(
new Model(-9007199254740990L)));
assertEquals("{\"value\":100}"
, JSON.toJSONString(
Reported by PMD.
Line: 30
, JSON.toJSONString(
new Model(-9007199254740990L)));
assertEquals("{\"value\":100}"
, JSON.toJSONString(
new Model(100)));
assertEquals("{\"value\":-100}"
, JSON.toJSONString(
Reported by PMD.
Line: 34
, JSON.toJSONString(
new Model(100)));
assertEquals("{\"value\":-100}"
, JSON.toJSONString(
new Model(-100)));
}
Reported by PMD.
Line: 44
public static class Model {
@JSONField(serialzeFeatures = BrowserCompatible)
public BigDecimal value;
public Model() {
}
Reported by PMD.
Line: 8
import junit.framework.TestCase;
import java.math.BigDecimal;
import java.math.BigInteger;
import static com.alibaba.fastjson.serializer.SerializerFeature.BrowserCompatible;
public class BigDecimal_field extends TestCase {
public void test_for_issue() throws Exception {
Reported by PMD.
src/test/java/com/alibaba/json/bvt/issue_2100/Issue2132.java
10 issues
Line: 10
import java.util.List;
public class Issue2132 extends TestCase {
public void test_for_issue() throws Exception {
Cpu cpu = new Cpu("intel", 3.3);
Screen screen = new Screen(16, 9, "samsung");
Student student = new Student();
Computer computer = student.assembling(cpu,screen);
cpu.setName("intell");
Reported by PMD.
Line: 27
list1.add(computer);
String s = JSON.toJSONString(list1);
assertEquals("[[{\"name\":\"intell\",\"speed\":3.3},{\"height\":9,\"name\":\"samsung\",\"width\":16},\"2\",\"3\"],{\"cpu\":{\"$ref\":\"$[0][0]\"},\"screen\":{\"$ref\":\"$[0][1]\"}}]", s);
}
public static class Cpu {
private String name;
private double speed;
Reported by PMD.
Line: 30
assertEquals("[[{\"name\":\"intell\",\"speed\":3.3},{\"height\":9,\"name\":\"samsung\",\"width\":16},\"2\",\"3\"],{\"cpu\":{\"$ref\":\"$[0][0]\"},\"screen\":{\"$ref\":\"$[0][1]\"}}]", s);
}
public static class Cpu {
private String name;
private double speed;
public Cpu(String name, double speed) {
this.name = name;
Reported by PMD.
Line: 56
}
}
public static class Screen {
private int width;
private int height;
private String name;
public Screen(int width, int height, String name) {
Reported by PMD.
Line: 92
}
}
public static class Computer {
Cpu cpu;
Screen screen;
public Computer(Cpu cpu, Screen screen) {
this.cpu = cpu;
Reported by PMD.
Line: 118
}
}
public static class Student {
private Cpu cpu;
private Screen screen;
public Computer assembling(Cpu cpu, Screen screen) {
this.cpu = cpu;
Reported by PMD.
Line: 17
Computer computer = student.assembling(cpu,screen);
cpu.setName("intell");
Object[] objectArray = new Object[4];
objectArray[0] = cpu;
objectArray[1] = screen;
objectArray[2] = "2";
objectArray[3] = "3";
List<Object> list1 = new ArrayList<Object>();
Reported by PMD.
Line: 18
cpu.setName("intell");
Object[] objectArray = new Object[4];
objectArray[0] = cpu;
objectArray[1] = screen;
objectArray[2] = "2";
objectArray[3] = "3";
List<Object> list1 = new ArrayList<Object>();
list1.add(objectArray);
Reported by PMD.
Line: 19
Object[] objectArray = new Object[4];
objectArray[0] = cpu;
objectArray[1] = screen;
objectArray[2] = "2";
objectArray[3] = "3";
List<Object> list1 = new ArrayList<Object>();
list1.add(objectArray);
list1.add(computer);
Reported by PMD.
Line: 20
Object[] objectArray = new Object[4];
objectArray[0] = cpu;
objectArray[1] = screen;
objectArray[2] = "2";
objectArray[3] = "3";
List<Object> list1 = new ArrayList<Object>();
list1.add(objectArray);
list1.add(computer);
String s = JSON.toJSONString(list1);
Reported by PMD.
src/test/java/com/alibaba/json/bvt/serializer/ProxyTest2.java
10 issues
Line: 15
public void test_0() throws Exception {
Model model = JSON.parseObject("{\"id\":1001}", Model.class);
Model model2 = JSON.parseObject("{\"id\":1001}", Model.class);
System.out.println(model.getId());
// System.out.println(model.getClass());
// System.out.println(model2.getClass());
assertEquals("{\"id\":1001}", JSON.toJSONString(model));
Reported by PMD.
Line: 12
* Created by wenshao on 07/08/2017.
*/
public class ProxyTest2 extends TestCase {
public void test_0() throws Exception {
Model model = JSON.parseObject("{\"id\":1001}", Model.class);
Model model2 = JSON.parseObject("{\"id\":1001}", Model.class);
System.out.println(model.getId());
// System.out.println(model.getClass());
Reported by PMD.
Line: 12
* Created by wenshao on 07/08/2017.
*/
public class ProxyTest2 extends TestCase {
public void test_0() throws Exception {
Model model = JSON.parseObject("{\"id\":1001}", Model.class);
Model model2 = JSON.parseObject("{\"id\":1001}", Model.class);
System.out.println(model.getId());
// System.out.println(model.getClass());
Reported by PMD.
Line: 13
*/
public class ProxyTest2 extends TestCase {
public void test_0() throws Exception {
Model model = JSON.parseObject("{\"id\":1001}", Model.class);
Model model2 = JSON.parseObject("{\"id\":1001}", Model.class);
System.out.println(model.getId());
// System.out.println(model.getClass());
// System.out.println(model2.getClass());
Reported by PMD.
Line: 14
public class ProxyTest2 extends TestCase {
public void test_0() throws Exception {
Model model = JSON.parseObject("{\"id\":1001}", Model.class);
Model model2 = JSON.parseObject("{\"id\":1001}", Model.class);
System.out.println(model.getId());
// System.out.println(model.getClass());
// System.out.println(model2.getClass());
Reported by PMD.
Line: 15
public void test_0() throws Exception {
Model model = JSON.parseObject("{\"id\":1001}", Model.class);
Model model2 = JSON.parseObject("{\"id\":1001}", Model.class);
System.out.println(model.getId());
// System.out.println(model.getClass());
// System.out.println(model2.getClass());
assertEquals("{\"id\":1001}", JSON.toJSONString(model));
Reported by PMD.
Line: 20
// System.out.println(model.getClass());
// System.out.println(model2.getClass());
assertEquals("{\"id\":1001}", JSON.toJSONString(model));
assertEquals("{\"id\":1001}", JSON.toJSONString(model));
}
public static interface Model {
Reported by PMD.
Line: 21
// System.out.println(model2.getClass());
assertEquals("{\"id\":1001}", JSON.toJSONString(model));
assertEquals("{\"id\":1001}", JSON.toJSONString(model));
}
public static interface Model {
int getId();
Reported by PMD.
Line: 6
import com.alibaba.fastjson.JSON;
import junit.framework.TestCase;
import java.lang.reflect.Proxy;
/**
* Created by wenshao on 07/08/2017.
*/
public class ProxyTest2 extends TestCase {
Reported by PMD.
Line: 14
public class ProxyTest2 extends TestCase {
public void test_0() throws Exception {
Model model = JSON.parseObject("{\"id\":1001}", Model.class);
Model model2 = JSON.parseObject("{\"id\":1001}", Model.class);
System.out.println(model.getId());
// System.out.println(model.getClass());
// System.out.println(model2.getClass());
Reported by PMD.
src/test/java/com/alibaba/json/bvt/asm/Huge_300_ClassTest.java
10 issues
Line: 1
package com.alibaba.json.bvt.asm;
import com.alibaba.fastjson.JSON;
import junit.framework.TestCase;
public class Huge_300_ClassTest extends TestCase {
public void test_huge() {
Reported by PMD.
Line: 7
import junit.framework.TestCase;
public class Huge_300_ClassTest extends TestCase {
public void test_huge() {
JSON.parseObject("{}", VO.class);
}
Reported by PMD.
Line: 7
import junit.framework.TestCase;
public class Huge_300_ClassTest extends TestCase {
public void test_huge() {
JSON.parseObject("{}", VO.class);
}
Reported by PMD.
Line: 7
import junit.framework.TestCase;
public class Huge_300_ClassTest extends TestCase {
public void test_huge() {
JSON.parseObject("{}", VO.class);
}
Reported by PMD.
Line: 9
public class Huge_300_ClassTest extends TestCase {
public void test_huge() {
JSON.parseObject("{}", VO.class);
}
public static class VO {
Reported by PMD.
Line: 9
public class Huge_300_ClassTest extends TestCase {
public void test_huge() {
JSON.parseObject("{}", VO.class);
}
public static class VO {
Reported by PMD.
Line: 13
JSON.parseObject("{}", VO.class);
}
public static class VO {
private Integer f000;
private Integer f001;
private Integer f002;
private Integer f003;
Reported by PMD.
Line: 13
JSON.parseObject("{}", VO.class);
}
public static class VO {
private Integer f000;
private Integer f001;
private Integer f002;
private Integer f003;
Reported by PMD.
Line: 13
JSON.parseObject("{}", VO.class);
}
public static class VO {
private Integer f000;
private Integer f001;
private Integer f002;
private Integer f003;
Reported by PMD.
Line: 13
JSON.parseObject("{}", VO.class);
}
public static class VO {
private Integer f000;
private Integer f001;
private Integer f002;
private Integer f003;
Reported by PMD.
src/test/java/com/alibaba/json/bvt/bug/Issue1017.java
10 issues
Line: 13
* Created by wenshao on 11/02/2017.
*/
public class Issue1017 extends TestCase {
public void test_for_issue() throws Exception {
String json = "{\"pictureList\":[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\",\"http://common.cnblogs.com/images/icon_weibo_24.png\"]}";
User user = JSON.parseObject(json, User.class);
assertNotNull(user.pictureList);
assertEquals(2, user.pictureList.size());
Reported by PMD.
Line: 13
* Created by wenshao on 11/02/2017.
*/
public class Issue1017 extends TestCase {
public void test_for_issue() throws Exception {
String json = "{\"pictureList\":[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\",\"http://common.cnblogs.com/images/icon_weibo_24.png\"]}";
User user = JSON.parseObject(json, User.class);
assertNotNull(user.pictureList);
assertEquals(2, user.pictureList.size());
Reported by PMD.
Line: 17
String json = "{\"pictureList\":[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\",\"http://common.cnblogs.com/images/icon_weibo_24.png\"]}";
User user = JSON.parseObject(json, User.class);
assertNotNull(user.pictureList);
assertEquals(2, user.pictureList.size());
assertEquals("http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000", user.pictureList.get(0));
assertEquals("http://common.cnblogs.com/images/icon_weibo_24.png", user.pictureList.get(1));
}
Reported by PMD.
Line: 18
User user = JSON.parseObject(json, User.class);
assertNotNull(user.pictureList);
assertEquals(2, user.pictureList.size());
assertEquals("http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000", user.pictureList.get(0));
assertEquals("http://common.cnblogs.com/images/icon_weibo_24.png", user.pictureList.get(1));
}
public static class User implements Serializable {
Reported by PMD.
Line: 18
User user = JSON.parseObject(json, User.class);
assertNotNull(user.pictureList);
assertEquals(2, user.pictureList.size());
assertEquals("http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000", user.pictureList.get(0));
assertEquals("http://common.cnblogs.com/images/icon_weibo_24.png", user.pictureList.get(1));
}
public static class User implements Serializable {
Reported by PMD.
Line: 19
User user = JSON.parseObject(json, User.class);
assertNotNull(user.pictureList);
assertEquals(2, user.pictureList.size());
assertEquals("http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000", user.pictureList.get(0));
assertEquals("http://common.cnblogs.com/images/icon_weibo_24.png", user.pictureList.get(1));
}
public static class User implements Serializable {
private List<String> pictureList;
Reported by PMD.
Line: 19
User user = JSON.parseObject(json, User.class);
assertNotNull(user.pictureList);
assertEquals(2, user.pictureList.size());
assertEquals("http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000", user.pictureList.get(0));
assertEquals("http://common.cnblogs.com/images/icon_weibo_24.png", user.pictureList.get(1));
}
public static class User implements Serializable {
private List<String> pictureList;
Reported by PMD.
Line: 20
assertNotNull(user.pictureList);
assertEquals(2, user.pictureList.size());
assertEquals("http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000", user.pictureList.get(0));
assertEquals("http://common.cnblogs.com/images/icon_weibo_24.png", user.pictureList.get(1));
}
public static class User implements Serializable {
private List<String> pictureList;
public List<String> getPictureList() {
Reported by PMD.
Line: 20
assertNotNull(user.pictureList);
assertEquals(2, user.pictureList.size());
assertEquals("http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000", user.pictureList.get(0));
assertEquals("http://common.cnblogs.com/images/icon_weibo_24.png", user.pictureList.get(1));
}
public static class User implements Serializable {
private List<String> pictureList;
public List<String> getPictureList() {
Reported by PMD.
Line: 23
assertEquals("http://common.cnblogs.com/images/icon_weibo_24.png", user.pictureList.get(1));
}
public static class User implements Serializable {
private List<String> pictureList;
public List<String> getPictureList() {
return pictureList;
}
public User setPictureList(List<String> pictureList) {
Reported by PMD.