connectivity/source/commontools/CommonTools.cxx | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-)
New commits: commit f66d734bcd994cb5fc2f38a8d9018e13385cd10c Author: Stephan Bergmann <sberg...@redhat.com> Date: Thu Feb 25 10:37:10 2016 +0100 The XJavaVM.getJavaVM return value can always be extracted to sal_Int64 (avoids warning with MSVC 2015) Change-Id: I9b3c5bc26a1e3df88a03e5fb295eb6a8fb63f824 diff --git a/connectivity/source/commontools/CommonTools.cxx b/connectivity/source/commontools/CommonTools.cxx index 8a0f25b..edc40bb 100644 --- a/connectivity/source/commontools/CommonTools.cxx +++ b/connectivity/source/commontools/CommonTools.cxx @@ -129,23 +129,12 @@ namespace connectivity processID[16] = 0; Any uaJVM = xVM->getJavaVM( processID ); - - if (!uaJVM.hasValue()) + sal_Int64 nTemp; + if (!(uaJVM >>= nTemp)) { throw Exception(); // -5 - else - { - sal_Int32 nValue = 0; - jvmaccess::VirtualMachine* pJVM = nullptr; - if ( uaJVM >>= nValue ) - pJVM = reinterpret_cast< jvmaccess::VirtualMachine* > (nValue); - else - { - sal_Int64 nTemp = 0; - uaJVM >>= nTemp; - pJVM = reinterpret_cast< jvmaccess::VirtualMachine* > (nTemp); - } - aRet = pJVM; } + aRet = reinterpret_cast<jvmaccess::VirtualMachine *>( + static_cast<sal_IntPtr>(nTemp)); } catch (Exception&) { _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits