Fix unit tests

This commit is contained in:
jamesagnew 2014-03-19 11:40:06 -04:00
parent eb1df7b36a
commit f278d9d096
2 changed files with 8 additions and 8 deletions

View File

@ -119,7 +119,7 @@ public class FhirContext {
idToElementDefinition.putAll(myIdToResourceDefinition); idToElementDefinition.putAll(myIdToResourceDefinition);
idToElementDefinition.putAll(scanner.getIdToResourceDefinition()); idToElementDefinition.putAll(scanner.getIdToResourceDefinition());
myNameToElementDefinition = idToElementDefinition; myNameToElementDefinition = nameToElementDefinition;
myClassToElementDefinition = classToElementDefinition; myClassToElementDefinition = classToElementDefinition;
myIdToResourceDefinition = idToElementDefinition; myIdToResourceDefinition = idToElementDefinition;

View File

@ -16,13 +16,13 @@ public class CollectionBinder
* @param thePositionDescription Just used in exceptions if theCollectionType is invalid * @param thePositionDescription Just used in exceptions if theCollectionType is invalid
*/ */
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
public static Class<? extends Collection<?>> getInstantiableCollectionType(Class<? extends Collection<?>> theCollectionType, String thePositionDescription) { public static Class<? extends Collection> getInstantiableCollectionType(Class<? extends Collection<?>> theCollectionType, String thePositionDescription) {
if (theCollectionType == List.class || theCollectionType == ArrayList.class) { if (theCollectionType.equals(List.class) || theCollectionType .equals(ArrayList.class)) {
return (Class<? extends Collection<?>>) ArrayList.class; return (Class<? extends Collection>) ArrayList.class;
} else if (theCollectionType == Set.class || theCollectionType == HashSet.class) { } else if (theCollectionType .equals( Set.class )|| theCollectionType .equals( HashSet.class)) {
return (Class<? extends Collection<?>>) HashSet.class; return (Class<? extends Collection>) HashSet.class;
} else if (theCollectionType == Collection.class) { } else if (theCollectionType.equals(Collection.class)) {
return (Class<? extends Collection<?>>) ArrayList.class; return (Class<? extends Collection>) ArrayList.class;
} else { } else {
throw new ConfigurationException("Unsupported binding collection type '" + theCollectionType.getCanonicalName() + "' for " + thePositionDescription); throw new ConfigurationException("Unsupported binding collection type '" + theCollectionType.getCanonicalName() + "' for " + thePositionDescription);
} }