Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigate Maven 3.9.0 #2084

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
<cipherVersion>2.0</cipherVersion>
<pluginToolsVersion>3.7.1</pluginToolsVersion>
<jgit-version>6.4.0.202211300538-r</jgit-version>
<maven-version>3.8.7</maven-version>
<maven-version>3.9.0</maven-version>
<!-- When updating surefire version, double-check Import-Package statements generated by bnd-maven-plugin and possibly adapt instructions in various bnd.bnd files -->
<!-- Stick to 3.0.0-M5 because of https://github.com/eclipse-tycho/tycho/issues/879 / https://issues.apache.org/jira/projects/SUREFIRE/issues/SUREFIRE-2072 -->
<surefire-version>3.0.0-M8</surefire-version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@

import java.util.Objects;

import javax.annotation.Nonnull;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No longer using javax.annotation.Nonnull is a good move, but removal looks like a step backwards, no?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given that (I haven counted them) there are many hundreds of file not suing it compared to only these few its jsut a baby-step :-)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a baby-step backwards, so not a big deal indeed, fair enough :)


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