From 1999492f0bd9ba8c3551f617019db70d3ce3c931 Mon Sep 17 00:00:00 2001 From: Lars Vogel Date: Mon, 4 Dec 2023 09:56:17 +0100 Subject: [PATCH] Make inner classes static where possible in tycho-core Using JDT UI "Make inner classes static where possible" clean-up on Tycho core --- .../org/eclipse/tycho/core/osgitools/DependencyComputer.java | 2 +- .../tycho/p2/repository/AbstractArtifactRepository2.java | 2 +- .../org/eclipse/tycho/p2tools/MirrorApplicationServiceImpl.java | 2 +- .../src/test/java/org/eclipse/tycho/test/util/LogVerifier.java | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tycho-core/src/main/java/org/eclipse/tycho/core/osgitools/DependencyComputer.java b/tycho-core/src/main/java/org/eclipse/tycho/core/osgitools/DependencyComputer.java index a198f39808..d37b4529a9 100644 --- a/tycho-core/src/main/java/org/eclipse/tycho/core/osgitools/DependencyComputer.java +++ b/tycho-core/src/main/java/org/eclipse/tycho/core/osgitools/DependencyComputer.java @@ -126,7 +126,7 @@ public String toString() { } } - private final class VisiblePackages { + private static final class VisiblePackages { private final Map> visiblePackages = new HashMap<>(); private final BundleRevision consumerHost; diff --git a/tycho-core/src/main/java/org/eclipse/tycho/p2/repository/AbstractArtifactRepository2.java b/tycho-core/src/main/java/org/eclipse/tycho/p2/repository/AbstractArtifactRepository2.java index fe31bbd849..9cc0e9a426 100644 --- a/tycho-core/src/main/java/org/eclipse/tycho/p2/repository/AbstractArtifactRepository2.java +++ b/tycho-core/src/main/java/org/eclipse/tycho/p2/repository/AbstractArtifactRepository2.java @@ -233,7 +233,7 @@ public final OutputStream getOutputStream(IArtifactDescriptor descriptor) throws } } - private class CommittingArtifactOutputStream extends OutputStream implements IStateful { + private static class CommittingArtifactOutputStream extends OutputStream implements IStateful { final IArtifactSink artifactSink; final OutputStream artifactOutputStream; diff --git a/tycho-core/src/main/java/org/eclipse/tycho/p2tools/MirrorApplicationServiceImpl.java b/tycho-core/src/main/java/org/eclipse/tycho/p2tools/MirrorApplicationServiceImpl.java index f38cd9db2c..a715ef23a1 100644 --- a/tycho-core/src/main/java/org/eclipse/tycho/p2tools/MirrorApplicationServiceImpl.java +++ b/tycho-core/src/main/java/org/eclipse/tycho/p2tools/MirrorApplicationServiceImpl.java @@ -359,7 +359,7 @@ public void close() { } - private final class MappingRule { + private static final class MappingRule { public final String filter; public final String urlPattern; diff --git a/tycho-core/src/test/java/org/eclipse/tycho/test/util/LogVerifier.java b/tycho-core/src/test/java/org/eclipse/tycho/test/util/LogVerifier.java index 1f366ddd32..20009be152 100644 --- a/tycho-core/src/test/java/org/eclipse/tycho/test/util/LogVerifier.java +++ b/tycho-core/src/test/java/org/eclipse/tycho/test/util/LogVerifier.java @@ -38,7 +38,7 @@ public class LogVerifier extends Verifier { private static boolean WRITE_TO_CONSOLE = false; - private class MemoryLog implements Logger { + private static class MemoryLog implements Logger { final StringBuilder errors = new StringBuilder(); final StringBuilder warnings = new StringBuilder();