Merged V2.2 to HEAD

8371: Merged V2.1 to V2.2
      8307: Next round of fixes for session management.
      8309: Fixed AR-1891: Long MLText strings fail in Oracle
      8313: Fix for case where existing MLText entry is null
      8319: Follow-up fix for NPE where StringValue is null when persisting
      8331: Fix for AR-1696: Long text in an aspect property causes an exception


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@8496 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2008-03-11 06:03:17 +00:00
parent 78c695fc0a
commit ceed05d26f
40 changed files with 1276 additions and 1445 deletions

View File

@@ -40,6 +40,7 @@ import java.util.Map;
import org.alfresco.error.AlfrescoRuntimeException;
import org.alfresco.repo.attributes.Attribute;
import org.alfresco.repo.attributes.AttributeConverter;
import org.alfresco.repo.domain.schema.SchemaBootstrap;
import org.alfresco.service.cmr.dictionary.DataTypeDefinition;
import org.alfresco.service.cmr.repository.AssociationRef;
import org.alfresco.service.cmr.repository.ChildAssociationRef;
@@ -171,7 +172,8 @@ public class PropertyValue implements Cloneable, Serializable
}
/**
* Strings longer than the maximum of 1024 characters will be serialized.
* Strings longer than the maximum of {@link PropertyValue#DEFAULT_MAX_STRING_LENGTH}
* characters will be serialized.
*/
@Override
protected ValueType getPersistedType(Serializable value)
@@ -179,7 +181,8 @@ public class PropertyValue implements Cloneable, Serializable
if (value instanceof String)
{
String valueStr = (String) value;
if (valueStr.length() > 1024)
// Check how long the String can be
if (valueStr.length() > SchemaBootstrap.getMaxStringLength())
{
return ValueType.SERIALIZABLE;
}