diff options
author | Noel Grandin <noel@peralex.com> | 2014-08-05 09:54:58 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-08-05 11:31:50 +0200 |
commit | 0c5f51ebbcb7e22baa913e2012e3dcfcc6cf7897 (patch) | |
tree | 3d441110176e37c1a6ba2d15a3653d5023863075 /javaunohelper | |
parent | d26540bb05b0443e7988da34372c86f88cbf1f6c (diff) |
java: remove commented out code
Change-Id: I44e2043e5da23bc9421c03e550ef1d8b7ebaad36
Diffstat (limited to 'javaunohelper')
8 files changed, 0 insertions, 111 deletions
diff --git a/javaunohelper/com/sun/star/lib/uno/adapter/ByteArrayToXInputStreamAdapter.java b/javaunohelper/com/sun/star/lib/uno/adapter/ByteArrayToXInputStreamAdapter.java index 1557bfde5a15..fd6553aecaca 100644 --- a/javaunohelper/com/sun/star/lib/uno/adapter/ByteArrayToXInputStreamAdapter.java +++ b/javaunohelper/com/sun/star/lib/uno/adapter/ByteArrayToXInputStreamAdapter.java @@ -45,7 +45,6 @@ public class ByteArrayToXInputStreamAdapter } public void init(byte[] bytes) { - // System.err.println("ByteArrayXInputStream"); m_bytes = bytes; m_length = bytes.length; m_pos = 0; @@ -54,11 +53,9 @@ public class ByteArrayToXInputStreamAdapter private void _check() throws com.sun.star.io.NotConnectedException, com.sun.star.io.IOException { if (m_bytes == null) { - // System.err.println("check failed no bytes!"); throw new com.sun.star.io.NotConnectedException("no bytes"); } if(!m_open) { - // System.err.println("check failed: closed"); throw new com.sun.star.io.IOException("input closed"); } } @@ -69,19 +66,16 @@ public class ByteArrayToXInputStreamAdapter if (a != (int)a) throw new com.sun.star.io.IOException("integer overflow"); else { - // System.err.println("available() -> "+a); return (int)a; } } public void closeInput() throws com.sun.star.io.NotConnectedException, com.sun.star.io.IOException { - // System.err.println("closeInput()"); _check(); m_open = false; } public int readBytes(byte[][] values, int param) throws com.sun.star.io.NotConnectedException, com.sun.star.io.BufferSizeExceededException, com.sun.star.io.IOException { - // System.err.println("readbytes(..., "+param+")"); _check(); try { int remain = (m_length - m_pos); @@ -89,30 +83,24 @@ public class ByteArrayToXInputStreamAdapter /* ARGH!!! */ if (values[0] == null){ values[0] = new byte[param]; - // System.err.println("allocated new buffer of "+param+" bytes"); } System.arraycopy(m_bytes, m_pos, values[0], 0, param); - // System.err.println("readbytes() -> "+param); m_pos += param; return param; } catch (ArrayIndexOutOfBoundsException ae) { - // System.err.println("readbytes() -> ArrayIndexOutOfBounds"); ae.printStackTrace(); throw new com.sun.star.io.BufferSizeExceededException("buffer overflow"); } catch (Exception e) { - // System.err.println("readbytes() -> Exception: "+e.getMessage()); e.printStackTrace(); throw new com.sun.star.io.IOException("error accessing buffer"); } } public int readSomeBytes(byte[][] values, int param) throws com.sun.star.io.NotConnectedException, com.sun.star.io.BufferSizeExceededException, com.sun.star.io.IOException { - // System.err.println("readSomebytes()"); return readBytes(values, param); } public void skipBytes(int param) throws com.sun.star.io.NotConnectedException, com.sun.star.io.BufferSizeExceededException, com.sun.star.io.IOException { - // System.err.println("skipBytes("+param+")"); _check(); if (param > (m_length - m_pos)) throw new com.sun.star.io.BufferSizeExceededException("buffer overflow"); @@ -120,28 +108,19 @@ public class ByteArrayToXInputStreamAdapter } public long getLength() throws com.sun.star.io.IOException { - // System.err.println("getLength() -> "+m_length); if (m_bytes != null) return m_length; else throw new com.sun.star.io.IOException("no bytes"); } public long getPosition() throws com.sun.star.io.IOException { - // System.err.println("getPosition() -> "+m_pos); if (m_bytes != null) return m_pos; else throw new com.sun.star.io.IOException("no bytes"); } public void seek(long param) throws com.sun.star.lang.IllegalArgumentException, com.sun.star.io.IOException { - // System.err.println("seek("+param+")"); if (m_bytes != null){ if (param < 0 || param > m_length) throw new com.sun.star.lang.IllegalArgumentException("invalid seek position"); else m_pos = (int)param; }else throw new com.sun.star.io.IOException("no bytes"); } - - public void finalize() throws Throwable{ - // System.err.println("finalizer called for ByteArrayXInputStream!"); - super.finalize(); - } - } diff --git a/javaunohelper/com/sun/star/lib/uno/adapter/XOutputStreamToByteArrayAdapter.java b/javaunohelper/com/sun/star/lib/uno/adapter/XOutputStreamToByteArrayAdapter.java index 8488e22f7225..ad6079346c77 100644 --- a/javaunohelper/com/sun/star/lib/uno/adapter/XOutputStreamToByteArrayAdapter.java +++ b/javaunohelper/com/sun/star/lib/uno/adapter/XOutputStreamToByteArrayAdapter.java @@ -47,11 +47,9 @@ public class XOutputStreamToByteArrayAdapter externalBuffer = true; buffer = aBuffer; size = buffer.length; - // System.err.println("new outputbuffer with external storage"); } else { size = initialSize; buffer = new byte[size]; - // System.err.println("new outputbuffer with internal storage"); } } @@ -85,14 +83,12 @@ public class XOutputStreamToByteArrayAdapter com.sun.star.io.BufferSizeExceededException, com.sun.star.io.IOException { - // System.err.println("writeBytes("+values.length+")"); if ( values.length > size-position ) { if ( externalBuffer ) throw new BufferSizeExceededException("out of buffer space, cannot grow external buffer"); while ( values.length > size-position ) size *= 2; - // System.err.println("new buffer size is "+size+" bytes."); byte[] newBuffer = new byte[size]; System.arraycopy(buffer, 0, newBuffer, 0, position); buffer = newBuffer; diff --git a/javaunohelper/com/sun/star/lib/uno/helper/InterfaceContainer.java b/javaunohelper/com/sun/star/lib/uno/helper/InterfaceContainer.java index 342e732e1af4..02b926539d6a 100644 --- a/javaunohelper/com/sun/star/lib/uno/helper/InterfaceContainer.java +++ b/javaunohelper/com/sun/star/lib/uno/helper/InterfaceContainer.java @@ -100,7 +100,6 @@ public class InterfaceContainer implements Cloneable private int size; - //private ArrayList data= new ArrayList(); /** Creates a new instance of InterfaceContainer */ public InterfaceContainer() { diff --git a/javaunohelper/test/com/sun/star/lib/uno/helper/AWeakBase.java b/javaunohelper/test/com/sun/star/lib/uno/helper/AWeakBase.java index 275ae5195060..1217b0274a9a 100644 --- a/javaunohelper/test/com/sun/star/lib/uno/helper/AWeakBase.java +++ b/javaunohelper/test/com/sun/star/lib/uno/helper/AWeakBase.java @@ -33,7 +33,6 @@ public class AWeakBase extends WeakBase implements XEventListener public void disposing(com.sun.star.lang.EventObject eventObject) { -// System.out.println(getClass().getName() + " .disposing called"); nDisposingCalled++; } diff --git a/javaunohelper/test/com/sun/star/lib/uno/helper/InterfaceContainer_Test.java b/javaunohelper/test/com/sun/star/lib/uno/helper/InterfaceContainer_Test.java index 8e79811fd4aa..976968f1a6a0 100644 --- a/javaunohelper/test/com/sun/star/lib/uno/helper/InterfaceContainer_Test.java +++ b/javaunohelper/test/com/sun/star/lib/uno/helper/InterfaceContainer_Test.java @@ -23,7 +23,6 @@ import java.util.ListIterator; import com.sun.star.uno.XWeak; import com.sun.star.lang.XTypeProvider; import java.util.ArrayList; -//import com.sun.star.lib.uno.environments.java.Proxy; import com.sun.star.lib.uno.environments.java.java_environment; import java.util.List; diff --git a/javaunohelper/test/com/sun/star/lib/uno/helper/MultiTypeInterfaceContainer_Test.java b/javaunohelper/test/com/sun/star/lib/uno/helper/MultiTypeInterfaceContainer_Test.java index 3aaa764a037d..e8bef98a427c 100644 --- a/javaunohelper/test/com/sun/star/lib/uno/helper/MultiTypeInterfaceContainer_Test.java +++ b/javaunohelper/test/com/sun/star/lib/uno/helper/MultiTypeInterfaceContainer_Test.java @@ -22,13 +22,11 @@ import com.sun.star.uno.XWeak; import com.sun.star.lang.XTypeProvider; import java.util.ArrayList; import com.sun.star.uno.Type; -//import com.sun.star.lib.uno.environments.java.Proxy; import com.sun.star.uno.XInterface; import com.sun.star.lang.XSingleComponentFactory; public class MultiTypeInterfaceContainer_Test { -// java_environment env= new java_environment(null); /** Creates a new instance of InterfaceContainerTest */ AWeakBase obj1,obj2,obj3,obj4; Object proxyObj1Weak1; @@ -71,39 +69,6 @@ public class MultiTypeInterfaceContainer_Test list3.add(proxyObj2TypeProv); list3.add(proxyObj3Weak1); } - /** returns Holder proxy objects for the specified interface. If the method is called - * several times with the same arguments then each time a new HolderProxy is returned. - * Then all HolderProxy s refer to the same Proxy object. - * The proxy can be queried for XEventListener. On the returned proxy disposing can be called - * - */ -// public Object getHolderProxy(Object obj, Class iface) -// { -// Object retVal= null; -// if (obj == null || iface == null || iface.isInstance(obj) == false ) -// return retVal; -// -// Type type= new Type(TypeDescription.getTypeDescription(iface)); -// Type evtType= new Type(TypeDescription.getTypeDescription(com.sun.star.lang.XEventListener.class)); -// // find the object identifier -// String sOid= UnoRuntime.generateOid(obj); -// retVal= env.getRegisteredInterface(sOid, type); -// // if retVal == null then probably not registered -// if (retVal == null) -// { -// // create the XEventListener proxy -// Requester eventRequester = new Requester(false, false, null); -// Object aProxyEvt = Proxy.create(eventRequester, sOid, evtType, false, false); -// String[] arOid= new String[]{sOid}; -// retVal= env.registerInterface(aProxyEvt, arOid, evtType); -// -// Requester requester = new Requester(false, false, aProxyEvt); -// Object aProxy = Proxy.create(requester, sOid, type, false, false); -// arOid= new String[] {sOid}; -// retVal= env.registerInterface(aProxy, arOid, type); -// } -// return retVal; -// } public boolean addInterface() { diff --git a/javaunohelper/test/com/sun/star/lib/uno/helper/ProxyProvider.java b/javaunohelper/test/com/sun/star/lib/uno/helper/ProxyProvider.java index f25beefbe805..d2c1bbfa7b48 100644 --- a/javaunohelper/test/com/sun/star/lib/uno/helper/ProxyProvider.java +++ b/javaunohelper/test/com/sun/star/lib/uno/helper/ProxyProvider.java @@ -22,9 +22,7 @@ import com.sun.star.lib.uno.typedesc.TypeDescription; import com.sun.star.uno.UnoRuntime; import com.sun.star.lang.XEventListener; import com.sun.star.uno.IQueryInterface; -//import com.sun.star.lib.uno.environments.java.Proxy; import com.sun.star.lib.uno.environments.java.java_environment; -//import com.sun.star.lib.uno.environments.java.IRequester; public class ProxyProvider @@ -108,49 +106,5 @@ class Proxy implements IQueryInterface, XEventListener } -//class Requester //implements IRequester -//{ -// int _modus; -// boolean _virtual; -// boolean _forceSynchronous; -// boolean _passed = true; -// -// Object _xEventListenerProxy; -// int nDisposingCalled= 0; -// -// Requester(boolean virtual, boolean forceSynchronous, Object evtListener) -// { -// _virtual = virtual; -// _forceSynchronous = forceSynchronous; -// _xEventListenerProxy= evtListener; -// -// } -// -// public Object sendRequest(Object object, -// Type type, -// String operation, -// Object params[], -// Boolean synchron[], -// Boolean mustReply[]) throws Throwable -// { -// -// Object result = null; -// if (operation.equals("disposing")) -// { -// System.out.println("Disposing called on XEventListener proxy"); -// nDisposingCalled++; -// } -// else if (operation.equals("queryInterface")) -// { -// if (params[0] instanceof Type) -// { -// Type t= (Type) params[0]; -// if (t.equals( new Type("com.sun.star.lang.XEventListener"))) -// result= _xEventListenerProxy; -// } -// } -// return result; -// } -//} diff --git a/javaunohelper/test/com/sun/star/lib/uno/helper/WeakBase_Test.java b/javaunohelper/test/com/sun/star/lib/uno/helper/WeakBase_Test.java index f70f1b210993..6177a82e53db 100644 --- a/javaunohelper/test/com/sun/star/lib/uno/helper/WeakBase_Test.java +++ b/javaunohelper/test/com/sun/star/lib/uno/helper/WeakBase_Test.java @@ -85,11 +85,9 @@ public class WeakBase_Test StringBuffer buff= new StringBuffer(); for (int c= 0; c < ar.length - 4; c++){ buff.append((char) ar[4 + c]); -// buff.append(" "); } String retStr= buff.toString(); r[i++]= retStr.equals("com.sun.star.lib.uno.helper.SomeClass"); -// System.out.println(buff.toString()); Foo1 f1= new Foo1(); Foo1 f2= new Foo1(); |