fix NPE checking codes
This commit is contained in:
parent
6b5ca97aa8
commit
daf69cef37
|
@ -1249,7 +1249,7 @@ public abstract class BaseWorkerContext extends I18nBase implements IWorkerConte
|
||||||
}
|
}
|
||||||
if (!res.isOk() && localError != null) {
|
if (!res.isOk() && localError != null) {
|
||||||
res.setDiagnostics("Local Error: "+localError.trim()+". Server Error: "+res.getMessage());
|
res.setDiagnostics("Local Error: "+localError.trim()+". Server Error: "+res.getMessage());
|
||||||
} else if (!res.isOk() && res.getUnknownSystems().contains(codeKey) && localWarning != null) {
|
} else if (!res.isOk() && res.getUnknownSystems() != null && res.getUnknownSystems().contains(codeKey) && localWarning != null) {
|
||||||
// we had some problem evaluating locally, but the server doesn't know the code system, so we'll just go with the local error
|
// we had some problem evaluating locally, but the server doesn't know the code system, so we'll just go with the local error
|
||||||
res.setMessage(localWarning);
|
res.setMessage(localWarning);
|
||||||
res.setDiagnostics("Local Error: "+localWarning.trim()+". Server Error: "+res.getMessage());
|
res.setDiagnostics("Local Error: "+localWarning.trim()+". Server Error: "+res.getMessage());
|
||||||
|
@ -1527,11 +1527,15 @@ public abstract class BaseWorkerContext extends I18nBase implements IWorkerConte
|
||||||
if (tcc.usingCache()) {
|
if (tcc.usingCache()) {
|
||||||
if (!tcc.alreadyCached(cr)) {
|
if (!tcc.alreadyCached(cr)) {
|
||||||
tcc.addToCache(cr);
|
tcc.addToCache(cr);
|
||||||
System.out.println("add to cache: "+cr.getVUrl());
|
if (logger.isDebugLogging()) {
|
||||||
|
logger.logMessage("add to cache: "+cr.getVUrl());
|
||||||
|
}
|
||||||
addToParams = true;
|
addToParams = true;
|
||||||
cache = true;
|
cache = true;
|
||||||
} else {
|
} else {
|
||||||
System.out.println("already cached: "+cr.getVUrl());
|
if (logger.isDebugLogging()) {
|
||||||
|
logger.logMessage("already cached: "+cr.getVUrl());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
addToParams = true;
|
addToParams = true;
|
||||||
|
|
Loading…
Reference in New Issue