You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2016/06/13 06:57:56 UTC
svn commit: r1748095 -
/commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVPrinterTest.java
Author: ggregory
Date: Mon Jun 13 06:57:56 2016
New Revision: 1748095
URL: http://svn.apache.org/viewvc?rev=1748095&view=rev
Log:
Use Java 7 method instead of Apache Commons Lang 3.
Modified:
commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVPrinterTest.java
Modified: commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVPrinterTest.java
URL: http://svn.apache.org/viewvc/commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVPrinterTest.java?rev=1748095&r1=1748094&r2=1748095&view=diff
==============================================================================
--- commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVPrinterTest.java (original)
+++ commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVPrinterTest.java Mon Jun 13 06:57:56 2016
@@ -35,9 +35,9 @@ import java.util.Date;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
+import java.util.Objects;
import java.util.Random;
-import org.apache.commons.lang3.ObjectUtils;
import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;
@@ -111,7 +111,7 @@ public class CSVPrinterTest {
private <T> T[] expectNulls(final T[] original, final CSVFormat csvFormat) {
final T[] fixed = original.clone();
for (int i = 0; i < fixed.length; i++) {
- if (ObjectUtils.equals(csvFormat.getNullString(), fixed[i])) {
+ if (Objects.equals(csvFormat.getNullString(), fixed[i])) {
fixed[i] = null;
}
}
Re: svn commit: r1748095 - /commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVPrinterTest.java
Posted by Gary Gregory <ga...@gmail.com>.
On Sun, Jun 12, 2016 at 11:59 PM, Benedikt Ritter <br...@apache.org>
wrote:
> Can we drop the dependency to lang3 now?
>
Nope, it's still used by the benchmarks. It's a test-only dependency, no
big deal IMO.
Gary
> Benedikt
>
> <gg...@apache.org> schrieb am Mo., 13. Juni 2016 um 08:57:
>
> > Author: ggregory
> > Date: Mon Jun 13 06:57:56 2016
> > New Revision: 1748095
> >
> > URL: http://svn.apache.org/viewvc?rev=1748095&view=rev
> > Log:
> > Use Java 7 method instead of Apache Commons Lang 3.
> >
> > Modified:
> >
> >
> commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVPrinterTest.java
> >
> > Modified:
> >
> commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVPrinterTest.java
> > URL:
> >
> http://svn.apache.org/viewvc/commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVPrinterTest.java?rev=1748095&r1=1748094&r2=1748095&view=diff
> >
> >
> ==============================================================================
> > ---
> >
> commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVPrinterTest.java
> > (original)
> > +++
> >
> commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVPrinterTest.java
> > Mon Jun 13 06:57:56 2016
> > @@ -35,9 +35,9 @@ import java.util.Date;
> > import java.util.Iterator;
> > import java.util.LinkedList;
> > import java.util.List;
> > +import java.util.Objects;
> > import java.util.Random;
> >
> > -import org.apache.commons.lang3.ObjectUtils;
> > import org.junit.Assert;
> > import org.junit.Ignore;
> > import org.junit.Test;
> > @@ -111,7 +111,7 @@ public class CSVPrinterTest {
> > private <T> T[] expectNulls(final T[] original, final CSVFormat
> > csvFormat) {
> > final T[] fixed = original.clone();
> > for (int i = 0; i < fixed.length; i++) {
> > - if (ObjectUtils.equals(csvFormat.getNullString(),
> fixed[i])) {
> > + if (Objects.equals(csvFormat.getNullString(), fixed[i])) {
> > fixed[i] = null;
> > }
> > }
> >
> >
> >
>
--
E-Mail: garydgregory@gmail.com | ggregory@apache.org
Java Persistence with Hibernate, Second Edition
<http://www.manning.com/bauer3/>
JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
Spring Batch in Action <http://www.manning.com/templier/>
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory
Re: svn commit: r1748095 - /commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVPrinterTest.java
Posted by Benedikt Ritter <br...@apache.org>.
Can we drop the dependency to lang3 now?
Benedikt
<gg...@apache.org> schrieb am Mo., 13. Juni 2016 um 08:57:
> Author: ggregory
> Date: Mon Jun 13 06:57:56 2016
> New Revision: 1748095
>
> URL: http://svn.apache.org/viewvc?rev=1748095&view=rev
> Log:
> Use Java 7 method instead of Apache Commons Lang 3.
>
> Modified:
>
> commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVPrinterTest.java
>
> Modified:
> commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVPrinterTest.java
> URL:
> http://svn.apache.org/viewvc/commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVPrinterTest.java?rev=1748095&r1=1748094&r2=1748095&view=diff
>
> ==============================================================================
> ---
> commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVPrinterTest.java
> (original)
> +++
> commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVPrinterTest.java
> Mon Jun 13 06:57:56 2016
> @@ -35,9 +35,9 @@ import java.util.Date;
> import java.util.Iterator;
> import java.util.LinkedList;
> import java.util.List;
> +import java.util.Objects;
> import java.util.Random;
>
> -import org.apache.commons.lang3.ObjectUtils;
> import org.junit.Assert;
> import org.junit.Ignore;
> import org.junit.Test;
> @@ -111,7 +111,7 @@ public class CSVPrinterTest {
> private <T> T[] expectNulls(final T[] original, final CSVFormat
> csvFormat) {
> final T[] fixed = original.clone();
> for (int i = 0; i < fixed.length; i++) {
> - if (ObjectUtils.equals(csvFormat.getNullString(), fixed[i])) {
> + if (Objects.equals(csvFormat.getNullString(), fixed[i])) {
> fixed[i] = null;
> }
> }
>
>
>