From c5e08b42ace5f4481c3db87b4fb6ae2dbf9d9a51 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Fri, 8 May 2015 09:26:35 +0200 Subject: [PATCH] I very much assume this wants to call java.io.Reader.ready ...seeing that there is no java.io.Reader.available. (And then, there's no good way to map from java.io.Reader.ready's boolean value to css.io.XInputStream.available's long value, so conservatively map true to 1.) But I have no idea how to trigger this code. Change-Id: I18d12e0d968141410a1b56e700ed544edceda97c --- connectivity/source/drivers/jdbc/Reader.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/connectivity/source/drivers/jdbc/Reader.cxx b/connectivity/source/drivers/jdbc/Reader.cxx index a7cd3698c5a8..20db5108e8a5 100644 --- a/connectivity/source/drivers/jdbc/Reader.cxx +++ b/connectivity/source/drivers/jdbc/Reader.cxx @@ -57,19 +57,19 @@ void SAL_CALL java_io_Reader::skipBytes( sal_Int32 nBytesToSkip ) throw(::com::s sal_Int32 SAL_CALL java_io_Reader::available( ) throw(::com::sun::star::io::NotConnectedException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException, std::exception) { - jboolean out(sal_False); + jboolean out; SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); { static const char * cSignature = "()Z"; - static const char * cMethodName = "available"; + static const char * cMethodName = "ready"; // Java-Call static jmethodID mID(NULL); obtainMethodId_throwRuntime(t.pEnv, cMethodName,cSignature, mID); out = t.pEnv->CallBooleanMethod( object, mID); ThrowRuntimeException(t.pEnv,*this); } //t.pEnv - return out; + return out ? 1 : 0; // no way to tell *how much* is ready } void SAL_CALL java_io_Reader::closeInput( ) throw(::com::sun::star::io::NotConnectedException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException, std::exception)