Merge pull request #1249 from tdonohue/DS-3005

DS-3005: Ensure ItemService is initialized in all constructors
This commit is contained in:
helix84
2016-01-25 18:42:56 +01:00

View File

@@ -50,6 +50,8 @@ public class MetadataExport
*/
public MetadataExport(Context c, Iterator<Item> toExport, boolean exportAll)
{
itemService = ContentServiceFactory.getInstance().getItemService();
// Store the export settings
this.toExport = toExport;
this.exportAll = exportAll;
@@ -64,6 +66,8 @@ public class MetadataExport
*/
public MetadataExport(Context c, Community toExport, boolean exportAll)
{
itemService = ContentServiceFactory.getInstance().getItemService();
try
{
// Try to export the community