Merged BRANCHES/DEV/V4.1-BUG-FIX to HEAD:

54638: As part of work investigating ALF-19783 I have created a test case. I'm checking this in on 4.1 bugfix (where the issue is not reported)
Merged BRANCHES/DEV/V4.1-BUG-FIX to HEAD:
   54640: (RECORD ONLY) (Part of prep work for ALF-19783) Moving a test class to the correct source tree.

Note that in doing the record-only merge above, the file ScriptNodeTest had been created on V4.1-BUG-FIX *and* on HEAD independently.
So I got a tree conflict in merging 54640 to HEAD as this attempted to svn mv ScriptNodeTest on top of HEAD's existing copy of that file.
So instead, I manually resolved the conflict by merging the two files.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@54646 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Neil McErlean
2013-08-29 13:15:35 +00:00
parent 6bc9570f65
commit 9fbba5a5e0
2 changed files with 213 additions and 7 deletions

View File

@@ -273,4 +273,24 @@ public class VersionHistoryImpl implements VersionHistory
this.versionComparatorDesc = (Comparator<Version>) fields.get("versionComparatorDesc", null);
}
}
/**
* @since 4.1.7
*/
@Override public String toString()
{
// The toString result looks something like: "VersionHistoryImpl [1] , { '0.1', tail... }"
final Collection<Version> allVersions = getAllVersions();
final StringBuilder msg = new StringBuilder();
msg.append(VersionHistoryImpl.class.getSimpleName())
.append(" [") .append(allVersions.size()) .append("] ");
if ( !allVersions.isEmpty())
{
msg.append(", { '") .append(getHeadVersion().getVersionLabel()) .append("', tail... }");
}
return msg.toString();
}
}