summaryrefslogtreecommitdiff
path: root/jurt
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@suse.cz>2011-04-22 15:10:13 +0200
committerJan Holesovsky <kendy@suse.cz>2011-04-22 15:10:13 +0200
commitbef8909ce175f728d43501cfec4368eebd69cabf (patch)
treef5ea9873e1af554d82c351acdf85619c17f01de7 /jurt
parent83e8a2bbe468b5439cc8e59cc04abf001677a8e6 (diff)
parent013fa416d39f1c219722e6736b7234f944fe774f (diff)
Merge commit 'ooo/DEV300_m106' into libreoffice-3-4
Conflicts: offapi/com/sun/star/animations/XAnimationNode.idl offapi/com/sun/star/awt/grid/XGridColumn.idl offapi/com/sun/star/drawing/framework/XPaneBorderPainter.idl offapi/com/sun/star/frame/ModuleManager.idl offapi/com/sun/star/frame/XLayoutManager.idl offapi/com/sun/star/frame/XLayoutManagerListener.idl offapi/com/sun/star/rendering/FontInfo.idl offapi/com/sun/star/rendering/XBezierPolyPolygon2D.idl offapi/com/sun/star/rendering/XCanvas.idl offapi/com/sun/star/rendering/XSprite.idl offapi/com/sun/star/report/ForceNewPage.idl offapi/com/sun/star/report/ReportPrintOption.idl offapi/com/sun/star/report/XFunctionsSupplier.idl offapi/com/sun/star/report/XReportControlFormat.idl offapi/com/sun/star/resource/StringResourceWithLocation.idl offapi/com/sun/star/resource/XStringResourceResolver.idl offapi/com/sun/star/resource/XStringResourceWithLocation.idl offapi/com/sun/star/sdb/XSingleSelectQueryComposer.idl offapi/com/sun/star/security/XCertificateContainer.idl offapi/com/sun/star/ui/UIElementFactory.idl offapi/com/sun/star/ui/XImageManager.idl offapi/com/sun/star/ui/XUIConfigurationManager.idl offapi/com/sun/star/ui/XUIElementFactory.idl offapi/com/sun/star/ui/XUIElementSettings.idl offapi/com/sun/star/xml/crypto/SEInitializer.idl offapi/com/sun/star/xml/crypto/XSEInitializer.idl offapi/com/sun/star/xml/crypto/XSecurityEnvironment.idl offapi/com/sun/star/xml/crypto/XXMLSecurityContext.idl sal/rtl/source/alloc_arena.c udkapi/com/sun/star/task/XInteractionHandler2.idl
Diffstat (limited to 'jurt')
-rw-r--r--jurt/com/sun/star/comp/bridgefactory/BridgeFactory.java4
-rw-r--r--jurt/com/sun/star/comp/connections/PipedConnection.java2
-rw-r--r--jurt/com/sun/star/comp/loader/FactoryHelper.java7
-rw-r--r--jurt/com/sun/star/comp/loader/JavaLoader.java2
-rw-r--r--jurt/com/sun/star/comp/servicemanager/ServiceManager.java33
-rw-r--r--jurt/com/sun/star/comp/urlresolver/UrlResolver.java12
-rw-r--r--jurt/com/sun/star/lib/connections/pipe/PipeConnection.java2
-rw-r--r--jurt/com/sun/star/lib/connections/socket/SocketConnection.java2
-rw-r--r--jurt/com/sun/star/lib/uno/bridges/java_remote/ProxyFactory.java5
-rw-r--r--jurt/com/sun/star/lib/uno/bridges/java_remote/XConnectionInputStream_Adapter.java2
-rw-r--r--jurt/com/sun/star/lib/uno/bridges/java_remote/XConnectionOutputStream_Adapter.java2
-rw-r--r--jurt/com/sun/star/lib/uno/bridges/java_remote/java_remote_bridge.java2
-rw-r--r--jurt/com/sun/star/lib/uno/protocols/urp/Unmarshal.java2
-rw-r--r--jurt/com/sun/star/lib/util/UrlToFileMapper.java2
14 files changed, 33 insertions, 46 deletions
diff --git a/jurt/com/sun/star/comp/bridgefactory/BridgeFactory.java b/jurt/com/sun/star/comp/bridgefactory/BridgeFactory.java
index 1c4819326268..b0c093ffa2bb 100644
--- a/jurt/com/sun/star/comp/bridgefactory/BridgeFactory.java
+++ b/jurt/com/sun/star/comp/bridgefactory/BridgeFactory.java
@@ -108,7 +108,7 @@ public class BridgeFactory implements XBridgeFactory/*, XEventListener*/ {
com.sun.star.uno.RuntimeException
{
boolean hasName = sName.length() != 0;
- Object context = hasName ? (Object) sName : (Object) new UniqueToken();
+ Object context = hasName ? sName : new UniqueToken();
// UnoRuntime.getBridgeByName internally uses context.toString() to
// distinguish bridges, so the result of
// new UniqueToken().toString() might clash with an explicit
@@ -128,7 +128,7 @@ public class BridgeFactory implements XBridgeFactory/*, XEventListener*/ {
}
}
- XBridge xBridge = null;
+ XBridge xBridge;
try {
IBridge iBridge = UnoRuntime.getBridgeByName("java", context, "remote", context, hasName ? new Object[]{sProtocol, aConnection, anInstanceProvider, sName} : new Object[]{sProtocol, aConnection, anInstanceProvider});
diff --git a/jurt/com/sun/star/comp/connections/PipedConnection.java b/jurt/com/sun/star/comp/connections/PipedConnection.java
index f5a839ea78c5..aefc2eec3a7a 100644
--- a/jurt/com/sun/star/comp/connections/PipedConnection.java
+++ b/jurt/com/sun/star/comp/connections/PipedConnection.java
@@ -139,7 +139,7 @@ public class PipedConnection implements XConnection {
if(_closed) throw new com.sun.star.io.IOException("connection has been closed");
- int bytes = 0;
+ int bytes ;
if(_out < _in) {
bytes = Math.min(aData.length - bytesWritten, _in - _out - 1);
diff --git a/jurt/com/sun/star/comp/loader/FactoryHelper.java b/jurt/com/sun/star/comp/loader/FactoryHelper.java
index 29b484631670..ef0dda4e3f23 100644
--- a/jurt/com/sun/star/comp/loader/FactoryHelper.java
+++ b/jurt/com/sun/star/comp/loader/FactoryHelper.java
@@ -413,10 +413,7 @@ public class FactoryHelper {
_implementationId[2]= (byte)((hash >>> 16) & 0xff);
_implementationId[3]= (byte)((hash >>>24) & 0xff);
- for (int i= 0; i < nNameLength; i++)
- {
- _implementationId[4 + i]= arName[i];
- }
+ System.arraycopy(arName, 0, _implementationId, 4, nNameLength);
}
}
return _implementationId;
@@ -453,7 +450,7 @@ public class FactoryHelper {
XSingleServiceFactory xSingleServiceFactory = null;
try {
- Field serviceName = null;
+ Field serviceName ;
try {
serviceName = implClass.getField("__serviceName");
diff --git a/jurt/com/sun/star/comp/loader/JavaLoader.java b/jurt/com/sun/star/comp/loader/JavaLoader.java
index 47723b208497..25fc90b47676 100644
--- a/jurt/com/sun/star/comp/loader/JavaLoader.java
+++ b/jurt/com/sun/star/comp/loader/JavaLoader.java
@@ -265,7 +265,7 @@ public class JavaLoader implements XImplementationLoader,
locationUrl = expand_url( locationUrl );
Object returnObject = null;
- Class clazz = null;
+ Class clazz ;
DEBUG("try to get factory for " + implementationName);
diff --git a/jurt/com/sun/star/comp/servicemanager/ServiceManager.java b/jurt/com/sun/star/comp/servicemanager/ServiceManager.java
index 6914ee5228e0..ab15529fc16b 100644
--- a/jurt/com/sun/star/comp/servicemanager/ServiceManager.java
+++ b/jurt/com/sun/star/comp/servicemanager/ServiceManager.java
@@ -187,7 +187,7 @@ public class ServiceManager implements XMultiServiceFactory,
Class clazz = Class.forName( newImpls[i] );
Class[] methodClassParam = { String.class, XMultiServiceFactory.class, XRegistryKey.class };
- java.lang.reflect.Method getFactoryMeth = null;
+ java.lang.reflect.Method getFactoryMeth ;
try {
getFactoryMeth = clazz.getMethod("__getServiceFactory", methodClassParam);
}
@@ -233,7 +233,7 @@ public class ServiceManager implements XMultiServiceFactory,
public void initialize( Object args[] )
throws com.sun.star.uno.Exception,
com.sun.star.uno.RuntimeException {
- XSimpleRegistry xSimpleRegistry = null;
+ XSimpleRegistry xSimpleRegistry ;
try {
xSimpleRegistry = (XSimpleRegistry) args[0];
if (xSimpleRegistry != null)
@@ -462,9 +462,9 @@ public class ServiceManager implements XMultiServiceFactory,
XEventListener listener = (XEventListener) enumer.nextElement();
listener.disposing(new com.sun.star.lang.EventObject(this));
}
+ eventListener.removeAllElements();
}
- eventListener.removeAllElements();
factoriesByServiceNames.clear();
factoriesByImplNames.clear();
}
@@ -527,12 +527,9 @@ public class ServiceManager implements XMultiServiceFactory,
XServiceInfo xServiceInfo = UnoRuntime.queryInterface(XServiceInfo.class, object);
- if (xServiceInfo != null) {
- return UnoRuntime.areSame(factoriesByImplNames.get(xServiceInfo.getImplementationName()), object);
- }
+ return xServiceInfo != null && UnoRuntime.areSame(factoriesByImplNames.get(xServiceInfo.getImplementationName()), object);
- return false;
- }
+ }
/**
* Adds a <code>SingleServiceFactory</code> to the <code>ServiceManager</code>.
@@ -567,7 +564,7 @@ public class ServiceManager implements XMultiServiceFactory,
String[] serviceNames = xServiceInfo.getSupportedServiceNames();
- java.util.Vector vec = null;
+ java.util.Vector vec ;
for (int i=0; i<serviceNames.length; i++) {
if ( !factoriesByServiceNames.containsKey( serviceNames[i] ) ) {
@@ -688,7 +685,7 @@ public class ServiceManager implements XMultiServiceFactory,
public XEnumeration createContentEnumeration( String serviceName )
throws com.sun.star.uno.RuntimeException
{
- XEnumeration enumer = null;
+ XEnumeration enumer ;
java.util.Vector serviceList = (java.util.Vector) factoriesByServiceNames.get(serviceName);
@@ -725,10 +722,9 @@ public class ServiceManager implements XMultiServiceFactory,
for (int i=0; i<supportedServiceNames.length; i++)
if (supportedServiceNames[i].equals( serviceName )) return true;
- if (getImplementationName().equals( serviceName )) return true;
+ return getImplementationName().equals(serviceName);
- return false;
- }
+ }
/**
* Supplies list of all supported services.
@@ -781,11 +777,9 @@ public class ServiceManager implements XMultiServiceFactory,
public boolean hasMoreElements()
throws com.sun.star.uno.RuntimeException
{
- if (enumeration != null)
- return enumeration.hasMoreElements();
+ return enumeration != null && enumeration.hasMoreElements();
- return false;
- }
+ }
/**
* Returns the next element of the enumeration. If no further elements
@@ -859,10 +853,9 @@ class ServiceManagerFactory implements XServiceInfo, XSingleComponentFactory, X
for ( int i=0; i<ServiceManager.supportedServiceNames.length; i++ )
if ( ServiceManager.supportedServiceNames[i].equals(serviceName) ) return true;
- if ( getImplementationName().equals(serviceName) ) return true;
+ return getImplementationName().equals(serviceName);
- return false;
- }
+ }
/**
* Returns all service names which are supported by <code>ServiceManager</code>.
diff --git a/jurt/com/sun/star/comp/urlresolver/UrlResolver.java b/jurt/com/sun/star/comp/urlresolver/UrlResolver.java
index 538315638553..2a7bddcb01d9 100644
--- a/jurt/com/sun/star/comp/urlresolver/UrlResolver.java
+++ b/jurt/com/sun/star/comp/urlresolver/UrlResolver.java
@@ -71,9 +71,9 @@ public class UrlResolver {
}
public Object resolve(/*IN*/String dcp) throws NoConnectException, ConnectionSetupException, IllegalArgumentException, com.sun.star.uno.RuntimeException {
- String conDcp = null;
- String protDcp = null;
- String rootOid = null;
+ String conDcp ;
+ String protDcp ;
+ String rootOid ;
if(dcp.indexOf(';') == -1) {// use old style
conDcp = dcp;
@@ -96,8 +96,8 @@ public class UrlResolver {
rootOid = dcp.trim().trim();
}
- Object rootObject = null;
- XBridgeFactory xBridgeFactory= null;
+ Object rootObject ;
+ XBridgeFactory xBridgeFactory ;
try {
xBridgeFactory = UnoRuntime.queryInterface(XBridgeFactory.class,
_xMultiServiceFactory.createInstance("com.sun.star.bridge.BridgeFactory"));
@@ -107,7 +107,7 @@ public class UrlResolver {
XBridge xBridge = xBridgeFactory.getBridge(conDcp + ";" + protDcp);
if(xBridge == null) {
- Object connector= null;
+ Object connector ;
try {
connector = _xMultiServiceFactory.createInstance("com.sun.star.connection.Connector");
} catch (com.sun.star.uno.Exception e) {
diff --git a/jurt/com/sun/star/lib/connections/pipe/PipeConnection.java b/jurt/com/sun/star/lib/connections/pipe/PipeConnection.java
index 455e3aab6502..f18cafb29c3e 100644
--- a/jurt/com/sun/star/lib/connections/pipe/PipeConnection.java
+++ b/jurt/com/sun/star/lib/connections/pipe/PipeConnection.java
@@ -82,7 +82,7 @@ public class PipeConnection implements XConnection, XConnectionBroadcaster {
_bFirstRead = true;
// get pipe name from pipe descriptor
- String aPipeName = null;
+ String aPipeName ;
StringTokenizer aTokenizer = new StringTokenizer( description, "," );
if ( aTokenizer.hasMoreTokens() )
{
diff --git a/jurt/com/sun/star/lib/connections/socket/SocketConnection.java b/jurt/com/sun/star/lib/connections/socket/SocketConnection.java
index 8512bdb49fe1..13da9d5cbea9 100644
--- a/jurt/com/sun/star/lib/connections/socket/SocketConnection.java
+++ b/jurt/com/sun/star/lib/connections/socket/SocketConnection.java
@@ -149,7 +149,7 @@ public class SocketConnection implements XConnection, XConnectionBroadcaster {
bytes[0] = new byte[nBytesToRead];
try {
- int count = 0;
+ int count ;
do {
count = _inputStream.read(bytes[0], read_bytes, nBytesToRead - read_bytes);
diff --git a/jurt/com/sun/star/lib/uno/bridges/java_remote/ProxyFactory.java b/jurt/com/sun/star/lib/uno/bridges/java_remote/ProxyFactory.java
index ae2719f1c07d..c29be0c9558d 100644
--- a/jurt/com/sun/star/lib/uno/bridges/java_remote/ProxyFactory.java
+++ b/jurt/com/sun/star/lib/uno/bridges/java_remote/ProxyFactory.java
@@ -113,9 +113,8 @@ final class ProxyFactory {
throws Throwable
{
if (method.equals(METHOD_EQUALS) || method.equals(METHOD_IS_SAME)) {
- return new Boolean(
- args[0] != null
- && oid.equals(UnoRuntime.generateOid(args[0])));
+ return Boolean.valueOf(args[0] != null
+ && oid.equals(UnoRuntime.generateOid(args[0])));
} else if (method.equals(METHOD_HASH_CODE)) {
return new Integer(oid.hashCode());
} else if (method.equals(METHOD_TO_STRING)) {
diff --git a/jurt/com/sun/star/lib/uno/bridges/java_remote/XConnectionInputStream_Adapter.java b/jurt/com/sun/star/lib/uno/bridges/java_remote/XConnectionInputStream_Adapter.java
index e663a96d1ea7..274d9389bcf0 100644
--- a/jurt/com/sun/star/lib/uno/bridges/java_remote/XConnectionInputStream_Adapter.java
+++ b/jurt/com/sun/star/lib/uno/bridges/java_remote/XConnectionInputStream_Adapter.java
@@ -50,7 +50,7 @@ class XConnectionInputStream_Adapter extends InputStream {
public int read() throws IOException {
- int len = 0;
+ int len ;
try {
len = _xConnection.read(_bytes, 1);
diff --git a/jurt/com/sun/star/lib/uno/bridges/java_remote/XConnectionOutputStream_Adapter.java b/jurt/com/sun/star/lib/uno/bridges/java_remote/XConnectionOutputStream_Adapter.java
index 51f3594330ee..51e4b6d0182c 100644
--- a/jurt/com/sun/star/lib/uno/bridges/java_remote/XConnectionOutputStream_Adapter.java
+++ b/jurt/com/sun/star/lib/uno/bridges/java_remote/XConnectionOutputStream_Adapter.java
@@ -60,7 +60,7 @@ class XConnectionOutputStream_Adapter extends OutputStream {
}
public void write(byte[] b, int off, int len) throws IOException {
- byte bytes[] = null;
+ byte bytes[] ;
if(off == 0 && len == b.length)
bytes = b;
diff --git a/jurt/com/sun/star/lib/uno/bridges/java_remote/java_remote_bridge.java b/jurt/com/sun/star/lib/uno/bridges/java_remote/java_remote_bridge.java
index 221870b0b035..37f53629cc63 100644
--- a/jurt/com/sun/star/lib/uno/bridges/java_remote/java_remote_bridge.java
+++ b/jurt/com/sun/star/lib/uno/bridges/java_remote/java_remote_bridge.java
@@ -623,8 +623,6 @@ public class java_remote_bridge
checkDisposed();
- boolean goThroughThreadPool = false;
-
ThreadId threadId = _iThreadPool.getThreadId();
Object handle = _iThreadPool.attach(threadId);
try {
diff --git a/jurt/com/sun/star/lib/uno/protocols/urp/Unmarshal.java b/jurt/com/sun/star/lib/uno/protocols/urp/Unmarshal.java
index 5a500ad3a0c1..fe7ea2231589 100644
--- a/jurt/com/sun/star/lib/uno/protocols/urp/Unmarshal.java
+++ b/jurt/com/sun/star/lib/uno/protocols/urp/Unmarshal.java
@@ -91,7 +91,7 @@ final class Unmarshal {
public ThreadId readThreadId() {
int len = readCompressedNumber();
- byte[] data = null;
+ byte[] data ;
ThreadId id = null;
if (len != 0) {
data = new byte[len];
diff --git a/jurt/com/sun/star/lib/util/UrlToFileMapper.java b/jurt/com/sun/star/lib/util/UrlToFileMapper.java
index 22b6ccf0a745..9de0a199880f 100644
--- a/jurt/com/sun/star/lib/util/UrlToFileMapper.java
+++ b/jurt/com/sun/star/lib/util/UrlToFileMapper.java
@@ -145,7 +145,7 @@ public final class UrlToFileMapper {
try {
enc = (String) urlEncoderEncode.invoke(
null,
- new Object[] { new Character(c).toString(), "UTF-8" });
+ new Object[] {Character.toString(c), "UTF-8" });
} catch (IllegalAccessException e) {
throw new RuntimeException("This cannot happen: " + e);
} catch (InvocationTargetException e) {