Kaydet (Commit) f66d734b authored tarafından Stephan Bergmann's avatar Stephan Bergmann

The XJavaVM.getJavaVM return value can always be extracted to sal_Int64

(avoids warning with MSVC 2015)

Change-Id: I9b3c5bc26a1e3df88a03e5fb295eb6a8fb63f824
üst d79a4137
...@@ -129,23 +129,12 @@ namespace connectivity ...@@ -129,23 +129,12 @@ namespace connectivity
processID[16] = 0; processID[16] = 0;
Any uaJVM = xVM->getJavaVM( processID ); Any uaJVM = xVM->getJavaVM( processID );
sal_Int64 nTemp;
if (!uaJVM.hasValue()) if (!(uaJVM >>= nTemp)) {
throw Exception(); // -5 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&) catch (Exception&)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment