Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
2a62e615
Kaydet (Commit)
2a62e615
authored
Şub 12, 2015
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Remove uses of osl/diagnose.h from jvmaccess
Change-Id: Ic9cda5259db81dd921dd3fa891b1289b8283bf27
üst
d7bb79d8
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
20 deletions
+25
-20
log-areas.dox
include/sal/log-areas.dox
+1
-0
classpath.cxx
jvmaccess/source/classpath.cxx
+5
-3
unovirtualmachine.cxx
jvmaccess/source/unovirtualmachine.cxx
+5
-5
virtualmachine.cxx
jvmaccess/source/virtualmachine.cxx
+14
-12
No files found.
include/sal/log-areas.dox
Dosyayı görüntüle @
2a62e615
...
@@ -491,6 +491,7 @@ certain functionality.
...
@@ -491,6 +491,7 @@ certain functionality.
@li @c cppcanvas.emf
@li @c cppcanvas.emf
@li @c drawinglayer
@li @c drawinglayer
@li @c helpcompiler
@li @c helpcompiler
@li @c jvmaccess
@li @c linguistic
@li @c linguistic
@li @c mysqlc
@li @c mysqlc
@li @c postprocess.cppunit
@li @c postprocess.cppunit
...
...
jvmaccess/source/classpath.cxx
Dosyayı görüntüle @
2a62e615
...
@@ -21,6 +21,7 @@
...
@@ -21,6 +21,7 @@
#include "jvmaccess/classpath.hxx"
#include "jvmaccess/classpath.hxx"
#include <cassert>
#include <vector>
#include <vector>
#include "com/sun/star/lang/IllegalArgumentException.hpp"
#include "com/sun/star/lang/IllegalArgumentException.hpp"
...
@@ -32,7 +33,6 @@
...
@@ -32,7 +33,6 @@
#include "com/sun/star/uri/UriReferenceFactory.hpp"
#include "com/sun/star/uri/UriReferenceFactory.hpp"
#include "com/sun/star/uri/XVndSunStarExpandUrlReference.hpp"
#include "com/sun/star/uri/XVndSunStarExpandUrlReference.hpp"
#include "com/sun/star/util/theMacroExpander.hpp"
#include "com/sun/star/util/theMacroExpander.hpp"
#include "osl/diagnose.h"
#include "rtl/ustring.hxx"
#include "rtl/ustring.hxx"
#include "sal/types.h"
#include "sal/types.h"
...
@@ -42,7 +42,8 @@ jobjectArray jvmaccess::ClassPath::translateToUrls(
...
@@ -42,7 +42,8 @@ jobjectArray jvmaccess::ClassPath::translateToUrls(
css
::
uno
::
Reference
<
css
::
uno
::
XComponentContext
>
const
&
context
,
css
::
uno
::
Reference
<
css
::
uno
::
XComponentContext
>
const
&
context
,
JNIEnv
*
environment
,
OUString
const
&
classPath
)
JNIEnv
*
environment
,
OUString
const
&
classPath
)
{
{
OSL_ASSERT
(
context
.
is
()
&&
environment
!=
0
);
assert
(
context
.
is
());
assert
(
environment
!=
0
);
jclass
classUrl
(
environment
->
FindClass
(
"java/net/URL"
));
jclass
classUrl
(
environment
->
FindClass
(
"java/net/URL"
));
if
(
classUrl
==
0
)
{
if
(
classUrl
==
0
)
{
return
0
;
return
0
;
...
@@ -104,7 +105,8 @@ jclass jvmaccess::ClassPath::loadClass(
...
@@ -104,7 +105,8 @@ jclass jvmaccess::ClassPath::loadClass(
css
::
uno
::
Reference
<
css
::
uno
::
XComponentContext
>
const
&
context
,
css
::
uno
::
Reference
<
css
::
uno
::
XComponentContext
>
const
&
context
,
JNIEnv
*
environment
,
OUString
const
&
classPath
,
OUString
const
&
name
)
JNIEnv
*
environment
,
OUString
const
&
classPath
,
OUString
const
&
name
)
{
{
OSL_ASSERT
(
context
.
is
()
&&
environment
!=
0
);
assert
(
context
.
is
());
assert
(
environment
!=
0
);
jclass
classLoader
(
environment
->
FindClass
(
"java/net/URLClassLoader"
));
jclass
classLoader
(
environment
->
FindClass
(
"java/net/URLClassLoader"
));
if
(
classLoader
==
0
)
{
if
(
classLoader
==
0
)
{
return
0
;
return
0
;
...
...
jvmaccess/source/unovirtualmachine.cxx
Dosyayı görüntüle @
2a62e615
...
@@ -21,9 +21,8 @@
...
@@ -21,9 +21,8 @@
#include "jvmaccess/unovirtualmachine.hxx"
#include "jvmaccess/unovirtualmachine.hxx"
#include "osl/diagnose.h"
#include "jvmaccess/virtualmachine.hxx"
#include "jvmaccess/virtualmachine.hxx"
#include "sal/log.hxx"
#include "jni.h"
#include "jni.h"
...
@@ -66,9 +65,10 @@ UnoVirtualMachine::~UnoVirtualMachine() {
...
@@ -66,9 +65,10 @@ UnoVirtualMachine::~UnoVirtualMachine() {
getEnvironment
()
->
DeleteGlobalRef
(
getEnvironment
()
->
DeleteGlobalRef
(
static_cast
<
jobject
>
(
m_classLoader
));
static_cast
<
jobject
>
(
m_classLoader
));
}
catch
(
jvmaccess
::
VirtualMachine
::
AttachGuard
::
CreationException
&
)
{
}
catch
(
jvmaccess
::
VirtualMachine
::
AttachGuard
::
CreationException
&
)
{
OSL_TRACE
(
SAL_INFO
(
"jvmaccess::UnoVirtualMachine::~UnoVirtualMachine:"
"jvmaccess"
,
" jvmaccess::VirtualMachine::AttachGuard::CreationException"
);
"ignored"
" jvmaccess::VirtualMachine::AttachGuard::CreationException"
);
}
}
}
}
...
...
jvmaccess/source/virtualmachine.cxx
Dosyayı görüntüle @
2a62e615
...
@@ -17,9 +17,12 @@
...
@@ -17,9 +17,12 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
*/
#include
"jvmaccess/virtualmachine.hxx"
#include
<sal/config.h>
#include "osl/diagnose.h"
#include <cassert>
#include <jvmaccess/virtualmachine.hxx>
#include <sal/log.hxx>
using
jvmaccess
::
VirtualMachine
;
using
jvmaccess
::
VirtualMachine
;
...
@@ -44,7 +47,7 @@ VirtualMachine::AttachGuard::AttachGuard(
...
@@ -44,7 +47,7 @@ VirtualMachine::AttachGuard::AttachGuard(
rtl
::
Reference
<
VirtualMachine
>
const
&
rMachine
)
:
rtl
::
Reference
<
VirtualMachine
>
const
&
rMachine
)
:
m_xMachine
(
rMachine
)
m_xMachine
(
rMachine
)
{
{
OSL_ENSURE
(
m_xMachine
.
is
(),
"bad parameter"
);
assert
(
m_xMachine
.
is
()
);
m_pEnvironment
=
m_xMachine
->
attachThread
(
&
m_bDetach
);
m_pEnvironment
=
m_xMachine
->
attachThread
(
&
m_bDetach
);
if
(
m_pEnvironment
==
0
)
if
(
m_pEnvironment
==
0
)
throw
CreationException
();
throw
CreationException
();
...
@@ -61,8 +64,9 @@ VirtualMachine::VirtualMachine(JavaVM * pVm, int nVersion, bool bDestroy,
...
@@ -61,8 +64,9 @@ VirtualMachine::VirtualMachine(JavaVM * pVm, int nVersion, bool bDestroy,
m_pVm
(
pVm
),
m_nVersion
(
nVersion
),
m_bDestroy
(
bDestroy
)
m_pVm
(
pVm
),
m_nVersion
(
nVersion
),
m_bDestroy
(
bDestroy
)
{
{
(
void
)
pMainThreadEnv
;
// avoid warnings
(
void
)
pMainThreadEnv
;
// avoid warnings
OSL_ENSURE
(
pVm
!=
0
&&
nVersion
>=
JNI_VERSION_1_2
&&
pMainThreadEnv
!=
0
,
assert
(
pVm
!=
0
);
"bad parameter"
);
assert
(
nVersion
>=
JNI_VERSION_1_2
);
assert
(
pMainThreadEnv
);
}
}
VirtualMachine
::~
VirtualMachine
()
VirtualMachine
::~
VirtualMachine
()
...
@@ -75,7 +79,7 @@ VirtualMachine::~VirtualMachine()
...
@@ -75,7 +79,7 @@ VirtualMachine::~VirtualMachine()
// forever.
// forever.
/*
/*
jint n = m_pVm->DestroyJavaVM();
jint n = m_pVm->DestroyJavaVM();
OSL_ENSURE(n == JNI_OK
, "JNI: DestroyJavaVM failed");
SAL_WARN_IF(n != JNI_OK, "jvmaccess"
, "JNI: DestroyJavaVM failed");
*/
*/
}
}
}
}
...
@@ -85,9 +89,8 @@ JNIEnv * VirtualMachine::attachThread(bool * pAttached) const
...
@@ -85,9 +89,8 @@ JNIEnv * VirtualMachine::attachThread(bool * pAttached) const
assert
(
pAttached
!=
0
&&
"bad parameter"
);
assert
(
pAttached
!=
0
&&
"bad parameter"
);
JNIEnv
*
pEnv
;
JNIEnv
*
pEnv
;
jint
n
=
m_pVm
->
GetEnv
(
reinterpret_cast
<
void
**
>
(
&
pEnv
),
m_nVersion
);
jint
n
=
m_pVm
->
GetEnv
(
reinterpret_cast
<
void
**
>
(
&
pEnv
),
m_nVersion
);
if
(
n
!=
JNI_OK
&&
n
!=
JNI_EDETACHED
)
{
SAL_WARN_IF
(
OSL_FAIL
(
"JNI: GetEnv failed"
);
n
!=
JNI_OK
&&
n
!=
JNI_EDETACHED
,
"jvmaccess"
,
"JNI: GetEnv failed"
);
}
if
(
pEnv
==
0
)
if
(
pEnv
==
0
)
{
{
if
(
m_pVm
->
AttachCurrentThread
if
(
m_pVm
->
AttachCurrentThread
...
@@ -111,9 +114,8 @@ JNIEnv * VirtualMachine::attachThread(bool * pAttached) const
...
@@ -111,9 +114,8 @@ JNIEnv * VirtualMachine::attachThread(bool * pAttached) const
void
VirtualMachine
::
detachThread
()
const
void
VirtualMachine
::
detachThread
()
const
{
{
if
(
m_pVm
->
DetachCurrentThread
()
!=
JNI_OK
)
{
jint
n
=
m_pVm
->
DetachCurrentThread
();
OSL_FAIL
(
"JNI: DetachCurrentThread failed"
);
SAL_WARN_IF
(
n
!=
JNI_OK
,
"jvmaccess"
,
"JNI: DetachCurrentThread failed"
);
}
}
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment