Project

General

Profile

« Previous | Next » 

Revision 52996

Modified customer getters

View differences:

Customer.java
2 2

  
3 3
import com.fasterxml.jackson.annotation.JsonProperty;
4 4

  
5
import java.util.ArrayList;
5 6
import java.util.List;
6 7

  
7 8
/**
......
10 11
public class Customer {
11 12
    private String id = null;
12 13

  
13
    private List<ReportItem> reportItems;
14
    public void setReportItems(List<ReportItem> reportItems) {
15
        this.reportItems = reportItems;
16
    }
14 17

  
18
    private List<ReportItem> reportItems = new ArrayList<>();
19

  
15 20
    public Customer() {
16 21
    }
17 22

  
......
27 32

  
28 33
    @JsonProperty("ReportItems")
29 34
    public List<ReportItem> getReportItems() {
30
        if (!reportItems.isEmpty()) {
31
            return reportItems;
32
        }
33
        return null;
35
        return reportItems;
34 36
    }
35 37
}

Also available in: Unified diff