summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeItem.java
diff options
context:
space:
mode:
authorVeronika Irvine <veronika>2005-09-19 20:03:35 +0000
committerVeronika Irvine <veronika>2005-09-19 20:03:35 +0000
commit0544f6f5855f29761275bcdc67aab6604bc321ef (patch)
treeb2cbcdfe630cd12b882da7e3db3b9f5bc67f63ea /bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeItem.java
parent2849954ea3e22b6e64534691319f22480c6ea6c8 (diff)
downloadeclipse.platform.swt-0544f6f5855f29761275bcdc67aab6604bc321ef.tar.gz
eclipse.platform.swt-0544f6f5855f29761275bcdc67aab6604bc321ef.tar.xz
eclipse.platform.swt-0544f6f5855f29761275bcdc67aab6604bc321ef.zip
fix consistency for index range checking
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeItem.java')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeItem.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeItem.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeItem.java
index 2b58b706eb..5ce0442328 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeItem.java
@@ -185,18 +185,20 @@ TreeItem (Tree parent, int /*long*/ parentIter, int style, int index, boolean cr
}
}
+static int checkIndex (int index) {
+ if (index < 0) SWT.error (SWT.ERROR_INVALID_RANGE);
+ return index;
+}
+
static TreeItem checkNull (TreeItem item) {
if (item == null) SWT.error (SWT.ERROR_NULL_ARGUMENT);
return item;
}
+
static Tree checkNull (Tree control) {
if (control == null) SWT.error (SWT.ERROR_NULL_ARGUMENT);
return control;
}
-static int checkIndex (int index) {
- if (index < 0) SWT.error (SWT.ERROR_ITEM_NOT_ADDED);
- return index;
-}
protected void checkSubclass () {
if (!isValidSubclass ()) error (SWT.ERROR_INVALID_SUBCLASS);