Skip to content

Commit

Permalink
Upgrade to commons-lang3 for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
theigl committed Mar 28, 2023
1 parent 19e24e0 commit c6c33c7
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 15 deletions.
6 changes: 3 additions & 3 deletions pom.xml
Expand Up @@ -81,9 +81,9 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.6</version>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.12.0</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
4 changes: 2 additions & 2 deletions test-jdk14/com/esotericsoftware/kryo/TestDataJava14.java
Expand Up @@ -19,8 +19,8 @@

package com.esotericsoftware.kryo;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;

/** Test data for {@link com.esotericsoftware.kryo.serializers.RecordSerializerTest}.
* @author Julia Boes <julia.boes@oracle.com>
Expand Down
8 changes: 4 additions & 4 deletions test/com/esotericsoftware/kryo/ReflectionAssert.java
Expand Up @@ -19,6 +19,8 @@

package com.esotericsoftware.kryo;

import org.apache.commons.lang3.StringUtils;

import static org.junit.jupiter.api.Assertions.*;

import java.lang.reflect.Field;
Expand All @@ -35,15 +37,13 @@
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicLong;

import org.apache.commons.lang.StringUtils;

/** An assertion utility that provides reflection based assertion, with improvements compared to commons-lang's
* EqualsBuilder#reflectionEquals and unitils' ReflectionassertReflectionEquals. */
class ReflectionAssert {

/** Checks both objects for equality using reflection. There are special equal checks implemented for some types like
* {@link Set} and {@link Map} that are not available in
* {@link org.apache.commons.lang.builder.EqualsBuilder#reflectionEquals(Object, Object)} . Collections must be of the same
* {@link org.apache.commons.lang3.builder.EqualsBuilder#reflectionEquals(Object, Object, String...)} . Collections must be of the same
* implementation, basically {@link #assertReflectionEquals(Object, Object, boolean)} is invoked with <code>true</code> for
* param <code>requireMatchingCollectionClasses</code>.
*
Expand All @@ -57,7 +57,7 @@ static void assertReflectionEquals (final Object one, final Object another) {

/** Checks both objects for equality using reflection. There are special equal checks implemented for some types like
* {@link Set} and {@link Map} that are not available in
* {@link org.apache.commons.lang.builder.EqualsBuilder#reflectionEquals(Object, Object)} .
* {@link org.apache.commons.lang3.builder.EqualsBuilder#reflectionEquals(Object, Object, String...)} .
*
* @param one one of both objects to compare.
* @param another one of both objects to compare.
Expand Down
Expand Up @@ -20,6 +20,8 @@
package com.esotericsoftware.kryo;

import com.esotericsoftware.kryo.SerializationCompatTestData.Person.Gender;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;

import java.io.Serializable;
import java.math.BigDecimal;
Expand Down Expand Up @@ -66,9 +68,6 @@
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicLong;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;

/** Testdata for serialization compatibility check. */
@SuppressWarnings("unused")
class SerializationCompatTestData {
Expand Down
Expand Up @@ -33,7 +33,7 @@
import java.util.List;
import java.util.Objects;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.junit.jupiter.api.Test;

/** @author Nathan Sweet */
Expand Down
Expand Up @@ -32,7 +32,7 @@
import java.util.List;
import java.util.Map;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.junit.jupiter.api.Test;
import org.objenesis.strategy.StdInstantiatorStrategy;

Expand Down
Expand Up @@ -40,7 +40,7 @@
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentSkipListMap;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.junit.jupiter.api.Test;

/** @author Nathan Sweet */
Expand Down

0 comments on commit c6c33c7

Please sign in to comment.