Skip to content

Commit 997bfdb

Browse files
committed
Updated DOT from com.jaspersoft.jasperserver.jaxrs.client.dto.settings.* and com.jaspersoft.jasperserver.jaxrs.client.dto.job.* packages
1 parent 7005adf commit 997bfdb

File tree

14 files changed

+150
-65
lines changed

14 files changed

+150
-65
lines changed

src/main/java/com/jaspersoft/jasperserver/jaxrs/client/dto/jobs/CalendarTrigger.java

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,16 +49,21 @@ public CalendarTrigger(CalendarTrigger other) {
4949
this.minutes = other.minutes;
5050
this.hours = other.hours;
5151
this.daysType = other.daysType;
52-
this.weekDays = new TreeSet<Byte>();
53-
Iterator<Byte> iterator = other.weekDays.iterator();
54-
while (iterator.hasNext()) {
55-
this.weekDays.add(iterator.next());
52+
Iterator<Byte> iterator;
53+
if (other.weekDays != null) {
54+
this.weekDays = new TreeSet<Byte>();
55+
iterator = other.weekDays.iterator();
56+
while (iterator.hasNext()) {
57+
this.weekDays.add(iterator.next());
58+
}
5659
}
5760
this.monthDays = other.monthDays;
58-
this.months = new TreeSet<Byte>();
59-
Iterator<Byte> monthItertor = other.months.iterator();
60-
while (monthItertor.hasNext()) {
61-
this.months.add(iterator.next());
61+
if (other.months != null) {
62+
this.months = new TreeSet<Byte>();
63+
Iterator<Byte> monthItertor = other.months.iterator();
64+
while (monthItertor.hasNext()) {
65+
this.months.add(monthItertor.next());
66+
}
6267
}
6368
}
6469

src/main/java/com/jaspersoft/jasperserver/jaxrs/client/dto/jobs/FtpInfo.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,11 @@ public FtpInfo(FtpInfo other) {
5050
this.password = other.password;
5151
this.pbsz = other.pbsz;
5252
this.port = other.port;
53-
this.propertiesMap = new LinkedHashMap<String, String>();
54-
for (Map.Entry<String, String> entry: other.propertiesMap.entrySet()) {
55-
this.propertiesMap.put(entry.getKey(), entry.getValue());
53+
if (other.propertiesMap != null) {
54+
this.propertiesMap = new LinkedHashMap<String, String>();
55+
for (Map.Entry<String, String> entry: other.propertiesMap.entrySet()) {
56+
this.propertiesMap.put(entry.getKey(), entry.getValue());
57+
}
5658
}
5759
this.prot = other.prot;
5860
this.protocol = other.protocol;

src/main/java/com/jaspersoft/jasperserver/jaxrs/client/dto/jobs/Job.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,11 @@ public Job(Job other) {
6161
this.id = other.id;
6262
this.label = other.label;
6363
this.mailNotification = (other.mailNotification != null) ? new MailNotification(other.mailNotification) : null;
64-
this.outputFormats = new HashSet<OutputFormat>();
65-
for (OutputFormat outputFormat : other.outputFormats) {
66-
this.outputFormats.add(outputFormat);
64+
if (other.outputFormats != null) {
65+
this.outputFormats = new HashSet<OutputFormat>();
66+
for (OutputFormat outputFormat : other.outputFormats) {
67+
this.outputFormats.add(outputFormat);
68+
}
6769
}
6870
this.outputLocale = other.outputLocale;
6971
this.outputTimeZone = other.outputTimeZone;

src/main/java/com/jaspersoft/jasperserver/jaxrs/client/dto/jobs/JobAlert.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,11 @@ public JobAlert(JobAlert other) {
5555
this.messageTextWhenJobFails = other.messageTextWhenJobFails;
5656
this.recipient = other.recipient;
5757
this.subject = other.subject;
58-
this.toAddresses = new LinkedList<String>();
59-
for (String toAddress : other.toAddresses) {
60-
this.toAddresses.add(toAddress);
58+
if (other.toAddresses != null) {
59+
this.toAddresses = new LinkedList<String>();
60+
for (String toAddress : other.toAddresses) {
61+
this.toAddresses.add(toAddress);
62+
}
6163
}
6264
this.version = other.version;
6365

src/main/java/com/jaspersoft/jasperserver/jaxrs/client/dto/jobs/JobIdListWrapper.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
public class JobIdListWrapper {
3535

3636
private List<Long> ids;
37+
3738
public JobIdListWrapper(){
3839
}
3940

src/main/java/com/jaspersoft/jasperserver/jaxrs/client/dto/jobs/JobSource.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,11 @@ public JobSource() {
4141
}
4242

4343
public JobSource(JobSource other) {
44-
this.parameters = new LinkedHashMap<String, Object>();
45-
for (Map.Entry<String, Object> entry : parameters.entrySet()) {
46-
parameters.put(entry.getKey(),entry.getValue());
44+
if (other.parameters != null) {
45+
this.parameters = new LinkedHashMap<String, Object>();
46+
for (Map.Entry<String, Object> entry : other.parameters.entrySet()) {
47+
parameters.put(entry.getKey(),entry.getValue());
48+
}
4749
}
4850
this.reportUnitURI = other.reportUnitURI;
4951
}

src/main/java/com/jaspersoft/jasperserver/jaxrs/client/dto/jobs/MailNotification.java

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -50,17 +50,23 @@ public MailNotification() {
5050
}
5151

5252
public MailNotification(MailNotification other) {
53-
this.bccAddresses = new LinkedList<String>();
54-
for (String bccAddress : other.bccAddresses) {
55-
this.bccAddresses.add(bccAddress);
53+
if (other.bccAddresses != null) {
54+
this.bccAddresses = new LinkedList<String>();
55+
for (String bccAddress : other.bccAddresses) {
56+
this.bccAddresses.add(bccAddress);
57+
}
5658
}
57-
this.ccAddresses = new LinkedList<String>();
58-
for (String ccAddress : other.ccAddresses) {
59-
this.ccAddresses.add(ccAddress);
59+
if (other.ccAddresses != null) {
60+
this.ccAddresses = new LinkedList<String>();
61+
for (String ccAddress : other.ccAddresses) {
62+
this.ccAddresses.add(ccAddress);
63+
}
6064
}
61-
this.toAddresses = new LinkedList<String>();
62-
for (String toAddress : other.toAddresses) {
63-
this.toAddresses.add(toAddress);
65+
if (other.toAddresses != null) {
66+
this.toAddresses = new LinkedList<String>();
67+
for (String toAddress : other.toAddresses) {
68+
this.toAddresses.add(toAddress);
69+
}
6470
}
6571
this.id = other.id;
6672
this.includingStackTraceWhenJobFails = other.includingStackTraceWhenJobFails;

src/main/java/com/jaspersoft/jasperserver/jaxrs/client/dto/jobs/ReportJobCalendar.java

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -74,18 +74,24 @@ public ReportJobCalendar(ReportJobCalendar other) {
7474
this.cronExpression = other.cronExpression;
7575
this.dataSorted = other.dataSorted;
7676
this.description = other.description;
77-
this.excludeDays = new ArrayList<Calendar>();
78-
for (Calendar excludeDay : other.excludeDays) {
79-
this.excludeDays.add(excludeDay);
77+
if (other.excludeDays != null) {
78+
this.excludeDays = new ArrayList<Calendar>();
79+
for (Calendar excludeDay : other.excludeDays) {
80+
this.excludeDays.add(excludeDay);
81+
}
8082
}
81-
this.excludeDaysFlags = new boolean[other.excludeDaysFlags.length];
82-
for (int i = 0; i < other.excludeDaysFlags.length; i++) {
83-
this.excludeDaysFlags[i] = other.excludeDaysFlags[i];
83+
if (other.excludeDaysFlags != null) {
84+
this.excludeDaysFlags = new boolean[other.excludeDaysFlags.length];
85+
for (int i = 0; i < other.excludeDaysFlags.length; i++) {
86+
this.excludeDaysFlags[i] = other.excludeDaysFlags[i];
87+
}
8488
}
8589
this.invertTimeRange = other.invertTimeRange;
86-
this.rangeEndingCalendar = (Calendar) other.rangeEndingCalendar.clone();
87-
this.rangeStartingCalendar = (Calendar) other.rangeStartingCalendar.clone();
88-
this.timeZone = (TimeZone) other.timeZone.clone();
90+
this.rangeEndingCalendar = (other.rangeEndingCalendar != null) ?
91+
(Calendar) other.rangeEndingCalendar.clone() : null;
92+
this.rangeStartingCalendar = (other.rangeStartingCalendar != null) ?
93+
(Calendar) other.rangeStartingCalendar.clone() : null;
94+
this.timeZone = (other.timeZone != null) ? (TimeZone) other.timeZone.clone() : null;
8995
}
9096

9197
public String getCalendarType() {

src/main/java/com/jaspersoft/jasperserver/jaxrs/client/dto/settings/AwsSettings.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,12 @@ public AwsSettings(AwsSettings other) {
2424
this.productTypeIsEc2 = other.productTypeIsEc2;
2525
this.isEc2Instance = other.isEc2Instance;
2626
this.productTypeIsJrsAmi = other.productTypeIsJrsAmi;
27-
this.awsRegions = (other.awsRegions != null) ? new LinkedList<String>(other.awsRegions) : null;
27+
if (other.awsRegions != null) {
28+
this.awsRegions = new LinkedList<String>();
29+
for (String awsRegion : other.awsRegions) {
30+
this.awsRegions.add(awsRegion);
31+
}
32+
}
2833
this.productTypeIsMpAmi = other.productTypeIsMpAmi;
2934
this.suppressEc2CredentialsWarnings = other.suppressEc2CredentialsWarnings;
3035
}

src/main/java/com/jaspersoft/jasperserver/jaxrs/client/dto/settings/DashboardSettings.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,12 @@ public DashboardSettings() {
1414
}
1515

1616
public DashboardSettings(DashboardSettings other) {
17-
this.newItemsRegistry = (other.newItemsRegistry != null) ? new LinkedList<ItemRegistry>(other.newItemsRegistry) : null;
17+
if (other.newItemsRegistry != null) {
18+
this.newItemsRegistry = new LinkedList<ItemRegistry>();
19+
for (ItemRegistry itemRegistry : other.newItemsRegistry) {
20+
this.newItemsRegistry.add(new ItemRegistry(itemRegistry));
21+
}
22+
}
1823
}
1924

2025
public List<ItemRegistry> getNewItemsRegistry() {

0 commit comments

Comments
 (0)