Skip to content

Commit

Permalink
Drop unused GraphvizResolutionEventListener & dependency (#4778)
Browse files Browse the repository at this point in the history
* Drop unused GraphvizResolutionEventListener & dependency

* Drop inadvertent use of logger
  • Loading branch information
timtebeek authored Dec 12, 2024
1 parent ceb3dab commit 5cb3945
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 350 deletions.
3 changes: 0 additions & 3 deletions rewrite-maven/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ dependencies {
// needed by AddDependency
implementation(project(":rewrite-java"))

compileOnly("guru.nidi:graphviz-java:latest.release")

compileOnly("org.rocksdb:rocksdbjni:latest.release")
compileOnly(project(":rewrite-yaml"))
implementation(project(":rewrite-properties"))
Expand All @@ -41,7 +39,6 @@ dependencies {
testImplementation("com.squareup.okhttp3:okhttp-tls:4.+")
testImplementation("com.squareup.okio:okio-jvm:3.9.1")
testImplementation("org.mapdb:mapdb:latest.release")
testImplementation("guru.nidi:graphviz-java:latest.release")

testRuntimeOnly("org.mapdb:mapdb:latest.release")
testRuntimeOnly(project(":rewrite-java-17"))
Expand Down
125 changes: 0 additions & 125 deletions rewrite-maven/dependency-viz.kt

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@
import org.openrewrite.maven.tree.MavenMetadata;
import org.openrewrite.maven.tree.MavenRepository;
import org.openrewrite.maven.tree.Version;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.Iterator;
import java.util.List;
Expand All @@ -41,7 +39,6 @@

@RequiredArgsConstructor
public class VersionRequirement {
private static final Logger logger = LoggerFactory.getLogger(VersionRequirement.class);

@Nullable
private final VersionRequirement nearer;
Expand Down Expand Up @@ -100,7 +97,7 @@ static VersionSpec build(String requested, boolean direct) {
CharStreams.fromString(requested))));

parser.removeErrorListeners();
parser.addErrorListener(new LoggingErrorListener());
parser.addErrorListener(new PrintingErrorListener());

return new VersionRangeParserBaseVisitor<VersionSpec>() {
@Override
Expand Down Expand Up @@ -287,11 +284,11 @@ public String toString() {
});
}

private static class LoggingErrorListener extends BaseErrorListener {
private static class PrintingErrorListener extends BaseErrorListener {
@Override
public void syntaxError(Recognizer<?, ?> recognizer, Object offendingSymbol,
int line, int charPositionInLine, String msg, RecognitionException e) {
logger.warn("Syntax error at line {}:{} {}", line, charPositionInLine, msg);
System.out.printf("Syntax error at line %d:%d %s%n", line, charPositionInLine, msg);
}
}
}

This file was deleted.

0 comments on commit 5cb3945

Please sign in to comment.