summaryrefslogtreecommitdiff
path: root/javaunohelper/com
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-11-18 10:01:21 +0200
committerNoel Grandin <noel@peralex.com>2014-11-18 12:44:28 +0200
commit0063cf285696951e336b9cec1da8881997b286ce (patch)
treebe70dfd8127c35f9e4a6d18d4db459a587813bf4 /javaunohelper/com
parent250391009aec9930abcc57930ddd4b6f56f4df9c (diff)
java: make fields final where possible
found by PMD Change-Id: I87780366119c141cd2dafe6ca1bf2d9798b10aec
Diffstat (limited to 'javaunohelper/com')
-rw-r--r--javaunohelper/com/sun/star/comp/helper/ComponentContext.java2
-rw-r--r--javaunohelper/com/sun/star/lib/uno/adapter/InputStreamToXInputStreamAdapter.java2
-rw-r--r--javaunohelper/com/sun/star/lib/uno/adapter/XInputStreamToInputStreamAdapter.java2
-rw-r--r--javaunohelper/com/sun/star/lib/uno/adapter/XOutputStreamToByteArrayAdapter.java2
-rw-r--r--javaunohelper/com/sun/star/lib/uno/helper/Factory.java6
-rw-r--r--javaunohelper/com/sun/star/lib/uno/helper/MultiTypeInterfaceContainer.java2
-rw-r--r--javaunohelper/com/sun/star/lib/uno/helper/UnoUrl.java12
-rw-r--r--javaunohelper/com/sun/star/lib/uno/helper/WeakAdapter.java4
8 files changed, 16 insertions, 16 deletions
diff --git a/javaunohelper/com/sun/star/comp/helper/ComponentContext.java b/javaunohelper/com/sun/star/comp/helper/ComponentContext.java
index 0326ffa77464..9d327ec8a8ce 100644
--- a/javaunohelper/com/sun/star/comp/helper/ComponentContext.java
+++ b/javaunohelper/com/sun/star/comp/helper/ComponentContext.java
@@ -36,7 +36,7 @@ import java.util.Map;
class Disposer implements XEventListener
{
- private XComponent m_xComp;
+ private final XComponent m_xComp;
Disposer( XComponent xComp )
diff --git a/javaunohelper/com/sun/star/lib/uno/adapter/InputStreamToXInputStreamAdapter.java b/javaunohelper/com/sun/star/lib/uno/adapter/InputStreamToXInputStreamAdapter.java
index 1fa4286214c4..feaca77cc9a6 100644
--- a/javaunohelper/com/sun/star/lib/uno/adapter/InputStreamToXInputStreamAdapter.java
+++ b/javaunohelper/com/sun/star/lib/uno/adapter/InputStreamToXInputStreamAdapter.java
@@ -34,7 +34,7 @@ public final class InputStreamToXInputStreamAdapter implements XInputStream {
/**
* Internal store to the InputStream
*/
- private InputStream iIn;
+ private final InputStream iIn;
/**
* Constructor.
diff --git a/javaunohelper/com/sun/star/lib/uno/adapter/XInputStreamToInputStreamAdapter.java b/javaunohelper/com/sun/star/lib/uno/adapter/XInputStreamToInputStreamAdapter.java
index 432cfdc0baed..c77c57b5adc1 100644
--- a/javaunohelper/com/sun/star/lib/uno/adapter/XInputStreamToInputStreamAdapter.java
+++ b/javaunohelper/com/sun/star/lib/uno/adapter/XInputStreamToInputStreamAdapter.java
@@ -35,7 +35,7 @@ public final class XInputStreamToInputStreamAdapter extends InputStream {
/**
* Internal handle to the XInputStream
*/
- private XInputStream xin;
+ private final XInputStream xin;
/**
* Constructor.
diff --git a/javaunohelper/com/sun/star/lib/uno/adapter/XOutputStreamToByteArrayAdapter.java b/javaunohelper/com/sun/star/lib/uno/adapter/XOutputStreamToByteArrayAdapter.java
index f8e738d0d8f8..d8f5740eb32a 100644
--- a/javaunohelper/com/sun/star/lib/uno/adapter/XOutputStreamToByteArrayAdapter.java
+++ b/javaunohelper/com/sun/star/lib/uno/adapter/XOutputStreamToByteArrayAdapter.java
@@ -31,7 +31,7 @@ public final class XOutputStreamToByteArrayAdapter
extends ComponentBase
implements XOutputStream
{
- private int initialSize = 100240; // 10 kb
+ private final int initialSize = 100240; // 10 kb
private int size = 0;
private int position = 0;
private boolean externalBuffer = false;
diff --git a/javaunohelper/com/sun/star/lib/uno/helper/Factory.java b/javaunohelper/com/sun/star/lib/uno/helper/Factory.java
index ca0bf84212c2..89cf42e3703a 100644
--- a/javaunohelper/com/sun/star/lib/uno/helper/Factory.java
+++ b/javaunohelper/com/sun/star/lib/uno/helper/Factory.java
@@ -116,9 +116,9 @@ public class Factory
}
- private String m_impl_name;
- private String [] m_supported_services;
- private Class<?> m_impl_class;
+ private final String m_impl_name;
+ private final String [] m_supported_services;
+ private final Class<?> m_impl_class;
private java.lang.reflect.Method m_method;
private java.lang.reflect.Constructor m_ctor;
diff --git a/javaunohelper/com/sun/star/lib/uno/helper/MultiTypeInterfaceContainer.java b/javaunohelper/com/sun/star/lib/uno/helper/MultiTypeInterfaceContainer.java
index 25c0ff997001..6ba3a4892c87 100644
--- a/javaunohelper/com/sun/star/lib/uno/helper/MultiTypeInterfaceContainer.java
+++ b/javaunohelper/com/sun/star/lib/uno/helper/MultiTypeInterfaceContainer.java
@@ -26,7 +26,7 @@ import java.util.Iterator;
public class MultiTypeInterfaceContainer
{
- private Map<Object,InterfaceContainer> map= new HashMap<Object,InterfaceContainer>();
+ private final Map<Object,InterfaceContainer> map= new HashMap<Object,InterfaceContainer>();
/** only returns types which have at least one value in InterfaceContainer
* return value can contain an element null, if someone called
diff --git a/javaunohelper/com/sun/star/lib/uno/helper/UnoUrl.java b/javaunohelper/com/sun/star/lib/uno/helper/UnoUrl.java
index 95d401440b3d..ca5e7a0aadd2 100644
--- a/javaunohelper/com/sun/star/lib/uno/helper/UnoUrl.java
+++ b/javaunohelper/com/sun/star/lib/uno/helper/UnoUrl.java
@@ -57,15 +57,15 @@ public class UnoUrl {
private static final String VALUE_CHAR_SET = "!$&'()*+-./:?@_~";
private static final String OID_CHAR_SET = VALUE_CHAR_SET + ",=";
- private UnoUrlPart connection;
- private UnoUrlPart protocol;
- private String rootOid;
+ private final UnoUrlPart connection;
+ private final UnoUrlPart protocol;
+ private final String rootOid;
static private class UnoUrlPart {
- private String partTypeName;
- private HashMap<String,String> partParameters;
- private String uninterpretedParameterString;
+ private final String partTypeName;
+ private final HashMap<String,String> partParameters;
+ private final String uninterpretedParameterString;
public UnoUrlPart(
String uninterpretedParameterString,
diff --git a/javaunohelper/com/sun/star/lib/uno/helper/WeakAdapter.java b/javaunohelper/com/sun/star/lib/uno/helper/WeakAdapter.java
index 0239959f619b..67e01ac3276d 100644
--- a/javaunohelper/com/sun/star/lib/uno/helper/WeakAdapter.java
+++ b/javaunohelper/com/sun/star/lib/uno/helper/WeakAdapter.java
@@ -33,9 +33,9 @@ import java.util.LinkedList;
public class WeakAdapter implements XAdapter
{
// references the XWeak implementation
- private WeakReference<Object> m_weakRef;
+ private final WeakReference<Object> m_weakRef;
// contains XReference objects registered by addReference
- private List<XReference> m_xreferenceList;
+ private final List<XReference> m_xreferenceList;
/**
*@param component the object that is to be held weak