Changeset 26283

Show
Ignore:
Timestamp:
12/10/08 16:59:20 (4 years ago)
Author:
tfunato
Message:

InputStreamを閉じないとWindowsでOutOfMemoryがでるので、明示的にcloseするようにした

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lang/java/misc/Outputz/Outputz/src/org/yoshiori/plugin/outputz/builder/OutputzBuilder.java

    r26220 r26283  
    6868                        Outputz outputz = getOutputz(file); 
    6969                        if (outputz != null) { 
    70                                 outputz.post(StringUtils.getLevenshteinDistance(slurp(file 
    71                                                 .getContents()), slurp(oldFile.getContents()))); 
     70                            InputStream is1 = file.getContents(); 
     71                            InputStream is2 = oldFile.getContents(); 
     72                                outputz.post(StringUtils.getLevenshteinDistance(slurp(is1), slurp(is2))); 
     73                                is1.close(); 
     74                                is2.close(); 
    7275                        } 
    7376                }