gssCredentials = getDefaultCredentials();
}
// if still null, throw an exception
if (gssCredentials == null) {
throw new GFacException("Unable to retrieve my proxy credentials to continue operation.");
}
} else {
try {
if (gssCredentials.getRemainingLifetime() < CREDENTIAL_RENEWING_THRESH_HOLD) {
return renewCredentials();
}
} catch (GSSException e) {
throw new GFacException("Unable to retrieve remaining life time from credentials.", e);
}
}
return gssCredentials;
}