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 2018/10/12 20:47:25 UTC
svn commit: r1843701 - in /commons/proper/beanutils/trunk/src:
changes/changes.xml
main/java/org/apache/commons/beanutils2/converters/BooleanConverter.java
test/java/org/apache/commons/beanutils2/converters/BooleanConverterTestCase.java
Author: ggregory
Date: Fri Oct 12 20:47:25 2018
New Revision: 1843701
URL: http://svn.apache.org/viewvc?rev=1843701&view=rev
Log:
[BEANUTILS-514] Remove deprecated code for 2.0.0. Last deprecation from 1.x removed.
Modified:
commons/proper/beanutils/trunk/src/changes/changes.xml
commons/proper/beanutils/trunk/src/main/java/org/apache/commons/beanutils2/converters/BooleanConverter.java
commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils2/converters/BooleanConverterTestCase.java
Modified: commons/proper/beanutils/trunk/src/changes/changes.xml
URL: http://svn.apache.org/viewvc/commons/proper/beanutils/trunk/src/changes/changes.xml?rev=1843701&r1=1843700&r2=1843701&view=diff
==============================================================================
--- commons/proper/beanutils/trunk/src/changes/changes.xml (original)
+++ commons/proper/beanutils/trunk/src/changes/changes.xml Fri Oct 12 20:47:25 2018
@@ -29,7 +29,7 @@
</properties>
<body>
- <release version="2.0.0" date="2017-MM-DD" description="Update from Java 6 to 7, update from Apache Commons Collection 3 to 4.">
+ <release version="2.0.0" date="2018-MM-DD" description="Update from Java 6 to 7, update from Apache Commons Collection 3 to 4.">
<action issue="BEANUTILS-504" dev="ggregory" type="update" due-to="Gary Gregory">
Update from Java 6 to 7.
</action>
Modified: commons/proper/beanutils/trunk/src/main/java/org/apache/commons/beanutils2/converters/BooleanConverter.java
URL: http://svn.apache.org/viewvc/commons/proper/beanutils/trunk/src/main/java/org/apache/commons/beanutils2/converters/BooleanConverter.java?rev=1843701&r1=1843700&r2=1843701&view=diff
==============================================================================
--- commons/proper/beanutils/trunk/src/main/java/org/apache/commons/beanutils2/converters/BooleanConverter.java (original)
+++ commons/proper/beanutils/trunk/src/main/java/org/apache/commons/beanutils2/converters/BooleanConverter.java Fri Oct 12 20:47:25 2018
@@ -38,13 +38,6 @@ package org.apache.commons.beanutils2.co
* ConvertUtils.register(bc, Boolean.class);
* ConvertUtils.register(bc, Boolean.TYPE);
* </pre>
- * <p>In addition, it is recommended that the BooleanArrayConverter also be
- * modified to recognise the same set of values:</p>
- * <pre>
- * Converter bac = new BooleanArrayConverter(bc, BooleanArrayConverter.NO_DEFAULT);
- * ConvertUtils.register(bac, bac.MODEL);
- * </pre>
- *
*
* <p>Case is ignored when converting values to true or false.</p>
*
@@ -81,10 +74,7 @@ public final class BooleanConverter exte
* in which case this constructor acts like the no-argument one.
*/
public BooleanConverter(final Object defaultValue) {
- super();
- if (defaultValue != NO_DEFAULT) {
- setDefaultValue(defaultValue);
- }
+ super(defaultValue);
}
/**
@@ -136,27 +126,16 @@ public final class BooleanConverter exte
*/
public BooleanConverter(final String[] trueStrings, final String[] falseStrings,
final Object defaultValue) {
- super();
+ super(defaultValue);
this.trueStrings = copyStrings(trueStrings);
this.falseStrings = copyStrings(falseStrings);
- if (defaultValue != NO_DEFAULT) {
- setDefaultValue(defaultValue);
- }
}
// ----------------------------------------------------- Static Variables
- /**
- * This is a special reference that can be passed as the "default object"
- * to the constructor to indicate that no default is desired. Note that
- * the value 'null' cannot be used for this purpose, as the caller may
- * want a null to be returned as the default.
- * @deprecated Use constructors without default value.
- */
- @Deprecated
- public static final Object NO_DEFAULT = new Object();
+
// ----------------------------------------------------- Instance Variables
Modified: commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils2/converters/BooleanConverterTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils2/converters/BooleanConverterTestCase.java?rev=1843701&r1=1843700&r2=1843701&view=diff
==============================================================================
--- commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils2/converters/BooleanConverterTestCase.java (original)
+++ commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils2/converters/BooleanConverterTestCase.java Fri Oct 12 20:47:25 2018
@@ -75,7 +75,7 @@ public class BooleanConverterTestCase ex
final String[] trueStrings = {"sure"};
final String[] falseStrings = {"nope"};
final BooleanConverter converter = new BooleanConverter(
- trueStrings, falseStrings, BooleanConverter.NO_DEFAULT);
+ trueStrings, falseStrings);
testConversionValues(
converter,
new String[] {"sure", "Sure"},