Skip to content

Commit

Permalink
Fixed #277 - Remove Deprecated Code
Browse files Browse the repository at this point in the history
  • Loading branch information
khmarbaise committed Dec 30, 2022
1 parent c2a9882 commit d7ffd0f
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 90 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,18 +132,6 @@ public ArchiveAssert isEqualTo(Object expected) {
return myself;
}

/**
* @throws UnsupportedOperationException if this method is called.
* @implNote java:S1133: Suppressing "Do not forget to remove this deprecated code someday." message.
* @deprecated use {@link #isEqualTo} instead
*/
@Override
@Deprecated
@SuppressWarnings("java:S1133")
public boolean equals(Object obj) {
throw new UnsupportedOperationException("'equals' is not supported...maybe you intended to call 'isEqualTo'");
}

/**
* Always returns 1.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,18 +185,6 @@ public ListAssert<String> plain() {
return new ListAssert<>(Helper.logs(this.actual.getLog()));
}

/**
* @throws UnsupportedOperationException if this method is called.
* @implNote java:S1133: Suppressing "Do not forget to remove this deprecated code someday." message.
* @deprecated use {@link #isEqualTo} instead
*/
@Override
@Deprecated
@SuppressWarnings("java:S1133")
public boolean equals(Object obj) {
throw new UnsupportedOperationException("'equals' is not supported...maybe you intended to call 'isEqualTo'");
}

/**
* Always returns 1.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,19 +46,6 @@ public static MavenCacheResultAssert assertThat(MavenCacheResult actual) {
return new MavenCacheResultAssert(actual);
}

/**
* @deprecated use {@link #isEqualTo} instead
*
* @throws UnsupportedOperationException if this method is called.
* @implNote java:S1133: Suppressing "Do not forget to remove this deprecated code someday." message.
*/
@Override
@Deprecated
@SuppressWarnings("java:S1133")
public boolean equals(Object obj) {
throw new UnsupportedOperationException("'equals' is not supported...maybe you intended to call 'isEqualTo'");
}

/**
* Always returns 1.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,18 +121,6 @@ public MavenExecutionResultAssert isFailure() {
return myself;
}

/**
* @throws UnsupportedOperationException if this method is called.
* @implNote java:S1133: Suppressing "Do not forget to remove this deprecated code someday." message.
* @deprecated use {@link #isEqualTo} instead
*/
@Override
@Deprecated
@SuppressWarnings("java:S1133")
public boolean equals(Object obj) {
throw new UnsupportedOperationException("'equals' is not supported...maybe you intended to call 'isEqualTo'");
}

/**
* Always returns 1.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,18 +187,6 @@ public ListAssert<String> plain() {
return new ListAssert<>(Helper.logs(this.actual.getStdout()));
}

/**
* @throws UnsupportedOperationException if this method is called.
* @implNote java:S1133: Suppressing "Do not forget to remove this deprecated code someday." message.
* @deprecated use {@link #isEqualTo} instead
*/
@Override
@Deprecated
@SuppressWarnings("java:S1133")
public boolean equals(Object obj) {
throw new UnsupportedOperationException("'equals' is not supported...maybe you intended to call 'isEqualTo'");
}

/**
* Always returns 1.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,18 +233,6 @@ private boolean isReadable(Path path) {
return Files.isReadable(path);
}

/**
* @throws UnsupportedOperationException if this method is called.
* @implNote java:S1133: Suppressing "Do not forget to remove this deprecated code someday." message.
* @deprecated use {@link #isEqualTo} instead
*/
@Override
@Deprecated
@SuppressWarnings("java:S1133")
public boolean equals(Object obj) {
throw new UnsupportedOperationException("'equals' is not supported...maybe you intended to call 'isEqualTo'");
}

/**
* Always returns 1.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,11 @@
import org.apiguardian.api.API;
import org.codehaus.plexus.util.xml.pull.XmlPullParserException;

import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.nio.file.Files;
import java.nio.file.Path;

import static org.apiguardian.api.API.Status.DEPRECATED;
import static org.apiguardian.api.API.Status.EXPERIMENTAL;

/**
Expand All @@ -56,21 +54,6 @@ public static Model readProject(InputStream inputStream) {
}
}

/**
* @param pomFile The directory where to read the {@code pom.xml} from.
* @return The {@link Model}
* @deprecated This method will be removed with release 0.13.0. Use {@code readProject(Path pomFile)} instead.
*/
@API(status = DEPRECATED, since = "0.12.0")
@Deprecated
public static Model readProject(File pomFile) {
try (InputStream is = Files.newInputStream(pomFile.toPath())) {
return readProject(is);
} catch (IOException e) {
throw new IllegalStateException("Failed to read pom.xml", e);
}
}

/**
* @param pomFile The directory where to read the {@code pom.xml} from.
* @return The {@link Model}
Expand Down

0 comments on commit d7ffd0f

Please sign in to comment.