-
Bug
-
Resolution: Done
-
Minor
-
6.0.0.CR3
-
None
-
-
Workaround Exists
-
-
Low
If encoding of resource is passes as null and reader is InputStreamReader encoding taken from reader is overriden to null.
"this.encoding = encoding;" should be in else block in my opinion.
public ReaderResource(Reader reader, String encoding, ResourceType type ) {
if ( reader == null )
if ( encoding == null && reader instanceof InputStreamReader )
{ this.encoding = ((InputStreamReader)reader).getEncoding(); <== encoding assigned here }this.reader = reader;
this.encoding = encoding; <== encoding assigned to null
setResourceType( type );
this.timestamp = System.currentTimeMillis();
this.lastRead = this.timestamp;
}