summaryrefslogtreecommitdiff
path: root/qadevOOo/runner/helper/StreamSimulator.java
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-11-12 09:55:57 +0200
committerNoel Grandin <noelgrandin@gmail.com>2014-11-12 11:03:29 +0000
commitbb437029c1e5331bcc3f8fb2fc87837142a52f33 (patch)
tree56bde4059792a5284e90ae3b10ee4388cc913a54 /qadevOOo/runner/helper/StreamSimulator.java
parent84f7f412bfc9e18b1ff8b133ceda7757eae28c36 (diff)
java: convert fields to local variables where possible
found by PMD Change-Id: I05b45382b8fb1b734657ce9421a20e6ef6fbe542 Reviewed-on: https://gerrit.libreoffice.org/12376 Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'qadevOOo/runner/helper/StreamSimulator.java')
-rw-r--r--qadevOOo/runner/helper/StreamSimulator.java11
1 files changed, 4 insertions, 7 deletions
diff --git a/qadevOOo/runner/helper/StreamSimulator.java b/qadevOOo/runner/helper/StreamSimulator.java
index 7571ce6864cf..8e17e910b5bb 100644
--- a/qadevOOo/runner/helper/StreamSimulator.java
+++ b/qadevOOo/runner/helper/StreamSimulator.java
@@ -46,7 +46,6 @@ public class StreamSimulator implements com.sun.star.io.XInputStream ,
* @member m_bOutWasUsed indicates, that the output stream interface was used
*/
- private String m_sFileName ;
private com.sun.star.io.XInputStream m_xInStream ;
private com.sun.star.io.XOutputStream m_xOutStream ;
private com.sun.star.io.XSeekable m_xSeek ;
@@ -57,7 +56,7 @@ public class StreamSimulator implements com.sun.star.io.XInputStream ,
/**
* construct a new instance of this class
- * It set the name of the correspojnding file on disk, which
+ * It set the name of the corresponding file on disk, which
* should be source or target for the following operations on
* this object. And it regulate if it should function as
* input or output stream.
@@ -74,13 +73,11 @@ public class StreamSimulator implements com.sun.star.io.XInputStream ,
*
* @throw com.sun.star.io.NotConnectedException
* in case the internal streams to the file on disk couldn't established.
- * They are necessary. Otherwhise this simulator can't really work.
+ * They are necessary. Otherwise this simulator can't really work.
*/
public StreamSimulator( String sFileName , boolean bInput ,
lib.TestParameters param ) throws com.sun.star.io.NotConnectedException
{
- m_sFileName = sFileName ;
-
try
{
XSimpleFileAccess xHelper = UnoRuntime.queryInterface(XSimpleFileAccess.class,
@@ -91,14 +88,14 @@ public class StreamSimulator implements com.sun.star.io.XInputStream ,
if (bInput)
{
- m_xInStream = xHelper.openFileRead(m_sFileName);
+ m_xInStream = xHelper.openFileRead(sFileName);
m_xSeek = UnoRuntime.queryInterface(
com.sun.star.io.XSeekable.class,
m_xInStream);
}
else
{
- m_xOutStream = xHelper.openFileWrite(m_sFileName);
+ m_xOutStream = xHelper.openFileWrite(sFileName);
m_xSeek = UnoRuntime.queryInterface(
com.sun.star.io.XSeekable.class,
m_xOutStream);