Merged 5.0.N (5.0.4) to 5.1.N (5.1.2)

129111 adavis: Merged 5.0.2 (5.0.2.23) to 5.0.N (5.0.4)
      120632 amorarasu: MNT-15367: Unable to bulk import filenames with portuguese characters in a linux environment.
         - Fixed empty catch blocks and added some comments as per review.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.1.N/root@129115 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Alan Davis
2016-08-04 15:54:23 +00:00
parent 268e8eb9e1
commit fc60b50f9c
2 changed files with 33 additions and 20 deletions

View File

@@ -1,20 +1,20 @@
/*
* #%L
* Alfresco Repository
* %%
* Copyright (C) 2005 - 2016 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
* the paid license agreement will prevail. Otherwise, the software is
* provided under the following open source license terms:
*
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Alfresco is distributed in the hope that it will be useful,
* #%L
* Alfresco Repository
* %%
* Copyright (C) 2005 - 2016 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
* the paid license agreement will prevail. Otherwise, the software is
* provided under the following open source license terms:
*
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
@@ -36,8 +36,11 @@ import java.util.Set;
import java.util.SortedSet;
import java.util.TreeSet;
import org.alfresco.repo.bulkimport.impl.FileUtils;
import org.alfresco.service.cmr.repository.NodeRef;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
/**
* This class is a DTO that represents an "importable item" - a series of files
@@ -55,6 +58,8 @@ public final class ImportableItem
OTHER
};
protected static final Log logger = LogFactory.getLog(ImportableItem.class);
private ContentAndMetadata headRevision = new ContentAndMetadata();
private SortedSet<VersionedContentAndMetadata> versionEntries = null;
private NodeRef nodeRef;
@@ -193,6 +198,7 @@ public final class ImportableItem
}
catch (IOException e)
{
logger.error("Attributes for file '" + FileUtils.getFileName(contentFile) + "' could not be read.", e);
}
}
}
@@ -269,6 +275,10 @@ public final class ImportableItem
}
catch (IOException e)
{
if (logger.isWarnEnabled())
{
logger.warn("Size for the metadata file '" + FileUtils.getFileName(metadataFile) + "' could not be retrieved.", e);
}
}
}
}