Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QuickFix for Empty translatorOptions #96

Merged
merged 1 commit into from
May 3, 2022

Conversation

vitorpamplona
Copy link
Contributor

Solving for an elm/json library with:

    "annotation" : [ {
      "translatorOptions" : ""
    } ]

Which gives

java.lang.IllegalArgumentException: No enum constant org.cqframework.cql.cql2elm.CqlTranslator.Options.
at java.lang.Enum.valueOf(Enum.java:257)
at org.cqframework.cql.cql2elm.CqlTranslator$Options.valueOf(CqlTranslator.java:38)
at org.opencds.cqf.cql.evaluator.engine.util.TranslatorOptionsUtil.parseTranslatorOptions(TranslatorOptionsUtil.java:117)
at org.opencds.cqf.cql.evaluator.engine.util.TranslatorOptionsUtil.getTranslatorOptions(TranslatorOptionsUtil.java:41)
at org.opencds.cqf.cql.evaluator.engine.execution.TranslatingLibraryLoader.translatorOptionsMatch(TranslatingLibraryLoader.java:101)
at org.opencds.cqf.cql.evaluator.engine.execution.TranslatingLibraryLoader.load(TranslatingLibraryLoader.java:74)
at org.opencds.cqf.cql.evaluator.engine.execution.CacheAwareLibraryLoaderDecorator.load(CacheAwareLibraryLoaderDecorator.java:49)
at org.opencds.cqf.cql.engine.execution.CqlEngine.loadAndValidate(CqlEngine.java:254)
at org.opencds.cqf.cql.engine.execution.CqlEngine.evaluate(CqlEngine.java:154)
at org.opencds.cqf.cql.evaluator.CqlEvaluator.evaluate(CqlEvaluator.java:89)
at org.opencds.cqf.cql.evaluator.library.LibraryEvaluator.evaluate(LibraryEvaluator.java:47)
at org.opencds.cqf.cql.evaluator.library.LibraryProcessor.evaluate(LibraryProcessor.java:159)
at org.opencds.cqf.cql.evaluator.library.LibraryProcessor.evaluate(LibraryProcessor.java:93)

on CqlTranslator.Options.valueOf(option) with option=""

```
    "annotation" : [ {
      "translatorOptions" : ""
    } ]
```
@brynrhodes
Copy link
Member

Actually, @vitorpamplona , not sure if there's a way to do this in Github, but this repository doesn't allow merging directly to master, needs to be a PR first...

@brynrhodes
Copy link
Member

Maybe since it's coming from a fork it's fine?

@vitorpamplona
Copy link
Contributor Author

humm... I don't think I have the rights to create a branch in the DBCG/cql-evaluator repo. How do we do this?

@brynrhodes brynrhodes merged commit b1e6a1d into cqframework:master May 3, 2022
@brynrhodes
Copy link
Member

Sorry for the confusion, I was able to merge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants