Permalink
Browse files

NXCM-5188: Removed temptation by adding inline explanation

I was tempted to change these methods, but finally figured
it's completely unneeded.

Comment explains why.
  • Loading branch information...
1 parent 5bf61f5 commit 6f04fada9857b84b11322672176d1fcb8d8d5e54 @cstamas cstamas committed Apr 8, 2013
@@ -303,6 +303,12 @@ protected void putFileItem( final ContentLocator content )
new DefaultStorageFileItem( getMavenRepository(), request, true, true, content );
try
{
+ // NXCM-5188: Remark to not get tempted to change these to storeItemWithChecksums() method:
+ // Since NEXUS-5418 was fixed (in 2.4), Nexus serves up ALL request for existing items that
+ // has extra trailing ".sha1" or ".md5" from item attributes. This means, that when prefix file
+ // is published in Nexus, there is no need anymore to save checksums to disk, as they will
+ // be served up just fine. This is true for all items in Nexus storage, not just prefix
+ // file related ones!
getMavenRepository().storeItem( true, file );
}
catch ( UnsupportedStorageOperationException e )
@@ -325,6 +331,12 @@ protected void deleteFileItem()
request.getRequestContext().put( Manager.ROUTING_INITIATED_FILE_OPERATION_FLAG_KEY, Boolean.TRUE );
try
{
+ // NXCM-5188: Remark to not get tempted to change these to deleteItemWithChecksums() method:
+ // Since NEXUS-5418 was fixed (in 2.4), Nexus serves up ALL request for existing items that
+ // has extra trailing ".sha1" or ".md5" from item attributes. This means, that when prefix file
+ // is published in Nexus, there is no need anymore to save checksums to disk, as they will
+ // be served up just fine. This is true for all items in Nexus storage, not just prefix
+ // file related ones!
getMavenRepository().deleteItem( true, request );
}
catch ( ItemNotFoundException e )

0 comments on commit 6f04fad

Please sign in to comment.