From b9f187055394713fbc58d149c6ea98fe13dbadd5 Mon Sep 17 00:00:00 2001 From: Robert Antoni Buj i Gelonch Date: Fri, 19 Sep 2014 11:39:54 +0200 Subject: javaunohelper: Using "final" modifier whenever applicable in java * com.sun.star.lib.uno.adapter.ByteArrayToXInputStreamAdapter class may be final. There is a overridable method call in the constructor. * Private methods can't be overridden. The private method "instantiate" is declared final in the com.sun.star.lib.uno.helper.Factory class. Change-Id: I7dba78a3d1857bbc328f6a581d8e9a5ae130739d Reviewed-on: https://gerrit.libreoffice.org/11546 Reviewed-by: Stephan Bergmann Tested-by: Stephan Bergmann --- .../com/sun/star/lib/uno/adapter/ByteArrayToXInputStreamAdapter.java | 2 +- javaunohelper/com/sun/star/lib/uno/helper/Factory.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'javaunohelper/com') diff --git a/javaunohelper/com/sun/star/lib/uno/adapter/ByteArrayToXInputStreamAdapter.java b/javaunohelper/com/sun/star/lib/uno/adapter/ByteArrayToXInputStreamAdapter.java index fd6553aecaca..ecb1df66c296 100644 --- a/javaunohelper/com/sun/star/lib/uno/adapter/ByteArrayToXInputStreamAdapter.java +++ b/javaunohelper/com/sun/star/lib/uno/adapter/ByteArrayToXInputStreamAdapter.java @@ -28,7 +28,7 @@ import com.sun.star.io.XInputStream; import com.sun.star.io.XSeekable; import com.sun.star.lib.uno.helper.ComponentBase; -public class ByteArrayToXInputStreamAdapter +public final class ByteArrayToXInputStreamAdapter extends ComponentBase implements XInputStream, XSeekable { diff --git a/javaunohelper/com/sun/star/lib/uno/helper/Factory.java b/javaunohelper/com/sun/star/lib/uno/helper/Factory.java index f136561427c2..19f6fc08b067 100644 --- a/javaunohelper/com/sun/star/lib/uno/helper/Factory.java +++ b/javaunohelper/com/sun/star/lib/uno/helper/Factory.java @@ -165,7 +165,7 @@ public class Factory } - private final Object instantiate( XComponentContext xContext ) + private Object instantiate( XComponentContext xContext ) throws com.sun.star.uno.Exception { try -- cgit