The following issues were found
src/test/java/com/alibaba/json/bvtVO/OfferRankResultVO.java
2 issues
Line: 7
import java.util.List;
public class OfferRankResultVO {
private List<SearchCenterOfferModel> models = new ArrayList<SearchCenterOfferModel>();
public OfferRankResultVO() {
models.add(new SearchCenterOfferModel());
}
Reported by PMD.
Line: 23
}
class SearchCenterOfferModel {
private int id;
private String name;
public int getId() {
return id;
Reported by PMD.
src/test/java/com/alibaba/json/bvtVO/mogujie/BaseDTO.java
2 issues
Line: 8
/**
* Created by wenshao on 16/03/2017.
*/
public class BaseDTO implements Serializable {
/**
* serialVersionUID
*/
private static final long serialVersionUID = -1;
Reported by PMD.
Line: 22
/**
* is online test
*/
private Boolean onlineTest = Boolean.FALSE;
/**
* http referer
*/
private String referer;
Reported by PMD.
src/test/java/com/alibaba/json/bvtVO/mogujie/BindQueryRespDTO.java
2 issues
Line: 8
/**
* Created by wenshao on 16/03/2017.
*/
public class BindQueryRespDTO {
/**
* version
*/
public int f0;
Reported by PMD.
Line: 3
package com.alibaba.json.bvtVO.mogujie;
import java.io.Serializable;
/**
* Created by wenshao on 16/03/2017.
*/
public class BindQueryRespDTO {
Reported by PMD.
src/test/java/com/alibaba/json/demo/DateDemo.java
2 issues
Line: 16
import com.alibaba.fastjson.serializer.SimpleDateFormatSerializer;
public class DateDemo extends TestCase {
protected void setUp() throws Exception {
JSON.defaultTimeZone = TimeZone.getTimeZone("Asia/Shanghai");
JSON.defaultLocale = Locale.CHINA;
}
public void test_0() throws Exception {
Reported by PMD.
Line: 21
JSON.defaultLocale = Locale.CHINA;
}
public void test_0() throws Exception {
Date date = new Date();
String text = JSON.toJSONString(date, mapping);
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd", JSON.defaultLocale);
format.setTimeZone(JSON.defaultTimeZone);
Assert.assertEquals(JSON.toJSONString(format.format(date)), text);
Reported by PMD.
src/test/java/com/alibaba/json/demo/hibernate/data/Employee.java
2 issues
Line: 15
@Table(name="Employee"
,catalog="classicmodels"
)
public class Employee implements java.io.Serializable
{
private Integer employeeNumber;
private Office office;
private String lastName;
private String firstName;
Reported by PMD.
Line: 5
import java.util.HashSet;
import java.util.Set;
import javax.persistence.*;
import static javax.persistence.GenerationType.IDENTITY;
import com.fasterxml.jackson.annotation.JsonManagedReference;
@SuppressWarnings("serial")
Reported by PMD.
src/test/java/com/alibaba/json/demo/hibernate/data/Office.java
2 issues
Line: 19
@Table(name="Office"
,catalog="classicmodels"
)
public class Office implements java.io.Serializable {
private String officeCode;
private String city;
private String phone;
Reported by PMD.
Line: 46
this.postalCode = postalCode;
this.territory = territory;
}
public Office(String officeCode, String city, String phone, String addressLine1, String addressLine2, String state, String country, String postalCode, String territory, Set<Employee> employees) {
this.officeCode = officeCode;
this.city = city;
this.phone = phone;
this.addressLine1 = addressLine1;
this.addressLine2 = addressLine2;
Reported by PMD.
src/test/java/com/alibaba/json/test/benchmark/BenchmarkCase.java
2 issues
Line: 18
return name;
}
public void init(Codec codec) throws Exception {
}
public abstract void execute(Codec codec) throws Exception;
}
Reported by PMD.
Line: 22
}
public abstract void execute(Codec codec) throws Exception;
}
Reported by PMD.
src/test/java/com/alibaba/json/test/benchmark/BenchmarkTest.java
2 issues
Line: 7
public class BenchmarkTest extends TestCase {
public void test_benchmark() throws Exception {
BenchmarkMain.main(new String[]{});
}
}
Reported by PMD.
Line: 7
public class BenchmarkTest extends TestCase {
public void test_benchmark() throws Exception {
BenchmarkMain.main(new String[]{});
}
}
Reported by PMD.
src/test/java/com/alibaba/json/test/benchmark/decode/Entity100IntDecode.java
2 issues
Line: 10
public class Entity100IntDecode extends BenchmarkCase {
private String text;
public Entity100IntDecode(){
super("StringArray1000Decode");
this.text = JSON.toJSONString(new Entity100Int());
Reported by PMD.
Line: 10
public class Entity100IntDecode extends BenchmarkCase {
private String text;
public Entity100IntDecode(){
super("StringArray1000Decode");
this.text = JSON.toJSONString(new Entity100Int());
Reported by PMD.
src/test/java/com/alibaba/json/test/benchmark/decode/Entity100StringDecode.java
2 issues
Line: 10
public class Entity100StringDecode extends BenchmarkCase {
private String text;
public Entity100StringDecode(){
super("Entity100StringDecode");
this.text = JSON.toJSONString(new Entity100String());
Reported by PMD.
Line: 10
public class Entity100StringDecode extends BenchmarkCase {
private String text;
public Entity100StringDecode(){
super("Entity100StringDecode");
this.text = JSON.toJSONString(new Entity100String());
Reported by PMD.