-
Bug
-
Resolution: Fixed
-
P4
-
6
-
b95
-
generic
-
generic
Bill Pugh wrote:
>> The current implementation of java.util.Properties.load(InputStream is)
>> doesn't
>> close the InputStream passed to it as an argument. However, this
>> doesn't seem to be documented
>> in the JavaDoc.
>>
>> This could cause a file to not be closed promptly, which can cause real
>> problems in some
>> configurations.
>>
>> It seems to me that at a minimum, it should be documented whether or
>> not it closes it.
>> If we had it to do over again, it should probably close its argument,
>> but I suspect it is too late
>> in the game to change that.
>>
>> In general, I think the appropriate design is that any method that
>> exhaustively reads an
>> InputStream or Reader should close it. Would you agree?
>>
>> Bill
>> The current implementation of java.util.Properties.load(InputStream is)
>> doesn't
>> close the InputStream passed to it as an argument. However, this
>> doesn't seem to be documented
>> in the JavaDoc.
>>
>> This could cause a file to not be closed promptly, which can cause real
>> problems in some
>> configurations.
>>
>> It seems to me that at a minimum, it should be documented whether or
>> not it closes it.
>> If we had it to do over again, it should probably close its argument,
>> but I suspect it is too late
>> in the game to change that.
>>
>> In general, I think the appropriate design is that any method that
>> exhaustively reads an
>> InputStream or Reader should close it. Would you agree?
>>
>> Bill