Removal of deprecated UI methods
- removed deprecated addProp() methods from property panel
- removed deprecated DateTimeZone based withZone() method
Change-Id: I251ca70e49f37714e60cb5312a444baa0ef88bd8
diff --git a/core/api/src/main/java/org/onosproject/ui/table/cell/TimeFormatter.java b/core/api/src/main/java/org/onosproject/ui/table/cell/TimeFormatter.java
index f8b9757..9558925 100644
--- a/core/api/src/main/java/org/onosproject/ui/table/cell/TimeFormatter.java
+++ b/core/api/src/main/java/org/onosproject/ui/table/cell/TimeFormatter.java
@@ -30,7 +30,6 @@
import java.time.temporal.TemporalAccessor;
import java.util.Locale;
-import org.joda.time.DateTimeZone;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -90,19 +89,6 @@
return this;
}
- /**
- * Sets the time zone to use for formatting the time.
- *
- * @param zone time zone to use
- * @return self, for chaining
- *
- * @deprecated in 1.12.0
- */
- @Deprecated
- public TimeFormatter withZone(DateTimeZone zone) {
- return withZone(zone.toTimeZone().toZoneId());
- }
-
@Override
protected String nonNullFormat(Object value) {
if (value instanceof TemporalAccessor) {
diff --git a/core/api/src/main/java/org/onosproject/ui/topo/PropertyPanel.java b/core/api/src/main/java/org/onosproject/ui/topo/PropertyPanel.java
index 892a75d..f65cda0 100644
--- a/core/api/src/main/java/org/onosproject/ui/topo/PropertyPanel.java
+++ b/core/api/src/main/java/org/onosproject/ui/topo/PropertyPanel.java
@@ -166,86 +166,6 @@
return this;
}
- /*
- * The following degenerate forms of addProp(...) for backward compatibility.
- */
-
- /**
- * Adds a property to the panel data.
- * Note that the key is used as the label.
- *
- * @param key property key (also used as display label)
- * @param value property value
- * @return self, for chaining
- * @deprecated as of Loon (1.11) in deference to the localized version
- */
- @Deprecated
- public PropertyPanel addProp(String key, String value) {
- return addProp(key, key, value);
- }
-
- /**
- * Adds a property to the panel data, using a decimal formatter.
- * Note that the key is used as the label.
- *
- * @param key property key (also used as display label)
- * @param value property value
- * @return self, for chaining
- * @deprecated as of Loon (1.11) in deference to the localized version
- */
- @Deprecated
- public PropertyPanel addProp(String key, int value) {
- return addProp(key, key, value);
- }
-
- /**
- * Adds a property to the panel data, using a decimal formatter.
- * Note that the key is used as the label.
- *
- * @param key property key (also used as display label)
- * @param value property value
- * @return self, for chaining
- * @deprecated as of Loon (1.11) in deference to the localized version
- */
- @Deprecated
- public PropertyPanel addProp(String key, long value) {
- return addProp(key, key, value);
- }
-
- /**
- * Adds a property to the panel data. Note that the value's
- * {@link Object#toString toString()} method is used to convert the
- * value to a string.
- * Note also that the key is used as the label.
- *
- * @param key property key (also used as display label)
- * @param value property value
- * @return self, for chaining
- * @deprecated as of Loon (1.11) in deference to the localized version
- */
- @Deprecated
- public PropertyPanel addProp(String key, Object value) {
- return addProp(key, key, value);
- }
-
- /**
- * Adds a property to the panel data. Note that the value's
- * {@link Object#toString toString()} method is used to convert the
- * value to a string, from which the characters defined in the given
- * regular expression string are stripped.
- * Note also that the key is used as the label.
- *
- * @param key property key (also used as display label)
- * @param value property value
- * @param reStrip regexp characters to strip from value string
- * @return self, for chaining
- * @deprecated as of Loon (1.11) in deference to the localized version
- */
- @Deprecated
- public PropertyPanel addProp(String key, Object value, String reStrip) {
- return addProp(key, key, value, reStrip);
- }
-
/**
* Adds a separator to the panel data.
*
diff --git a/core/api/src/test/java/org/onosproject/ui/topo/PropertyPanelTest.java b/core/api/src/test/java/org/onosproject/ui/topo/PropertyPanelTest.java
index aeaa0ae..0a3e6b3 100644
--- a/core/api/src/test/java/org/onosproject/ui/topo/PropertyPanelTest.java
+++ b/core/api/src/test/java/org/onosproject/ui/topo/PropertyPanelTest.java
@@ -160,9 +160,9 @@
@Test
public void props() {
basic();
- pp.addProp(KEY_A, VALUE_A)
- .addProp(KEY_B, VALUE_B)
- .addProp(KEY_C, VALUE_C);
+ pp.addProp(KEY_A, KEY_A, VALUE_A)
+ .addProp(KEY_B, KEY_B, VALUE_B)
+ .addProp(KEY_C, KEY_C, VALUE_C);
assertEquals("bad props", 3, pp.properties().size());
validateProps(KEY_A, KEY_B, KEY_C);
}
@@ -181,7 +181,7 @@
@Test
public void nonLocalizedProp() {
basic();
- pp.addProp(KEY_A, VALUE_A);
+ pp.addProp(KEY_A, KEY_A, VALUE_A);
Prop p = pp.properties().get(0);
assertEquals("wrong key", KEY_A, p.key());
assertEquals("wrong label", KEY_A, p.label());
@@ -192,7 +192,7 @@
public void separator() {
props();
pp.addSeparator()
- .addProp(KEY_Z, VALUE_Z);
+ .addProp(KEY_Z, KEY_Z, VALUE_Z);
assertEquals("bad props", 5, pp.properties().size());
validateProps(KEY_A, KEY_B, KEY_C, SEP, KEY_Z);
@@ -210,16 +210,16 @@
public void adjustProps() {
props();
pp.removeProps(KEY_B, KEY_A);
- pp.addProp(KEY_Z, VALUE_Z);
+ pp.addProp(KEY_Z, KEY_Z, VALUE_Z);
validateProps(KEY_C, KEY_Z);
}
@Test
public void intValues() {
basic();
- pp.addProp(KEY_A, 200)
- .addProp(KEY_B, 2000)
- .addProp(KEY_C, 1234567);
+ pp.addProp(KEY_A, KEY_A, 200)
+ .addProp(KEY_B, KEY_B, 2000)
+ .addProp(KEY_C, KEY_C, 1234567);
validateProp(KEY_A, "200");
validateProp(KEY_B, "2,000");
@@ -229,10 +229,10 @@
@Test
public void longValues() {
basic();
- pp.addProp(KEY_A, 200L)
- .addProp(KEY_B, 2000L)
- .addProp(KEY_C, 1234567L)
- .addProp(KEY_Z, Long.MAX_VALUE);
+ pp.addProp(KEY_A, KEY_A, 200L)
+ .addProp(KEY_B, KEY_B, 2000L)
+ .addProp(KEY_C, KEY_C, 1234567L)
+ .addProp(KEY_Z, KEY_Z, Long.MAX_VALUE);
validateProp(KEY_A, "200");
validateProp(KEY_B, "2,000");
@@ -243,8 +243,8 @@
@Test
public void objectValue() {
basic();
- pp.addProp(KEY_A, new FooClass("a"))
- .addProp(KEY_B, new FooClass("bxyyzy"), "[xz]");
+ pp.addProp(KEY_A, KEY_A, new FooClass("a"))
+ .addProp(KEY_B, KEY_B, new FooClass("bxyyzy"), "[xz]");
validateProp(KEY_A, ">a<");
validateProp(KEY_B, ">byyy<");