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

Remove warning suppressions that are now redundant #715

Merged
merged 1 commit into from
Apr 22, 2022
Merged
Show file tree
Hide file tree
Changes from all 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 src/main/java/org/kiwiproject/io/KiwiPaths.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public class KiwiPaths {
* @return the {@link Path} of the given resource name
* @see Resources#getResource(String)
*/
@SuppressWarnings("UnstableApiUsage") // because Guava's Resources has been around for a long time
// because Guava's Resources has been around for a long time
public static Path pathFromResourceName(String resourceName) {
try {
return Paths.get(Resources.getResource(resourceName).toURI());
Expand Down
1 change: 0 additions & 1 deletion src/main/java/org/kiwiproject/jsch/KiwiJSchHelpers.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ public static void setSessionKeyExchangeType(Session session, String keyExchange
session.setConfig("server_host_key", keyExchangeType);
}

@SuppressWarnings("UnstableApiUsage")
private static boolean hostMatchesKnownHost(String hostOrIpToFind, HostKey hostKey) {
var knownHost = new KnownHost(hostKey);
if (InetAddresses.isInetAddress(hostOrIpToFind)) {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/kiwiproject/net/CidrRange.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package org.kiwiproject.net;

import com.google.common.net.InetAddresses;

import java.math.BigInteger;
import java.net.InetAddress;
import java.nio.ByteBuffer;
Expand All @@ -12,7 +13,6 @@
* <a href="https://github.com/edazdarevic/CIDRUtils">https://github.com/edazdarevic/CIDRUtils</a> which has not been
* updated since 2019 and seems to be unmaintained.
*/
@SuppressWarnings("UnstableApiUsage")
public class CidrRange {

private final InetAddress inetAddress;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
* <p>
* Last, note that {@link SimpleHostInfo} <em>only contains the host name and host address as a string</em>.
*/
@SuppressWarnings("UnstableApiUsage") // Because Guava's InetAddresses is marked @Beta (but has been there a long time)
@UtilityClass
@Slf4j
public class KiwiInternetAddresses {
Expand Down
1 change: 0 additions & 1 deletion src/main/java/org/kiwiproject/net/SimpleHostAndPort.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
*/
@EqualsAndHashCode
@AllArgsConstructor(access = AccessLevel.PRIVATE)
@SuppressWarnings("UnstableApiUsage") // Because Guava's InetAddresses is marked @Beta (but has been there a long time)
public class SimpleHostAndPort {

@Getter
Expand Down
4 changes: 2 additions & 2 deletions src/test/java/org/kiwiproject/internal/Fixtures.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public class Fixtures {

public static String fixture(String resourceName) {
try {
@SuppressWarnings("UnstableApiUsage") var url = Resources.getResource(resourceName);
var url = Resources.getResource(resourceName);
var path = Paths.get(url.toURI());
return Files.readString(path, StandardCharsets.UTF_8);
} catch (URISyntaxException | IOException e) {
Expand All @@ -28,7 +28,7 @@ public static String fixture(String resourceName) {
}

public static Path fixturePath(String resourceName) {
@SuppressWarnings("UnstableApiUsage") var url = Resources.getResource(resourceName);
var url = Resources.getResource(resourceName);
try {
return Paths.get(url.toURI());
} catch (URISyntaxException e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,6 @@ static Stream<String> utf8ContentStream() {
* "Stolen" from {@link io.dropwizard.testing.FixtureHelpers} since they made it private there for whatever
* reason! Renamed so as not to collide with the fixture method.
*/
@SuppressWarnings("UnstableApiUsage")
private static String fixtureWithCharset(String filename, Charset charset) {
try {
return Resources.toString(Resources.getResource(filename), charset).trim();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,6 @@ void shouldRemoveNestedPaths(SoftAssertions softly) {
Map.of("foo2", "bar2")
);

//noinspection unchecked
softly.assertThat(newSampleObject.getObjectMap())
.containsOnlyKeys("key1", "key2", "key4")
.contains(entry("key4", List.of(4.2)));
Expand Down Expand Up @@ -1161,4 +1160,4 @@ static class Limited {
static class All extends Limited {
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import java.util.List;
import java.util.function.Supplier;

@SuppressWarnings("UnstableApiUsage")
@DisplayName("KiwiInternetAddresses")
class KiwiInternetAddressesTest {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ public class SecureTestConstants {
LOG.info("Set JKS_FILE_PATH to {}", JKS_FILE_PATH);
}

@SuppressWarnings("UnstableApiUsage")
private static String getJksFilePath() {
try {
var uri = Resources.getResource(SecureTestConstants.JKS_FILE_NAME).toURI();
Expand Down