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:
James Agnew 2014-08-26 10:04:26 -04:00
parent 9413bfa47b
commit faa28cb825
4 changed files with 8 additions and 4 deletions

View File

@ -592,6 +592,9 @@
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9.1</version>
<configuration>
<links>
<link>http://docs.oracle.com/javaee/7/api</link>
</links>
</configuration>
<reportSets>
<reportSet>

View File

@ -35,6 +35,7 @@ import ca.uhn.fhir.model.api.IResource;
import ca.uhn.fhir.model.dstu.resource.Patient;
import ca.uhn.fhir.model.view.ViewGenerator;
import ca.uhn.fhir.narrative.INarrativeGenerator;
import ca.uhn.fhir.parser.DataFormatException;
import ca.uhn.fhir.parser.IParser;
import ca.uhn.fhir.parser.JsonParser;
import ca.uhn.fhir.parser.XmlParser;
@ -150,14 +151,14 @@ public class FhirContext {
try {
String className = myNameToResourceType.get(resourceName.toLowerCase());
if (className == null) {
return null;
throw new DataFormatException("Unknown resource name[" + resourceName + "]");
}
Class<?> clazz = Class.forName(className);
if (IResource.class.isAssignableFrom(clazz)) {
retVal = scanResourceType((Class<? extends IResource>) clazz);
}
} catch (ClassNotFoundException e) {
return null;
throw new DataFormatException("Unknown resource name[" + resourceName + "]");
}
}

View File

@ -20,7 +20,7 @@ package ca.uhn.fhir.rest.server;
* #L%
*/
import static org.apache.commons.lang3.StringUtils.*;
import static org.apache.commons.lang3.StringUtils.isNotBlank;
import java.io.IOException;
import java.io.OutputStreamWriter;
@ -53,7 +53,6 @@ import javax.servlet.http.HttpServletResponse;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.Validate;
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.RuntimeResourceDefinition;

View File

@ -1,5 +1,6 @@
# This file contains version definitions
resource.Binary=ca.uhn.fhir.model.dstu.resource.Binary
resource.AdverseReaction=ca.uhn.fhir.model.dstu.resource.AdverseReaction
resource.Alert=ca.uhn.fhir.model.dstu.resource.Alert
resource.AllergyIntolerance=ca.uhn.fhir.model.dstu.resource.AllergyIntolerance