From f5509c395900254b2b3f3508b0a95cb930ec4389 Mon Sep 17 00:00:00 2001 From: David McKnight Date: Wed, 23 May 2007 14:58:05 +0000 Subject: [PATCH] [187732]check that attributes aren't null before using them --- .../services/dstore/files/DStoreHostFile.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/files/DStoreHostFile.java b/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/files/DStoreHostFile.java index 19e91175a27..11f308722ed 100644 --- a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/files/DStoreHostFile.java +++ b/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/files/DStoreHostFile.java @@ -325,15 +325,15 @@ public class DStoreHostFile implements IHostFile protected static String getAttribute(String attributes, int index) { - String[] str = attributes.split("\\"+IServiceConstants.TOKEN_SEPARATOR); //$NON-NLS-1$ - if (str.length > index) + if (attributes != null) { - return str[index]; - } - else - { - return null; + String[] str = attributes.split("\\"+IServiceConstants.TOKEN_SEPARATOR); //$NON-NLS-1$ + if (str.length > index) + { + return str[index]; + } } + return null; } public void renameTo(String newAbsolutePath)