Skip to content

Instantly share code, notes, and snippets.

@zdi-team
Created December 18, 2021 01:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zdi-team/5e57e9b4137cf55f3bca4a24814f4267 to your computer and use it in GitHub Desktop.
Save zdi-team/5e57e9b4137cf55f3bca4a24814f4267 to your computer and use it in GitHub Desktop.
private void checkCyclicSubstitution(final String varName, final List<String> priorVariables) {
if (!priorVariables.contains(varName)) {
return;
}
final StringBuilder buf = new StringBuilder(BUF_SIZE);
buf.append("Infinite loop in property interpolation of ");
buf.append(priorVariables.remove(0));
buf.append(": ");
appendWithSeparators(buf, priorVariables, "->");
throw new IllegalStateException(buf.toString());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment