Fix unit test, should close #13. Our hudson server is temporarily
offline and I need to do a better job of manually running the tests until it is back!
This commit is contained in:
parent
9413bfa47b
commit
faa28cb825
|
@ -592,6 +592,9 @@
|
||||||
<artifactId>maven-javadoc-plugin</artifactId>
|
<artifactId>maven-javadoc-plugin</artifactId>
|
||||||
<version>2.9.1</version>
|
<version>2.9.1</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
|
<links>
|
||||||
|
<link>http://docs.oracle.com/javaee/7/api</link>
|
||||||
|
</links>
|
||||||
</configuration>
|
</configuration>
|
||||||
<reportSets>
|
<reportSets>
|
||||||
<reportSet>
|
<reportSet>
|
||||||
|
|
|
@ -35,6 +35,7 @@ import ca.uhn.fhir.model.api.IResource;
|
||||||
import ca.uhn.fhir.model.dstu.resource.Patient;
|
import ca.uhn.fhir.model.dstu.resource.Patient;
|
||||||
import ca.uhn.fhir.model.view.ViewGenerator;
|
import ca.uhn.fhir.model.view.ViewGenerator;
|
||||||
import ca.uhn.fhir.narrative.INarrativeGenerator;
|
import ca.uhn.fhir.narrative.INarrativeGenerator;
|
||||||
|
import ca.uhn.fhir.parser.DataFormatException;
|
||||||
import ca.uhn.fhir.parser.IParser;
|
import ca.uhn.fhir.parser.IParser;
|
||||||
import ca.uhn.fhir.parser.JsonParser;
|
import ca.uhn.fhir.parser.JsonParser;
|
||||||
import ca.uhn.fhir.parser.XmlParser;
|
import ca.uhn.fhir.parser.XmlParser;
|
||||||
|
@ -150,14 +151,14 @@ public class FhirContext {
|
||||||
try {
|
try {
|
||||||
String className = myNameToResourceType.get(resourceName.toLowerCase());
|
String className = myNameToResourceType.get(resourceName.toLowerCase());
|
||||||
if (className == null) {
|
if (className == null) {
|
||||||
return null;
|
throw new DataFormatException("Unknown resource name[" + resourceName + "]");
|
||||||
}
|
}
|
||||||
Class<?> clazz = Class.forName(className);
|
Class<?> clazz = Class.forName(className);
|
||||||
if (IResource.class.isAssignableFrom(clazz)) {
|
if (IResource.class.isAssignableFrom(clazz)) {
|
||||||
retVal = scanResourceType((Class<? extends IResource>) clazz);
|
retVal = scanResourceType((Class<? extends IResource>) clazz);
|
||||||
}
|
}
|
||||||
} catch (ClassNotFoundException e) {
|
} catch (ClassNotFoundException e) {
|
||||||
return null;
|
throw new DataFormatException("Unknown resource name[" + resourceName + "]");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@ package ca.uhn.fhir.rest.server;
|
||||||
* #L%
|
* #L%
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import static org.apache.commons.lang3.StringUtils.*;
|
import static org.apache.commons.lang3.StringUtils.isNotBlank;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.OutputStreamWriter;
|
import java.io.OutputStreamWriter;
|
||||||
|
@ -53,7 +53,6 @@ import javax.servlet.http.HttpServletResponse;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.commons.lang3.Validate;
|
import org.apache.commons.lang3.Validate;
|
||||||
import org.apache.commons.lang3.exception.ExceptionUtils;
|
import org.apache.commons.lang3.exception.ExceptionUtils;
|
||||||
import org.eclipse.jetty.security.MappedLoginService.Anonymous;
|
|
||||||
|
|
||||||
import ca.uhn.fhir.context.FhirContext;
|
import ca.uhn.fhir.context.FhirContext;
|
||||||
import ca.uhn.fhir.context.RuntimeResourceDefinition;
|
import ca.uhn.fhir.context.RuntimeResourceDefinition;
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
# This file contains version definitions
|
# This file contains version definitions
|
||||||
|
|
||||||
|
resource.Binary=ca.uhn.fhir.model.dstu.resource.Binary
|
||||||
resource.AdverseReaction=ca.uhn.fhir.model.dstu.resource.AdverseReaction
|
resource.AdverseReaction=ca.uhn.fhir.model.dstu.resource.AdverseReaction
|
||||||
resource.Alert=ca.uhn.fhir.model.dstu.resource.Alert
|
resource.Alert=ca.uhn.fhir.model.dstu.resource.Alert
|
||||||
resource.AllergyIntolerance=ca.uhn.fhir.model.dstu.resource.AllergyIntolerance
|
resource.AllergyIntolerance=ca.uhn.fhir.model.dstu.resource.AllergyIntolerance
|
||||||
|
|
Loading…
Reference in New Issue