aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/com/vaadin/data/util/AbstractProperty.java4
-rw-r--r--src/com/vaadin/data/util/IndexedContainer.java3
-rw-r--r--src/com/vaadin/data/util/sqlcontainer/ColumnProperty.java3
-rw-r--r--src/com/vaadin/ui/AbstractField.java4
-rw-r--r--src/com/vaadin/ui/Label.java3
-rw-r--r--src/com/vaadin/ui/ProgressIndicator.java7
6 files changed, 14 insertions, 10 deletions
diff --git a/src/com/vaadin/data/util/AbstractProperty.java b/src/com/vaadin/data/util/AbstractProperty.java
index 0b943e5eae..2297f13734 100644
--- a/src/com/vaadin/data/util/AbstractProperty.java
+++ b/src/com/vaadin/data/util/AbstractProperty.java
@@ -66,7 +66,9 @@ public abstract class AbstractProperty implements Property,
@Deprecated
@Override
public String toString() {
- return getStringValue();
+ throw new UnsupportedOperationException(
+ "Use Property.getValue() instead of " + getClass()
+ + ".toString()");
}
/**
diff --git a/src/com/vaadin/data/util/IndexedContainer.java b/src/com/vaadin/data/util/IndexedContainer.java
index 67bb4f0dde..c9499d4aa8 100644
--- a/src/com/vaadin/data/util/IndexedContainer.java
+++ b/src/com/vaadin/data/util/IndexedContainer.java
@@ -917,7 +917,8 @@ public class IndexedContainer extends
@Deprecated
@Override
public String toString() {
- return getStringValue();
+ throw new UnsupportedOperationException(
+ "Use Property.getValue() instead of IndexedContainerProperty.toString()");
}
/**
diff --git a/src/com/vaadin/data/util/sqlcontainer/ColumnProperty.java b/src/com/vaadin/data/util/sqlcontainer/ColumnProperty.java
index 32cc9d09d4..c1474fc760 100644
--- a/src/com/vaadin/data/util/sqlcontainer/ColumnProperty.java
+++ b/src/com/vaadin/data/util/sqlcontainer/ColumnProperty.java
@@ -178,7 +178,8 @@ final public class ColumnProperty implements Property {
@Deprecated
@Override
public String toString() {
- return getStringValue();
+ throw new UnsupportedOperationException(
+ "Use ColumnProperty.getValue() instead of ColumnProperty.toString()");
}
/**
diff --git a/src/com/vaadin/ui/AbstractField.java b/src/com/vaadin/ui/AbstractField.java
index 8754d3cd53..007f851a72 100644
--- a/src/com/vaadin/ui/AbstractField.java
+++ b/src/com/vaadin/ui/AbstractField.java
@@ -410,7 +410,9 @@ public abstract class AbstractField extends AbstractComponent implements Field,
@Deprecated
@Override
public String toString() {
- return getStringValue();
+ throw new UnsupportedOperationException(
+ "Use Property.getValue() instead of " + getClass()
+ + ".toString()");
}
/**
diff --git a/src/com/vaadin/ui/Label.java b/src/com/vaadin/ui/Label.java
index 5a82b64243..c7504230e3 100644
--- a/src/com/vaadin/ui/Label.java
+++ b/src/com/vaadin/ui/Label.java
@@ -252,7 +252,8 @@ public class Label extends AbstractComponent implements Property,
@Deprecated
@Override
public String toString() {
- return getStringValue();
+ throw new UnsupportedOperationException(
+ "Use Property.getValue() instead of Label.toString()");
}
/**
diff --git a/src/com/vaadin/ui/ProgressIndicator.java b/src/com/vaadin/ui/ProgressIndicator.java
index 88e0edcd02..6f2758f323 100644
--- a/src/com/vaadin/ui/ProgressIndicator.java
+++ b/src/com/vaadin/ui/ProgressIndicator.java
@@ -155,11 +155,8 @@ public class ProgressIndicator extends AbstractField implements Property,
@Deprecated
@Override
public String toString() {
- if (dataSource == null) {
- throw new IllegalStateException("Datasource must be set");
- }
- Object value = dataSource.getValue();
- return (null != value) ? value.toString() : null;
+ throw new UnsupportedOperationException(
+ "Use Property.getValue() instead of ProgressIndicator.toString()");
}
/**