Code Review
/
aaf
/
authz.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Batch Test improvements
[aaf/authz.git]
/
auth
/
auth-batch
/
src
/
main
/
java
/
org
/
onap
/
aaf
/
auth
/
batch
/
approvalsets
/
Pending.java
diff --git
a/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/approvalsets/Pending.java
b/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/approvalsets/Pending.java
index
3072038
..
5d720c2
100644
(file)
--- a/
auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/approvalsets/Pending.java
+++ b/
auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/approvalsets/Pending.java
@@
-34,15
+34,6
@@
public class Pending {
boolean hasNew;
Date earliest;
boolean hasNew;
Date earliest;
- /**
- * Use this Constructor when there is no Last Notified Date
- */
- public Pending() {
- qty = 1;
- hasNew = true;
- earliest = null;
- }
-
/**
* Use this constructor to indicate when last Notified
* @param last_notified
/**
* Use this constructor to indicate when last Notified
* @param last_notified
@@
-84,6
+75,11
@@
public class Pending {
public void inc(Pending value) {
qty+=value.qty;
public void inc(Pending value) {
qty+=value.qty;
+ if(earliest==null) {
+ earliest = value.earliest;
+ } else if(value.earliest!=null && value.earliest.before(earliest)) {
+ earliest = value.earliest;
+ }
}
public void earliest(Date lastnotified) {
}
public void earliest(Date lastnotified) {
@@
-106,4
+102,8
@@
public class Pending {
return hasNew;
}
return hasNew;
}
+ public static Pending create() {
+ return new Pending((Date)null);
+ }
+
}
\ No newline at end of file
}
\ No newline at end of file