Skip to content

Commit 41b346f

Browse files
committed
Nullability annotations change
1 parent 3b739fe commit 41b346f

File tree

3 files changed

+15
-15
lines changed

3 files changed

+15
-15
lines changed

src/main/java/org/jkiss/tools/rcplaunchconfig/Params.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*/
1717
package org.jkiss.tools.rcplaunchconfig;
1818

19-
import jakarta.annotation.Nonnull;
19+
import org.jkiss.code.NotNull;
2020
import picocli.CommandLine;
2121
import picocli.CommandLine.Option;
2222
import picocli.CommandLine.ParseResult;
@@ -53,7 +53,7 @@ public class Params {
5353
public boolean debug;
5454

5555

56-
public @Nonnull ParseResult init(String[] args) {
56+
public @NotNull ParseResult init(String[] args) {
5757
return new CommandLine(this)
5858
.parseArgs(args);
5959
}

src/main/java/org/jkiss/tools/rcplaunchconfig/producers/ConfigIniProducer.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
import com.dbeaver.osgi.dependency.processing.p2.P2RepositoryManager;
2323
import com.dbeaver.osgi.dependency.processing.p2.repository.RemoteP2BundleInfo;
2424
import com.dbeaver.osgi.dependency.processing.util.FileUtils;
25-
import jakarta.annotation.Nonnull;
26-
import jakarta.annotation.Nullable;
25+
import org.jkiss.code.NotNull;
26+
import org.jkiss.code.Nullable;
2727
import org.jkiss.tools.rcplaunchconfig.Params;
2828
import org.slf4j.Logger;
2929
import org.slf4j.LoggerFactory;
@@ -44,7 +44,7 @@ public class ConfigIniProducer {
4444

4545
public static Map<String, String> generateConfigIni(
4646
@Nullable Path osgiSplashPath,
47-
@Nonnull Collection<Set<BundleInfo>> bundles
47+
@NotNull Collection<Set<BundleInfo>> bundles
4848
) throws IOException {
4949
Map<String, String> result = new LinkedHashMap<>();
5050
if (osgiSplashPath != null) {
@@ -58,15 +58,15 @@ public static Map<String, String> generateConfigIni(
5858
return result;
5959
}
6060

61-
private static @Nonnull String getOsgiBundlesValue(@Nonnull Collection<Set<BundleInfo>> bundles) {
61+
private static @NotNull String getOsgiBundlesValue(@NotNull Collection<Set<BundleInfo>> bundles) {
6262
return bundles.stream()
6363
.flatMap(Collection::stream)
6464
.filter(it -> it.getPath() != null)
6565
.map(ConfigIniProducer::getBundleReference)
6666
.collect(Collectors.joining(","));
6767
}
6868

69-
private static @Nonnull String getBundleReference(@Nonnull BundleInfo bundleInfo) {
69+
private static @NotNull String getBundleReference(@NotNull BundleInfo bundleInfo) {
7070
var stringBuilder = new StringBuilder();
7171
stringBuilder.append("reference:");
7272
stringBuilder.append(getNormalizeFileReference(bundleInfo.getPath()));
@@ -78,15 +78,15 @@ public static Map<String, String> generateConfigIni(
7878
return stringBuilder.toString();
7979
}
8080

81-
private static @Nonnull String getBundleStartLevel(@Nonnull BundleInfo bundleInfo) {
81+
private static @NotNull String getBundleStartLevel(@NotNull BundleInfo bundleInfo) {
8282
if (bundleInfo.getStartLevel() != null) {
8383
return "@" + bundleInfo.getStartLevel() + ":start";
8484
} else {
8585
return "@default:default";
8686
}
8787
}
8888

89-
private static @Nonnull String getOsgiFrameworkValue() throws IOException {
89+
private static @NotNull String getOsgiFrameworkValue() throws IOException {
9090
var eclipsePluginsPath = PathsManager.INSTANCE.getEclipsePluginsPath();
9191
var file = FileUtils.findFirstChildByPackageName(eclipsePluginsPath, OSGI_FRAMEWORK_BUNDLE_NAME);
9292
if (file == null) {
@@ -109,11 +109,11 @@ public static Map<String, String> generateConfigIni(
109109
return file.getCanonicalPath();
110110
}
111111

112-
private static @Nonnull String getNormalizeFileReference(@Nonnull Path path) {
112+
private static @NotNull String getNormalizeFileReference(@NotNull Path path) {
113113
return getNormalizeFileReference(path.toString());
114114
}
115115

116-
private static @Nonnull String getNormalizeFileReference(@Nonnull String path) {
116+
private static @NotNull String getNormalizeFileReference(@NotNull String path) {
117117
return "file:" + path.replace('\\', '/');
118118
}
119119

src/main/java/org/jkiss/tools/rcplaunchconfig/producers/DevPropertiesProducer.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
import com.dbeaver.osgi.dependency.processing.BundleInfo;
2020
import com.dbeaver.osgi.dependency.processing.util.BundleValidator;
21-
import jakarta.annotation.Nonnull;
21+
import org.jkiss.code.NotNull;
2222

2323
import java.util.*;
2424
import java.util.stream.Collectors;
@@ -28,7 +28,7 @@ public class DevPropertiesProducer {
2828

2929
private static final String DEFAULT_CLASSPATH = "target/classes";
3030

31-
public static @Nonnull Map<String, String> generateDevProperties(@Nonnull Collection<Set<BundleInfo>> bundles) {
31+
public static @NotNull Map<String, String> generateDevProperties(@NotNull Collection<Set<BundleInfo>> bundles) {
3232
Map<String, String> result = new LinkedHashMap<>();
3333
for (var bundleInfos : bundles) {
3434
for (BundleInfo bundleInfo : bundleInfos) {
@@ -41,11 +41,11 @@ public class DevPropertiesProducer {
4141
return result;
4242
}
4343

44-
public static boolean isBundleAcceptable(@Nonnull String bundleName) {
44+
public static boolean isBundleAcceptable(@NotNull String bundleName) {
4545
return BundleValidator.isInternalBundle(bundleName);
4646
}
4747

48-
private static @Nonnull String generateValue(@Nonnull List<String> bundleClassPath) {
48+
private static @NotNull String generateValue(@NotNull List<String> bundleClassPath) {
4949
return Stream.concat(Stream.of(DEFAULT_CLASSPATH), bundleClassPath.stream())
5050
.collect(Collectors.joining(","));
5151
}

0 commit comments

Comments
 (0)