- for( Cred creds : Cred.data.values()) {
- Instance lastInstance=null;
- for(Instance inst : creds.instances) {
- if(inst.type==CredDAO.BASIC_AUTH || inst.type==CredDAO.BASIC_AUTH_SHA256) {
- if(lastInstance == null || inst.expires.after(lastInstance.expires)) {
- lastInstance = inst;
- }
- }
- }
- if(lastInstance!=null) {
- if(lastInstance.expires.after(now)) {
- if(lastInstance.expires.before(twoWeeks)) {
- expiring.add(Chrono.dateOnlyStamp(lastInstance.expires) + ": \t" + creds.id);
- }
- }
- if(lastInstance.expires.before(earliestCred)) {
- earliestCred = lastInstance.expires;
- }
- }
- }
-
- if(expiring.size()>0) {
- Collections.sort(expiring,Collections.reverseOrder());
- for(String s : expiring) {
- System.err.print('\t');
- System.err.println(s);
- }
- trans.info().printf("Earliest Expiring Cred is %s\n\n", Chrono.dateOnlyStamp(earliestCred));
- } else {
- trans.info().printf("No Expiring Creds within 2 weeks");
- }
+ for( Cred creds : Cred.data.values()) {
+ Instance lastInstance=null;
+ for(Instance inst : creds.instances) {
+ if(inst.type==CredDAO.BASIC_AUTH || inst.type==CredDAO.BASIC_AUTH_SHA256) {
+ if(lastInstance == null || inst.expires.after(lastInstance.expires)) {
+ lastInstance = inst;
+ }
+ }
+ }
+ if(lastInstance!=null) {
+ if(lastInstance.expires.after(now)) {
+ if(lastInstance.expires.before(twoWeeks)) {
+ expiring.add(Chrono.dateOnlyStamp(lastInstance.expires) + ": \t" + creds.id);
+ }
+ }
+ if(lastInstance.expires.before(earliestCred)) {
+ earliestCred = lastInstance.expires;
+ }
+ }
+ }
+
+ if(expiring.size()>0) {
+ Collections.sort(expiring,Collections.reverseOrder());
+ for(String s : expiring) {
+ System.err.print('\t');
+ System.err.println(s);
+ }
+ trans.info().printf("Earliest Expiring Cred is %s\n\n", Chrono.dateOnlyStamp(earliestCred));
+ } else {
+ trans.info().printf("No Expiring Creds within 2 weeks");
+ }