Kaydet (Commit) 97da76a1 authored tarafından Noel Grandin's avatar Noel Grandin

cid#1326131 'Constant' variable guards dead code

Change-Id: I832b2fc243404a6ae9796ad994e901880d3b9260
üst b4da5037
......@@ -234,24 +234,19 @@ public class Desktop
}
/**
* Checks if the passed Element Name already exists in the list If yes it appends a
* suffix to make it unique
* Checks if the passed Element Name already exists in the list. If yes it appends a
* suffix to make it unique.
* @return a unique Name not being in the passed list.
*/
public static String getUniqueName(String[] _slist, String _sElementName, String _sSuffixSeparator)
{
int a = 2;
String scompname = _sElementName;
boolean bElementexists = true;
if (_slist == null)
if (_slist == null || _slist.length == 0)
{
return _sElementName;
}
if (_slist.length == 0)
{
return _sElementName;
}
while (bElementexists)
String scompname = _sElementName;
int a = 2;
while (true)
{
for (int i = 0; i < _slist.length; i++)
{
......@@ -262,7 +257,6 @@ public class Desktop
}
scompname = _sElementName + _sSuffixSeparator + a++;
}
return PropertyNames.EMPTY_STRING;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment