Remove unneccesary log lines and clean up some documentation

This commit is contained in:
James Agnew 2018-02-24 10:57:32 -05:00
parent 3b2930f8e9
commit 6e47951220
6 changed files with 32 additions and 21 deletions

View File

@ -55,7 +55,7 @@ public interface IParserErrorHandler {
void incorrectJsonType(IParseLocation theLocation, String theElementName, ValueType theExpectedValueType, ScalarType theExpectedScalarType, ValueType theFoundValueType, ScalarType theFoundScalarType); void incorrectJsonType(IParseLocation theLocation, String theElementName, ValueType theExpectedValueType, ScalarType theExpectedScalarType, ValueType theFoundValueType, ScalarType theFoundScalarType);
/** /**
* The parser detected an atttribute value that was invalid (such as: empty "" values are not permitted) * The parser detected an attribute value that was invalid (such as: empty "" values are not permitted)
* *
* @param theLocation * @param theLocation
* The location in the document. Note that this may be <code>null</code> as the ParseLocation feature is experimental. Use with caution, as the API may change. * The location in the document. Note that this may be <code>null</code> as the ParseLocation feature is experimental. Use with caution, as the API may change.
@ -70,7 +70,7 @@ public interface IParserErrorHandler {
* *
* @param theLocation * @param theLocation
* The location in the document. Note that this may be <code>null</code> as the ParseLocation feature is experimental. Use with caution, as the API may change. * The location in the document. Note that this may be <code>null</code> as the ParseLocation feature is experimental. Use with caution, as the API may change.
* @param theReference The actual invalid reference (e.g. "#3") * @param theElementName The missing element name
* @since 2.1 * @since 2.1
*/ */
void missingRequiredElement(IParseLocation theLocation, String theElementName); void missingRequiredElement(IParseLocation theLocation, String theElementName);
@ -123,7 +123,7 @@ public interface IParserErrorHandler {
* type which will currently always be set to null. This interface is included here so that * type which will currently always be set to null. This interface is included here so that
* locations can be added to the API in a future release without changing the API. * locations can be added to the API in a future release without changing the API.
*/ */
public interface IParseLocation { interface IParseLocation {
/** /**
* Returns the name of the parent element (the element containing the element currently being parsed) * Returns the name of the parent element (the element containing the element currently being parsed)

View File

@ -1033,7 +1033,7 @@ public class JsonParser extends BaseParser implements IJsonLikeParser {
} else { } else {
parentElementName = "extension"; parentElementName = "extension";
} }
getErrorHandler().missingRequiredElement(new ParseLocation(parentElementName), "url"); getErrorHandler().missingRequiredElement(new ParseLocation().setParentElementName(parentElementName), "url");
url = null; url = null;
} else { } else {
url = getExtensionUrl(jsonElement.getAsString()); url = getExtensionUrl(jsonElement.getAsString());

View File

@ -29,9 +29,8 @@ class ParseLocation implements IParseLocation {
/** /**
* Constructor * Constructor
*/ */
public ParseLocation(String theParentElementName) { public ParseLocation() {
super(); super();
myParentElementName = theParentElementName;
} }
@Override @Override
@ -39,4 +38,9 @@ class ParseLocation implements IParseLocation {
return myParentElementName; return myParentElementName;
} }
public ParseLocation setParentElementName(String theParentElementName) {
myParentElementName = theParentElementName;
return this;
}
} }

View File

@ -806,7 +806,7 @@ class ParserState<T> {
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
List<IBase> securityLabels = (List<IBase>) myMap.get(ResourceMetadataKeyEnum.SECURITY_LABELS); List<IBase> securityLabels = (List<IBase>) myMap.get(ResourceMetadataKeyEnum.SECURITY_LABELS);
if (securityLabels == null) { if (securityLabels == null) {
securityLabels = new ArrayList<IBase>(); securityLabels = new ArrayList<>();
myMap.put(ResourceMetadataKeyEnum.SECURITY_LABELS, securityLabels); myMap.put(ResourceMetadataKeyEnum.SECURITY_LABELS, securityLabels);
} }
IBase securityLabel = myContext.getVersion().newCodingDt(); IBase securityLabel = myContext.getVersion().newCodingDt();

View File

@ -7,6 +7,7 @@ import ca.uhn.fhir.model.dstu2.resource.Bundle.Entry;
import ca.uhn.fhir.model.dstu2.resource.StructureDefinition; import ca.uhn.fhir.model.dstu2.resource.StructureDefinition;
import ca.uhn.fhir.model.dstu2.resource.ValueSet; import ca.uhn.fhir.model.dstu2.resource.ValueSet;
import ca.uhn.fhir.rest.client.api.IGenericClient; import ca.uhn.fhir.rest.client.api.IGenericClient;
import ca.uhn.fhir.rest.server.exceptions.BaseServerResponseException;
import ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException; import ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException;
import org.apache.commons.cli.CommandLine; import org.apache.commons.cli.CommandLine;
import org.apache.commons.cli.Option; import org.apache.commons.cli.Option;
@ -274,6 +275,8 @@ public class ValidationDataUploader extends BaseCommand {
ourLog.info(" - Got ID: {}", id.getValue()); ourLog.info(" - Got ID: {}", id.getValue());
} catch (UnprocessableEntityException e) { } catch (UnprocessableEntityException e) {
ourLog.warn("UnprocessableEntityException: " + e.toString()); ourLog.warn("UnprocessableEntityException: " + e.toString());
} catch (BaseServerResponseException e) {
ourLog.warn("Server responded HTTP " + e.getStatusCode() + ": " + e.toString());
} }
count++; count++;
} }

View File

@ -154,6 +154,10 @@
Deleting a resource from the testpage overlay resulted in an error page after Deleting a resource from the testpage overlay resulted in an error page after
clicking "delete", even though the delete succeeded. clicking "delete", even though the delete succeeded.
</action> </action>
<action type="remove">
A number of info level log lines have been reduced to debug level in the JPA server, in
order to reduce contention during heavy loads.
</action>
</release> </release>
<release version="3.2.0" date="2018-01-13"> <release version="3.2.0" date="2018-01-13">
<action type="add"> <action type="add">