Skip to content

Commit

Permalink
Remove non null annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
laeubi committed Feb 10, 2023
1 parent f403a43 commit 20b2846
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@

import java.util.Objects;

import javax.annotation.Nonnull;

import org.osgi.framework.Version;

public class EEVersion implements Comparable<EEVersion> {
Expand Down Expand Up @@ -44,12 +42,12 @@ public static EEType fromName(String profileName) {
}

private static final Version JAVA8 = Version.parseVersion("1.8");
@Nonnull
private final Version version;
@Nonnull
private final EEType type;

public EEVersion(@Nonnull Version version, @Nonnull EEType type) {
public EEVersion(Version version, EEType type) {
Objects.requireNonNull(version);
Objects.requireNonNull(type);
this.version = version;
this.type = type;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@
import java.util.concurrent.ConcurrentHashMap;
import java.util.stream.Collectors;

import javax.annotation.Nonnull;

import org.apache.maven.execution.MavenSession;
import org.apache.maven.toolchain.Toolchain;
import org.apache.maven.toolchain.ToolchainManager;
Expand Down Expand Up @@ -72,8 +70,8 @@ private static Properties readProperties(final URL url) {
* @throws UnknownEnvironmentException
* if profileName is unknown.
*/
public static @Nonnull StandardExecutionEnvironment getExecutionEnvironment(String profileName,
ToolchainManager manager, MavenSession session, Logger logger) throws UnknownEnvironmentException {
public static StandardExecutionEnvironment getExecutionEnvironment(String profileName, ToolchainManager manager,
MavenSession session, Logger logger) throws UnknownEnvironmentException {
Map<String, StandardExecutionEnvironment> map = getExecutionEnvironmentsMap(manager, session, logger);
StandardExecutionEnvironment ee = map.get(profileName);
if (ee != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@
import java.util.Properties;
import java.util.Set;

import javax.annotation.Nonnull;
import javax.annotation.Nullable;

import org.apache.commons.io.FileUtils;
import org.apache.maven.toolchain.Toolchain;
import org.codehaus.plexus.logging.Logger;
Expand Down Expand Up @@ -89,17 +86,8 @@ public class StandardExecutionEnvironment implements Comparable<StandardExecutio
private final Toolchain toolchain;
private Logger logger;

/**
* Do no instantiate. Use factory method instead
* {@link ExecutionEnvironmentUtils#getExecutionEnvironment(String)}.
*/
@Deprecated
StandardExecutionEnvironment(@Nonnull Properties profileProperties) {
this(profileProperties, null, null);
}

/* package */ StandardExecutionEnvironment(@Nonnull Properties profileProperties, @Nullable Toolchain toolchain,
@Nullable Logger logger) {
/* package */ StandardExecutionEnvironment(Properties profileProperties, Toolchain toolchain, Logger logger) {
Objects.requireNonNull(profileProperties);
this.toolchain = toolchain;
this.profileName = profileProperties.getProperty(EquinoxConfiguration.PROP_OSGI_JAVA_PROFILE_NAME);
this.compilerSourceLevel = profileProperties.getProperty("org.eclipse.jdt.core.compiler.source");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
import java.util.List;
import java.util.Objects;

import javax.annotation.Nonnull;

import org.eclipse.tycho.ArtifactKey;
import org.eclipse.tycho.ClasspathEntry;
import org.eclipse.tycho.ReactorProject;
Expand All @@ -34,13 +32,11 @@ public class DefaultClasspathEntry implements ClasspathEntry {
private final Collection<AccessRule> rules;

public static class DefaultAccessRule implements AccessRule {
private final @Nonnull String pattern;
private final String pattern;
private final boolean discouraged;

public DefaultAccessRule(String path, boolean discouraged) {
if (path == null) {
throw new NullPointerException();
}
Objects.requireNonNull(path);

this.pattern = path;
this.discouraged = discouraged;
Expand Down

0 comments on commit 20b2846

Please sign in to comment.