Skip to content

Commit

Permalink
add nullity annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
Revxrsal committed Dec 21, 2024
1 parent 556cda7 commit 5de9fff
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 16 deletions.
6 changes: 3 additions & 3 deletions api/src/main/java/revxrsal/zapper/DependencyManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -107,16 +107,16 @@ public void dependency(@NotNull Dependency dependency) {
dependencies.add(dependency);
}

public void dependency(String dependency) {
public void dependency(@NotNull String dependency) {
String[] parts = COLON.split(dependency);
dependencies.add(new Dependency(parts[0], parts[1], parts[2]));
}

public void dependency(String groupId, String artifactId, String version) {
public void dependency(@NotNull String groupId, @NotNull String artifactId, @NotNull String version) {
dependencies.add(new Dependency(groupId, artifactId, version));
}

public void relocate(Relocation relocation) {
public void relocate(@NotNull Relocation relocation) {
relocations.add(relocation);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,19 @@

public final class RuntimeLibPluginConfiguration {

private final String libsFolder;
private final String relocationPrefix;
private final List<Dependency> dependencies;
private final List<Repository> repositories;
private final List<Relocation> relocations;

RuntimeLibPluginConfiguration(String libsFolder, String relocationPrefix, List<Dependency> dependencies, List<Repository> repositories, List<Relocation> relocations) {
private final @NotNull String libsFolder;
private final @NotNull String relocationPrefix;
private final @NotNull List<Dependency> dependencies;
private final @NotNull List<Repository> repositories;
private final @NotNull List<Relocation> relocations;

RuntimeLibPluginConfiguration(
@NotNull String libsFolder,
@NotNull String relocationPrefix,
@NotNull List<Dependency> dependencies,
@NotNull List<Repository> repositories,
@NotNull List<Relocation> relocations
) {
this.libsFolder = libsFolder;
this.relocationPrefix = relocationPrefix;
this.dependencies = dependencies;
Expand Down Expand Up @@ -105,23 +111,23 @@ public final class RuntimeLibPluginConfiguration {
}
}

public String getLibsFolder() {
public @NotNull String getLibsFolder() {
return this.libsFolder;
}

public String getRelocationPrefix() {
public @NotNull String getRelocationPrefix() {
return this.relocationPrefix;
}

public List<Dependency> getDependencies() {
public @NotNull List<Dependency> getDependencies() {
return this.dependencies;
}

public List<Repository> getRepositories() {
public @NotNull List<Repository> getRepositories() {
return this.repositories;
}

public List<Relocation> getRelocations() {
public @NotNull List<Relocation> getRelocations() {
return this.relocations;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
*/
package revxrsal.zapper.classloader;

import org.jetbrains.annotations.NotNull;

import java.net.URL;
import java.net.URLClassLoader;

Expand All @@ -40,7 +42,7 @@ public IsolatedClassLoader() {
super(new URL[0]);
}

public IsolatedClassLoader(URL[] urls) {
public IsolatedClassLoader(@NotNull URL[] urls) {
/*
* ClassLoader#getSystemClassLoader returns the AppClassLoader
*
Expand Down

0 comments on commit 5de9fff

Please sign in to comment.