if (result == null) {
// if ("PROGNAME".equalsIgnoreCase(propertyName)) {
// System.out.println("DEBUG: " + propertyName + " getting from Document");
// }
try {
Document doc = getRawDocument();
result = doc.getItemValue(propertyName, T);
if (result == null) {
// synchronized (props) {
props.put(key, Null.INSTANCE);
// }
} else if (result instanceof Serializable) {
// synchronized (props) {
props.put(key, (Serializable) result);
// }
} else {
log_.log(Level.WARNING, "Got a value from the document but it's not Serializable. It's a "
+ result.getClass().getName());
}
} catch (Exception e) {
log_.log(Level.WARNING, "Exception occured attempting to get value from document for " + propertyName
+ " so we cannot return a value", e);
}
} else if (result == Null.INSTANCE) {
} else {
if (result != null && !T.isAssignableFrom(result.getClass())) {
// if ("PROGNAME".equalsIgnoreCase(propertyName)) {
// System.out.println("DEBUG: " + propertyName + " result is a " + result.getClass().getSimpleName());
// }
// System.out.println("AH! We have the wrong type in the property cache! How did this happen?");
try {
Document doc = getRawDocument();
result = doc.getItemValue(propertyName, T);
if (result == null) {
// synchronized (props) {
props.put(key, Null.INSTANCE);
// }
} else if (result instanceof Serializable) {