Skip to content
Snippets Groups Projects
Commit 6471b1b4 authored by cramakri's avatar cramakri
Browse files

LMS-1811 Moved the place where a conversion from DataSetInformation to String happens.

SVN: 18287
parent 8c2b86c0
No related branches found
No related tags found
No related merge requests found
...@@ -142,13 +142,19 @@ public class PutDataSetService ...@@ -142,13 +142,19 @@ public class PutDataSetService
List<DataSetInformation> infos = List<DataSetInformation> infos =
new PutDataSetExecutor(this, thePlugin, sessionToken, newDataSet, inputStream) new PutDataSetExecutor(this, thePlugin, sessionToken, newDataSet, inputStream)
.execute(); .execute();
if (infos.isEmpty()) StringBuilder sb = new StringBuilder();
for (DataSetInformation info : infos)
{ {
return ""; sb.append(info.getDataSetCode());
} else sb.append(",");
}
// Remove the trailing comma
if (sb.length() > 0)
{ {
return infos.get(0).getDataSetCode(); sb.deleteCharAt(sb.length() - 1);
} }
return sb.toString();
} catch (UserFailureException e) } catch (UserFailureException e)
{ {
throw new IllegalArgumentException(e); throw new IllegalArgumentException(e);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment