mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Fix AR-453 Repository bootstrap fails when performed under Thai regional settings
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2502 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -29,6 +29,7 @@ import java.text.ParseException;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
|
||||
import org.alfresco.error.AlfrescoRuntimeException;
|
||||
import org.alfresco.service.cmr.repository.ContentData;
|
||||
import org.alfresco.service.cmr.repository.ContentReader;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
@@ -176,12 +177,15 @@ public class DefaultTypeConverter
|
||||
{
|
||||
public Date convert(String source)
|
||||
{
|
||||
Date date = ISO8601DateFormat.parse(source);
|
||||
if (date == null)
|
||||
try
|
||||
{
|
||||
throw new TypeConversionException("Failed to parse date " + source);
|
||||
Date date = ISO8601DateFormat.parse(source);
|
||||
return date;
|
||||
}
|
||||
catch(AlfrescoRuntimeException e)
|
||||
{
|
||||
throw new TypeConversionException("Failed to convert date " + source + " to string", e);
|
||||
}
|
||||
return date;
|
||||
}
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user