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

Function accepts a configuration but it does not do anything #3678

Closed
ProfDoof opened this issue Sep 5, 2022 · 1 comment · Fixed by #3692
Closed

Function accepts a configuration but it does not do anything #3678

ProfDoof opened this issue Sep 5, 2022 · 1 comment · Fixed by #3692

Comments

@ProfDoof
Copy link

ProfDoof commented Sep 5, 2022

Hi all,

I'm knee-deep in y'all's codebase right now looking for example on how to override some of your printer functionalities because I'm trying to do some code canonicalization and I noticed that your default functions here accept a printer configuration but don't actually do anything with it. Just thought that was a bit odd and thought I would let y'all know.

private static Function<PrinterConfiguration, VoidVisitor<Void>> createDefaultVisitor() {
PrinterConfiguration configuration = createDefaultConfiguration();
return createDefaultVisitor(configuration);
}
private static Function<PrinterConfiguration, VoidVisitor<Void>> createDefaultVisitor(PrinterConfiguration configuration) {
return (config) -> new DefaultPrettyPrinterVisitor(config, new SourcePrinter(config));
}
private static PrinterConfiguration createDefaultConfiguration() {
return new DefaultPrinterConfiguration();
}

@jlerbsc
Copy link
Collaborator

jlerbsc commented Sep 15, 2022

Hi @ProfDoof thank you for reporting this bug.

jlerbsc added a commit that referenced this issue Sep 15, 2022
Fix issue #3678 Function accepts a configuration but it does not do anything
wadoon added a commit to jmltoolkit/jmlparser that referenced this issue Oct 5, 2022
* upstream/master:
  Accept final in instanceof pattern
  Avoid test failure due to line separator differences on windows host
  chore(deps): update dependency org.apache.maven.plugins:maven-jar-plugin to v3.3.0
  chore(deps): update dependency org.codehaus.mojo:versions-maven-plugin to v2.12.0
  chore(deps): update codecov/codecov-action action to v3.1.1
  chore(deps): update junit5 monorepo to v5.9.1
  Bug fix on windows system: compare results with ignoring end of line character
  Fix issue javaparser#3700 Removing last statement with LexicalPreservingPrinter results in loss of indendation
  chore(deps): update dependency com.github.valfirst:jbehave-junit-runner to v2.3.2
  fix(deps): update dependency org.javassist:javassist to v3.29.2-ga
  Refactoring - use of existing methods
  Refactoring adding convenient methods to know if a DifferenceElement is added, removed or kept
  Fix issue javaparser#3678 Function accepts a configuration but it does not do anything
  [maven-release-plugin] prepare for next development iteration
  [maven-release-plugin] update readme
  Update changelog
  [maven-release-plugin] prepare for next development iteration
  [maven-release-plugin] update readme
  Update changelog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants