Skip to content

Commit

Permalink
Fix compile and startup errors. Relax validation.
Browse files Browse the repository at this point in the history
  • Loading branch information
lukedegruchy committed Jan 30, 2025
1 parent da05e9d commit 4d000c4
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -271,12 +271,14 @@ private static void validateGenericTypes(
final Type parameterTypeArgumentAtIndex = parameterTypeArguments[index];
final Type fieldTypeArgumentAtIndex = fieldTypeArguments[index];

if (!parameterTypeArgumentAtIndex.equals(fieldTypeArgumentAtIndex)) {
final String error = String.format(
"Generic type argument does not match constructor: %s, field: %s for class: %s",
parameterTypeArgumentAtIndex, fieldTypeArgumentAtIndex, theDeclaringClass);
throw new ConfigurationException(error);
}
// LUKETODO: this causes errors if we pass in a generic type with one type of generic parameter (String)
// and convert it to another (StringType)
// if (!parameterTypeArgumentAtIndex.equals(fieldTypeArgumentAtIndex)) {
// final String error = String.format(
// "Generic type argument does not match constructor: %s, field: %s for class: %s",
// parameterTypeArgumentAtIndex, fieldTypeArgumentAtIndex, theDeclaringClass);
// throw new ConfigurationException(error);
// }
}
} else {
final String error = String.format(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public CareGapsParams(
myNonDocument = theNonDocument;
}

public CareGapsParams(CareGapsParams.Builder builder) {
private CareGapsParams(CareGapsParams.Builder builder) {
this(
builder.myPeriodStart,
builder.myPeriodEnd,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public MeasureReport evaluateMeasure(
// thing as a MUTUALLY EXCLUSIVE ANNotation?4. is there such as thing as a MUTUALLY EXCLUSIVE
// ANNotation?4. is there such as thing as a MUTUALLY EXCLUSIVE ANNotation?
// so 3 different params : try annotations
Eithers.forMiddle3(theParams.getId()),
theParams.getMeasure(),
theParams.getPeriodStart(),
theParams.getPeriodEnd(),
theParams.getReportType(),
Expand Down

0 comments on commit 4d000c4

Please sign in to comment.