summaryrefslogtreecommitdiff
path: root/scripting
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-08-05 11:30:20 +0200
committerNoel Grandin <noel@peralex.com>2014-08-08 09:48:16 +0200
commite7a474b29ad87c03bdc3253cc62521b8af3a93e0 (patch)
tree653452cc25dbe5fb2a9cc36e59f7a95ceed8f17c /scripting
parent27459c71ef5f6f27749de36334e8a20fe4731e62 (diff)
java: remove unused variables
Change-Id: I1b04fbf4d4562ff8e74f6ccdb2fd989d79cc869b
Diffstat (limited to 'scripting')
-rw-r--r--scripting/java/com/sun/star/script/framework/io/UCBStreamHandler.java2
-rw-r--r--scripting/java/com/sun/star/script/framework/io/XInputStreamImpl.java3
-rw-r--r--scripting/java/com/sun/star/script/framework/provider/beanshell/PlainSourceView.java1
-rw-r--r--scripting/workben/ifc/scripting/_XScriptInfo.java5
-rw-r--r--scripting/workben/installer/Final.java2
-rw-r--r--scripting/workben/installer/InstUtil.java9
6 files changed, 2 insertions, 20 deletions
diff --git a/scripting/java/com/sun/star/script/framework/io/UCBStreamHandler.java b/scripting/java/com/sun/star/script/framework/io/UCBStreamHandler.java
index 5377dacd94c1..e59dad95436e 100644
--- a/scripting/java/com/sun/star/script/framework/io/UCBStreamHandler.java
+++ b/scripting/java/com/sun/star/script/framework/io/UCBStreamHandler.java
@@ -99,8 +99,6 @@ public class UCBStreamHandler extends URLStreamHandler {
String sUrl = url.toString();
if ( !( sUrl.lastIndexOf(separator) == -1) ) {
String path = sUrl.substring(0, sUrl.lastIndexOf(separator));
- String file = sUrl.substring(
- sUrl.lastIndexOf(separator) + separator.length());
if ( m_xSimpleFileAccess.isReadOnly( path ) )
{
diff --git a/scripting/java/com/sun/star/script/framework/io/XInputStreamImpl.java b/scripting/java/com/sun/star/script/framework/io/XInputStreamImpl.java
index d1c1c6d46c2b..f5694477725e 100644
--- a/scripting/java/com/sun/star/script/framework/io/XInputStreamImpl.java
+++ b/scripting/java/com/sun/star/script/framework/io/XInputStreamImpl.java
@@ -70,10 +70,9 @@ public class XInputStreamImpl implements XInputStream
public void skipBytes( /*IN*/int nBytesToSkip ) throws com.sun.star.io.NotConnectedException, com.sun.star.io.BufferSizeExceededException, com.sun.star.io.IOException
{
- long bytesSkipped = 0;
try
{
- bytesSkipped = is.skip( nBytesToSkip );
+ is.skip( nBytesToSkip );
}
catch ( IOException e )
{
diff --git a/scripting/java/com/sun/star/script/framework/provider/beanshell/PlainSourceView.java b/scripting/java/com/sun/star/script/framework/provider/beanshell/PlainSourceView.java
index d70a8b4323f4..a752648f999f 100644
--- a/scripting/java/com/sun/star/script/framework/provider/beanshell/PlainSourceView.java
+++ b/scripting/java/com/sun/star/script/framework/provider/beanshell/PlainSourceView.java
@@ -201,7 +201,6 @@ class GlyphGutter extends JComponent {
for (int i = startLine; i < endLine; i++) {
String text;
text = Integer.toString(i + 1) + " ";
- int w = metrics.stringWidth(text);
int y = i * h;
g.setColor(Color.blue);
g.drawString(text, 0, y + ascent);
diff --git a/scripting/workben/ifc/scripting/_XScriptInfo.java b/scripting/workben/ifc/scripting/_XScriptInfo.java
index 4e521817945f..ed08e44a3655 100644
--- a/scripting/workben/ifc/scripting/_XScriptInfo.java
+++ b/scripting/workben/ifc/scripting/_XScriptInfo.java
@@ -161,7 +161,6 @@ public class _XScriptInfo extends MultiMethodTest {
}
public void _getLanguageProperties() {
- boolean result = true;
Collection c =
(Collection) tEnv.getObjRelation("_getLanguageProperties");
@@ -191,12 +190,8 @@ public class _XScriptInfo extends MultiMethodTest {
}
log.println("expected: " + expected + ", output: " + output);
- result &= output.equals(expected);
}
}
- else {
- result = false;
- }
tRes.tested("getLanguageProperties()", true);
}
diff --git a/scripting/workben/installer/Final.java b/scripting/workben/installer/Final.java
index 01c0cec23976..e81fa1233b7d 100644
--- a/scripting/workben/installer/Final.java
+++ b/scripting/workben/installer/Final.java
@@ -78,9 +78,7 @@ public class Final extends javax.swing.JPanel implements ActionListener, Install
nav.enableCancel(false);
ArrayList<?> locations = InstallWizard.getLocations();
// Returned 1
- String progpath=null;
String path=null;
- String classespath=null;
for (int i =0;i<locations.size();i++){
path= (String)locations.get(i);
xud = new XmlUpdater(path, statusLine,progressBar,InstallWizard.bNetworkInstall,InstallWizard.bBindingsInstall);
diff --git a/scripting/workben/installer/InstUtil.java b/scripting/workben/installer/InstUtil.java
index 4e8563c722ea..b6d0f64f4338 100644
--- a/scripting/workben/installer/InstUtil.java
+++ b/scripting/workben/installer/InstUtil.java
@@ -88,8 +88,7 @@ public class InstUtil {
for ( int index = 0; index < supportedVersions.length; index++ )
{
String key = supportedVersions[ index ];
- String path = null;
- if ( ( path = installs.getProperty(key) ) != null )
+ if ( installs.getProperty(key) != null )
{
// at least one supported version for netbeans present, so return;
return true;
@@ -123,7 +122,6 @@ public class InstUtil {
public static Properties getNetbeansLocation() throws IOException {
- File theFile = null;
Properties results = new Properties();
StringBuffer str = new StringBuffer();
@@ -134,15 +132,11 @@ public class InstUtil {
String os = System.getProperty("os.name");
if (os.indexOf("Windows") != -1) {
- //theFile = findVersionFile(new File(str.toString()));
thePath.append(".netbeans");
- //theFile = new File(thePath.toString());
} else if (os.indexOf("SunOS") != -1) {
thePath.append(".netbeans");
- //theFile = new File(thePath.toString());
} else if (os.indexOf("Linux") != -1) {
thePath.append(".netbeans");
- //theFile = new File(thePath.toString());
}
if ( thePath.toString().indexOf( ".netbeans" ) == -1 )
@@ -183,7 +177,6 @@ public class InstUtil {
str.append(File.separator);
StringBuffer thePath = new StringBuffer(str.toString());
- String os = System.getProperty("os.name");
thePath.append(".jedit");
File jeditLogFile = new File( thePath.toString() + File.separator + "activity.log" );