ASF Bugzilla – Attachment 18633 Details for
Bug 40100
FileServer does not support closing write access files
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Test access type before closing
FileServer.txt (text/plain), 1.50 KB, created by
Guillaume Lasnier
on 2006-07-24 09:40:32 UTC
(
hide
)
Description:
Test access type before closing
Filename:
MIME Type:
Creator:
Guillaume Lasnier
Created:
2006-07-24 09:40:32 UTC
Size:
1.50 KB
patch
obsolete
>Index: D:/Development/Eclipse/Workspace/jmeter/src/core/org/apache/jmeter/services/FileServer.java >=================================================================== >--- D:/Development/Eclipse/Workspace/jmeter/src/core/org/apache/jmeter/services/FileServer.java (revision 424313) >+++ D:/Development/Eclipse/Workspace/jmeter/src/core/org/apache/jmeter/services/FileServer.java (working copy) >@@ -112,7 +112,7 @@ > } > } > >- /** >+ /** > * Get the next line of the named file, recycle by default. > * > * @param filename >@@ -126,7 +126,7 @@ > /** > * Get the next line of the named file. > * >- * @param filename >+ * @param filename > * @param recycle - should file be restarted at EOF? > * @return String containing the next line in the file (null if EOF reached and not recycle) > * @throws IOException >@@ -191,7 +191,12 @@ > private void closeFile(String name, FileEntry fileEntry) throws IOException { > if (fileEntry != null && fileEntry.inputOutputObject != null) { > log.info("Close: "+name); >- ((Reader) fileEntry.inputOutputObject).close(); >+ if (fileEntry.inputOutputObject instanceof Reader) >+ ((Reader) fileEntry.inputOutputObject).close(); >+ else if (fileEntry.inputOutputObject instanceof Writer) >+ ((Writer) fileEntry.inputOutputObject).close(); >+ else >+ log.error("Unknow inputOutputObject type : " + fileEntry.inputOutputObject.getClass()); > fileEntry.inputOutputObject = null; > } > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 40100
: 18633