I want to create a resource whose displayname differs from its resource name. .e.g. /files/john/file1.txt whose displayname is "My File.txt". ContentImpl.create() will always stores displayname as file1.txt instead of "My File.txt" because it always invokes revisionDescriptor.setName(resourceName); A null check should be performed before setting revisionDescriptor's name.
Which methode, which line? Can you provide a patch?
Line 496: revisionDescriptor.setName(new UriPath(strUri).lastSegment()); Should there a check to see if the name is null or empty, just like the one in setDefaultProperties() at line 1392? if (revisionDescriptor.getName() == null || revisionDescriptor.getName().length() == 0) { UriPath uripath = new UriPath(associatedObject.getUri()); revisionDescriptor.setName(uripath.lastSegment()); }
OK, got it. I have seen there are other spots in the Slide code (like in VersioningHelper) affected by this. So I fixed this in the release branch as well as in the HEAD.