[prev in list] [next in list] [prev in thread] [next in thread]
List: slide-dev
Subject: cvs commit: jakarta-slide/src/share/org/apache/slide/content ContentImpl.java
From: pnever () apache ! org
Date: 2003-04-25 13:51:38
[Download RAW message or body]
pnever 2003/04/25 06:51:38
Modified: src/share/org/apache/slide/content ContentImpl.java
Log:
Removed retrieveContent() call in store() method.
Reasons:
- it is not necessary to check existence because the following \
storeRevisionContent() also throws RevisionNotFoundException
- it is harmful for filesystem-based stores, as the input streams created by \
retrieveRevisionContent() call are never closed Simple scenario to repreduce the \
problem: Use the FileContentStore, create a file, update it and then try to delete \
it. It will not be deleted from the filesystem.
Revision Changes Path
1.45 +15 -7 \
jakarta-slide/src/share/org/apache/slide/content/ContentImpl.java
Index: ContentImpl.java
===================================================================
RCS file: /home/cvs/jakarta-slide/src/share/org/apache/slide/content/ContentImpl.java,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -r1.44 -r1.45
--- ContentImpl.java 23 Aug 2002 12:34:19 -0000 1.44
+++ ContentImpl.java 25 Apr 2003 13:51:38 -0000 1.45
@@ -986,8 +986,16 @@
if (revisionContent != null) {
try {
- objectUri.getStore().retrieveRevisionContent
- (objectUri, revisionDescriptor);
+ // Removed retrieveContent call [pnever, 25-APR-2003].
+ // Reasons:
+ // - it is not necessary to check existence because \
storeRevisionContent also throws RevisionNotFoundException + // - it \
is harmful for filesystem-based stores, as the input streams created by \
retrieveRevisionContent never are closed + // Simple scenario:
+ // Use the FileContentStore, create a file, update it and then try \
to delete it. + // It will not be deleted from the filesystem.
+ //
+ // objectUri.getStore().retrieveRevisionContent
+ // (objectUri, revisionDescriptor);
objectUri.getStore().storeRevisionContent
(objectUri, revisionDescriptor, revisionContent);
} catch (RevisionNotFoundException e) {
---------------------------------------------------------------------
To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-dev-help@jakarta.apache.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic