import java.util.Collection;
import java.util.Collections;
import java.util.LinkedList;
+import java.util.logging.Logger;
import com.vaadin.data.Property;
@Deprecated
@Override
public String toString() {
- throw new UnsupportedOperationException(
- "Use Property.getValue() instead of " + getClass()
- + ".toString()");
+ getLogger()
+ .warning(
+ "You are using Property.toString() instead of getValue() to get the value for a "
+ + getClass().getSimpleName()
+ + ". This will not be supported starting from Vaadin 7.1 "
+ + "(your debugger might call toString() and cause this message to appear).");
+ T v = getValue();
+ if (v == null) {
+ return null;
+ }
+ return v.toString();
}
/* Events */
return Collections.EMPTY_LIST;
}
+ private static Logger getLogger() {
+ return Logger.getLogger(AbstractProperty.class.getName());
+ }
}
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
+import java.util.logging.Logger;
import com.vaadin.data.Container;
import com.vaadin.data.Item;
@Deprecated
@Override
public String toString() {
- throw new UnsupportedOperationException(
- "Use Property.getValue() instead of IndexedContainerProperty.toString()");
+ getLogger()
+ .warning(
+ "You are using IndexedContainerProperty.toString() instead of getValue() to get the value for a "
+ + getClass().getSimpleName()
+ + ". This will not be supported starting from Vaadin 7.1 "
+ + "(your debugger might call toString() and cause this message to appear).");
+ Object v = getValue();
+ if (v == null) {
+ return null;
+ }
+ return v.toString();
+ }
+
+ private Logger getLogger() {
+ return Logger.getLogger(IndexedContainerProperty.class.getName());
}
/**
import java.sql.Date;
import java.sql.Time;
import java.sql.Timestamp;
+import java.util.logging.Logger;
import com.vaadin.data.Property;
import com.vaadin.data.util.converter.Converter.ConversionException;
@Deprecated
@Override
public String toString() {
- throw new UnsupportedOperationException(
- "Use ColumnProperty.getValue() instead of ColumnProperty.toString()");
+ getLogger()
+ .warning(
+ "You are using ColumnProperty.toString() instead of getValue() to get the value for a "
+ + getClass().getSimpleName()
+ + ". This will not be supported starting from Vaadin 7.1 "
+ + "(your debugger might call toString() and cause this message to appear).");
+ Object v = getValue();
+ if (v == null) {
+ return null;
+ }
+ return v.toString();
+ }
+
+ private static Logger getLogger() {
+ return Logger.getLogger(ColumnProperty.class.getName());
}
public void setOwner(RowItem owner) {