diff --git a/source/java/org/alfresco/opencmis/CMISNodeInfoImpl.java b/source/java/org/alfresco/opencmis/CMISNodeInfoImpl.java index df769dd04d..3ec703bf19 100644 --- a/source/java/org/alfresco/opencmis/CMISNodeInfoImpl.java +++ b/source/java/org/alfresco/opencmis/CMISNodeInfoImpl.java @@ -147,12 +147,16 @@ public class CMISNodeInfoImpl implements CMISNodeInfo return; } + if (isFolder()) + { + // folders can't be versioned, so no need to check + objecVariant = CMISObjectVariant.FOLDER; + return; + } + if (versionLabel == null) { - if (isFolder()) - { - objecVariant = CMISObjectVariant.FOLDER; - } else if (isDocument()) + if (isDocument()) { objecVariant = CMISObjectVariant.CURRENT_VERSION; diff --git a/source/java/org/alfresco/repo/forms/processor/workflow/TypedPropertyValueGetter.java b/source/java/org/alfresco/repo/forms/processor/workflow/TypedPropertyValueGetter.java index 37a1f30f5b..c51379dd5a 100644 --- a/source/java/org/alfresco/repo/forms/processor/workflow/TypedPropertyValueGetter.java +++ b/source/java/org/alfresco/repo/forms/processor/workflow/TypedPropertyValueGetter.java @@ -66,11 +66,6 @@ public class TypedPropertyValueGetter { return processLocaleValue(value); } - else if(isDateProperty(propDef) && value instanceof String && !ISO8601DateFormat.isTimeComponentDefined((String) value)) - { - // Special handling for day-only date storage (ALF-10243) - return ISO8601DateFormat.parseDayOnly((String) value, TimeZone.getDefault()); - } else if (value instanceof String) { String valStr = (String) value; @@ -85,6 +80,11 @@ public class TypedPropertyValueGetter { return null; } + if(isDateProperty(propDef) && !ISO8601DateFormat.isTimeComponentDefined((String) value)) + { + // Special handling for day-only date storage (ALF-10243) + return ISO8601DateFormat.parseDayOnly(valStr, TimeZone.getDefault()); + } } if (value instanceof Serializable) { diff --git a/source/java/org/alfresco/repo/imap/AttachmentsExtractor.java b/source/java/org/alfresco/repo/imap/AttachmentsExtractor.java index 892a0a5a6f..9c4b75b59c 100644 --- a/source/java/org/alfresco/repo/imap/AttachmentsExtractor.java +++ b/source/java/org/alfresco/repo/imap/AttachmentsExtractor.java @@ -156,6 +156,10 @@ public class AttachmentsExtractor private void createAttachment(NodeRef messageFile, NodeRef attachmentsFolderRef, Part part) throws MessagingException, IOException { String fileName = part.getFileName(); + if (fileName == null || fileName.isEmpty()) + { + fileName = "unnamed"; + } try { fileName = MimeUtility.decodeText(fileName);