Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/maven/maven-911259b911
Browse files Browse the repository at this point in the history
  • Loading branch information
eamonnmcmanus authored Oct 9, 2024
2 parents 55bcbc8 + 9471163 commit 4466b2f
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 3 deletions.
1 change: 1 addition & 0 deletions gson/src/main/java/com/google/gson/JsonIOException.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
* @author Inderjeet Singh
* @author Joel Leitch
*/
@SuppressWarnings("MemberName") // class name is part of the public API
public final class JsonIOException extends JsonParseException {
private static final long serialVersionUID = 1L;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
* @author Inderjeet Singh
* @author Joel Leitch
*/
@SuppressWarnings("MemberName") // legacy class name
public final class $Gson$Preconditions {
private $Gson$Preconditions() {
throw new UnsupportedOperationException();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
* @author Bob Lee
* @author Jesse Wilson
*/
@SuppressWarnings("MemberName") // legacy class name
public final class $Gson$Types {
static final Type[] EMPTY_TYPE_ARRAY = new Type[] {};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
*/
// Date parsing code from Jackson databind ISO8601Utils.java
// https://github.com/FasterXML/jackson-databind/blob/2.8/src/main/java/com/fasterxml/jackson/databind/util/ISO8601Utils.java
@SuppressWarnings("MemberName") // legacy class name
public class ISO8601Utils {
private ISO8601Utils() {}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

import static com.google.common.truth.Truth.assertThat;
import static org.junit.Assert.assertThrows;
import static org.junit.Assume.assumeNotNull;

import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
Expand Down Expand Up @@ -81,12 +80,12 @@ public void testBlockInaccessibleJava() throws ReflectiveOperationException {

// But serialization should succeed for classes with only public fields.
// Not many JDK classes have mutable public fields, thank goodness, but java.awt.Point does.
Class<?> pointClass = null;
Class<?> pointClass;
try {
pointClass = Class.forName("java.awt.Point");
} catch (ClassNotFoundException ignored) {
return; // If not found then we don't have AWT and the rest of the test can be skipped.
}
assumeNotNull(pointClass);
Constructor<?> pointConstructor = pointClass.getConstructor(int.class, int.class);
Object point = pointConstructor.newInstance(1, 2);
String json = gson.toJson(point);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ static class Manager extends Employee {
Employee[] minions;
}

@SuppressWarnings("MemberName")
static class CEO extends Manager {
Employee assistant;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,11 +187,13 @@ private static class Version1 {
int b = B;
}

@SuppressWarnings("MemberName")
private static class Version1_1 extends Version1 {
@Since(1.1)
int c = C;
}

@SuppressWarnings("MemberName")
@Since(1.2)
private static class Version1_2 extends Version1_1 {
@SuppressWarnings("unused")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
* Running Maven's {@code clean} phase is necessary due to a <a
* href="https://github.com/bndtools/bnd/issues/6221">bnd-maven-plugin bug</a>.
*/
@SuppressWarnings("MemberName") // class name must end with 'IT' for Maven Failsafe Plugin
public class OSGiManifestIT {
private static class ManifestData {
public final URL url;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import java.util.TimeZone;
import org.junit.Test;

@SuppressWarnings("MemberName") // class name
public class ISO8601UtilsTest {

private static TimeZone utcTimeZone() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
import org.junit.runners.Parameterized.Parameters;

/** Integration test verifying behavior of shrunken and obfuscated JARs. */
@SuppressWarnings("MemberName") // class name must end with 'IT' for Maven Failsafe Plugin
@RunWith(Parameterized.class)
public class ShrinkingIT {
// These JAR files are prepared by the Maven build
Expand Down

0 comments on commit 4466b2f

Please sign in to comment.