
| Key: |
LEDGE-146
|
| Type: |
Bug
|
| Status: |
Closed
|
| Resolution: |
Fixed/Completed
|
| Priority: |
Major
|
| Assignee: |
Unassigned
|
| Reporter: |
Rafał Krzewski
|
| Votes: |
0
|
| Watchers: |
0
|
|
If you were logged in you would be able to see more operations.
|
|
|
ObjectLedge
Created: 2008-05-18 15:33
Updated: 2008-05-18 15:34
|
|
| Component/s: |
None
|
| Affects Version/s: |
None
|
| Fix Version/s: |
None
|
|
|
spotted by Marcin Gołębski
proposed fix:
if(is != null && os != null)
{
int count = 0;
while(count >= 0)
{
count = is.read(buffer, 0, buffer.length);
if(count > 0)
{
os.write(buffer, 0, count);
}
}
os.flush(); // <-- os.close() here
}
|
|
Description
|
spotted by Marcin Gołębski
proposed fix:
if(is != null && os != null)
{
int count = 0;
while(count >= 0)
{
count = is.read(buffer, 0, buffer.length);
if(count > 0)
{
os.write(buffer, 0, count);
}
}
os.flush(); // <-- os.close() here
} |
Show » |
|
also closed input stream as a matter of good practices