Fix #428 - Fix NPE when encoding extension
This commit is contained in:
parent
696fa8701b
commit
aa16a46b74
|
@ -20,4 +20,4 @@ before_script:
|
|||
|
||||
script:
|
||||
# - mvn -e -B clean install && cd hapi-fhir-ra && mvn -e -B -DTRAVIS_JOB_ID=$TRAVIS_JOB_ID clean test jacoco:report coveralls:report
|
||||
- mvn -e -B -P ALLMODULES,NOPARALLEL clean install && cd hapi-fhir-jacoco && mvn -e -B -DTRAVIS_JOB_ID=$TRAVIS_JOB_ID jacoco:report coveralls:report
|
||||
- mvn -Dci=true -e -B -P ALLMODULES,NOPARALLEL clean install && cd hapi-fhir-jacoco && mvn -e -B -DTRAVIS_JOB_ID=$TRAVIS_JOB_ID jacoco:report coveralls:report
|
||||
|
|
|
@ -1075,13 +1075,15 @@ public abstract class BaseParser implements IParser {
|
|||
StringBuilder b = new StringBuilder();
|
||||
b.append(myResDef.getName());
|
||||
return b;
|
||||
} else {
|
||||
} else if (myParent != null) {
|
||||
StringBuilder b = myParent.buildPath();
|
||||
if (b != null && myDef != null) {
|
||||
b.append('.');
|
||||
b.append(myDef.getElementName());
|
||||
}
|
||||
return b;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -26,7 +26,12 @@ import java.util.Arrays;
|
|||
import java.util.Locale;
|
||||
import java.util.TimeZone;
|
||||
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import ca.uhn.fhir.context.FhirContext;
|
||||
import ch.qos.logback.classic.Level;
|
||||
import ch.qos.logback.classic.Logger;
|
||||
import ch.qos.logback.classic.LoggerContext;
|
||||
|
||||
public class TestUtil {
|
||||
private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(TestUtil.class);
|
||||
|
@ -71,6 +76,7 @@ public class TestUtil {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -95,6 +101,16 @@ public class TestUtil {
|
|||
TimeZone.setDefault(TimeZone.getTimeZone(timeZone));
|
||||
ourLog.info("Tests are using time zone: {}", TimeZone.getDefault().getID());
|
||||
|
||||
/*
|
||||
* If we're running a CI build, set all loggers to TRACE level to ensure coverage
|
||||
* on trace blocks
|
||||
*/
|
||||
if ("true".equals(System.getProperty("ci"))) {
|
||||
for (Logger next : ((LoggerContext)LoggerFactory.getILoggerFactory()).getLoggerList()) {
|
||||
next.setLevel(Level.TRACE);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -192,6 +192,10 @@
|
|||
required in earlier versions of FHIR but has been removed
|
||||
from the specification.
|
||||
</action>
|
||||
<action type="fix" issue="428">
|
||||
Fix NullPointerException when encoding an extension containing CodeableConcept
|
||||
with log level set to TRACE. Thanks to Bill Denton for the report!
|
||||
</action>
|
||||
</release>
|
||||
<release version="1.6" date="2016-07-07">
|
||||
<action type="fix">
|
||||
|
|
Loading…
Reference in New Issue