Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarvin Mueller2016-08-24 13:54:04 +0000
committerMarvin Mueller2016-08-29 08:31:22 +0000
commit6ba893fea869a24ed802eda7136c815e9e649257 (patch)
treeffdb5427379c049bd79c4de8bbaef9652f1a6d75
parentf693b2b1b13df9c311d25ba78a1d788ac26f32ef (diff)
downloadorg.eclipse.jubula.core-6ba893fea869a24ed802eda7136c815e9e649257.tar.gz
org.eclipse.jubula.core-6ba893fea869a24ed802eda7136c815e9e649257.tar.xz
org.eclipse.jubula.core-6ba893fea869a24ed802eda7136c815e9e649257.zip
Fix for Bug 500207 - remove unnecessary cast to String
-rw-r--r--org.eclipse.jubula.rc.swing/src/org/eclipse/jubula/rc/swing/tester/adapter/JListAdapter.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/org.eclipse.jubula.rc.swing/src/org/eclipse/jubula/rc/swing/tester/adapter/JListAdapter.java b/org.eclipse.jubula.rc.swing/src/org/eclipse/jubula/rc/swing/tester/adapter/JListAdapter.java
index c01e6f21f..678daf8da 100644
--- a/org.eclipse.jubula.rc.swing/src/org/eclipse/jubula/rc/swing/tester/adapter/JListAdapter.java
+++ b/org.eclipse.jubula.rc.swing/src/org/eclipse/jubula/rc/swing/tester/adapter/JListAdapter.java
@@ -108,10 +108,11 @@ public class JListAdapter extends JComponentAdapter implements IListComponent {
public Void run() throws StepExecutionException {
ListCellRenderer lcr = m_list.getCellRenderer();
if (lcr != null) {
- String text = (String) model.getElementAt(index);
- if (StringUtils.isNotBlank(text)) {
+ Object modelObject = model.getElementAt(index);
+ if (modelObject != null
+ && StringUtils.isNotBlank(modelObject.toString())) {
Component listItem = lcr.getListCellRendererComponent(
- m_list, model.getElementAt(index),
+ m_list, model.getElementAt(index),
index, false, false);
Dimension preferredSize = listItem.getPreferredSize();
r.setSize(preferredSize);

Back to the top