Add deprecation notices

This commit is contained in:
Clément Fournier
2018-12-06 15:03:58 +01:00
parent c745ae1503
commit 3cbba391da
3 changed files with 25 additions and 1 deletions

View File

@ -16,7 +16,11 @@ import net.sourceforge.pmd.properties.builders.PropertyDescriptorBuilderConversi
*
* @author Brian Remedios
* @version Refactored June 2017 (6.0.0)
*
* @deprecated Use a {@code PropertyDescriptor<List<Long>>} instead. A builder is available from {@link PropertyFactory#longIntListProperty(String)}.
* This class will be removed in 7.0.0.
*/
@Deprecated
public final class LongMultiProperty extends AbstractMultiNumericProperty<Long> {
@ -31,7 +35,9 @@ public final class LongMultiProperty extends AbstractMultiNumericProperty<Long>
* @param theUIOrder UI order
*
* @throws IllegalArgumentException if {@literal min > max} or one of the defaults is not between the bounds
* @deprecated Use {@link PropertyFactory#longIntListProperty(String)}
*/
@Deprecated
public LongMultiProperty(String theName, String theDescription, Long min, Long max,
Long[] defaultValues, float theUIOrder) {
this(theName, theDescription, min, max, Arrays.asList(defaultValues), theUIOrder, false);
@ -56,7 +62,9 @@ public final class LongMultiProperty extends AbstractMultiNumericProperty<Long>
* @param theUIOrder UI order
*
* @throws IllegalArgumentException if {@literal min > max} or one of the defaults is not between the bounds
* @deprecated Use {@link PropertyFactory#longIntListProperty(String)}
*/
@Deprecated
public LongMultiProperty(String theName, String theDescription, Long min, Long max,
List<Long> defaultValues, float theUIOrder) {
this(theName, theDescription, min, max, defaultValues, theUIOrder, false);
@ -85,11 +93,15 @@ public final class LongMultiProperty extends AbstractMultiNumericProperty<Long>
}
/** @deprecated Use {@link PropertyFactory#longIntListProperty(String)} */
@Deprecated
public static LongMultiPBuilder named(String name) {
return new LongMultiPBuilder(name);
}
/** @deprecated Use {@link PropertyFactory#longIntListProperty(String)} */
@Deprecated
public static final class LongMultiPBuilder
extends MultiNumericPropertyBuilder<Long, LongMultiPBuilder> {

View File

@ -14,7 +14,11 @@ import net.sourceforge.pmd.properties.builders.SingleNumericPropertyBuilder;
* @author Brian Remedios
* @author Clément Fournier
* @version Refactored June 2017 (6.0.0)
*
* @deprecated Use a {@code PropertyDescriptor<Long>} instead. A builder is available from {@link PropertyFactory#longIntProperty(String)}.
* This class will be removed in 7.0.0.
*/
@Deprecated
public final class LongProperty extends AbstractNumericProperty<Long> {
@ -30,8 +34,9 @@ public final class LongProperty extends AbstractNumericProperty<Long> {
* @param theUIOrder UI order
*
* @throws IllegalArgumentException if {@literal min > max} or one of the defaults is not between the bounds
* @deprecated will be removed in 7.0.0
* @deprecated Use {@link PropertyFactory#longIntProperty(String)}
*/
@Deprecated
public LongProperty(String theName, String theDescription, String minStr, String maxStr, String defaultStr,
float theUIOrder) {
this(theName, theDescription, Long.valueOf(minStr), Long.valueOf(maxStr),
@ -57,7 +62,9 @@ public final class LongProperty extends AbstractNumericProperty<Long> {
* @param theUIOrder UI order
*
* @throws IllegalArgumentException if {@literal min > max} or one of the defaults is not between the bounds
* @deprecated Use {@link PropertyFactory#longIntProperty(String)}
*/
@Deprecated
public LongProperty(String theName, String theDescription, Long min, Long max, Long theDefault, float theUIOrder) {
this(theName, theDescription, min, max, theDefault, theUIOrder, false);
}
@ -85,11 +92,15 @@ public final class LongProperty extends AbstractNumericProperty<Long> {
}
/** @deprecated Use {@link PropertyFactory#longIntProperty(String)} */
@Deprecated
public static LongPBuilder named(String name) {
return new LongPBuilder(name);
}
/** @deprecated Use {@link PropertyFactory#longIntProperty(String)} */
@Deprecated
public static final class LongPBuilder extends SingleNumericPropertyBuilder<Long, LongPBuilder> {
private LongPBuilder(String name) {
super(name);

View File

@ -10,6 +10,7 @@ import java.util.List;
/**
* @author Clément Fournier
*/
@Deprecated
public class LongPropertyTest extends AbstractNumericPropertyDescriptorTester<Long> {
private static final long MIN = 10L;