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
81da71b6
Kaydet (Commit)
81da71b6
authored
Kas 10, 2015
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
loplugin:nullptr (automatic rewrite)
Change-Id: I226aeb4787a4c30e17fb54dc7775a288aa09b760
üst
6794c2e4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
20 deletions
+20
-20
classpath.cxx
jvmaccess/source/classpath.cxx
+12
-12
unovirtualmachine.cxx
jvmaccess/source/unovirtualmachine.cxx
+2
-2
virtualmachine.cxx
jvmaccess/source/virtualmachine.cxx
+6
-6
No files found.
jvmaccess/source/classpath.cxx
Dosyayı görüntüle @
81da71b6
...
...
@@ -43,15 +43,15 @@ jobjectArray jvmaccess::ClassPath::translateToUrls(
JNIEnv
*
environment
,
OUString
const
&
classPath
)
{
assert
(
context
.
is
());
assert
(
environment
!=
0
);
assert
(
environment
!=
nullptr
);
jclass
classUrl
(
environment
->
FindClass
(
"java/net/URL"
));
if
(
classUrl
==
0
)
{
return
0
;
if
(
classUrl
==
nullptr
)
{
return
nullptr
;
}
jmethodID
ctorUrl
(
environment
->
GetMethodID
(
classUrl
,
"<init>"
,
"(Ljava/lang/String;)V"
));
if
(
ctorUrl
==
0
)
{
return
0
;
if
(
ctorUrl
==
nullptr
)
{
return
nullptr
;
}
::
std
::
vector
<
jobject
>
urls
;
for
(
::
sal_Int32
i
=
0
;
i
!=
-
1
;)
{
...
...
@@ -76,22 +76,22 @@ jobjectArray jvmaccess::ClassPath::translateToUrls(
arg
.
l
=
environment
->
NewString
(
static_cast
<
jchar
const
*
>
(
url
.
getStr
()),
static_cast
<
jsize
>
(
url
.
getLength
()));
if
(
arg
.
l
==
0
)
{
return
0
;
if
(
arg
.
l
==
nullptr
)
{
return
nullptr
;
}
jobject
o
(
environment
->
NewObjectA
(
classUrl
,
ctorUrl
,
&
arg
));
if
(
o
==
0
)
{
return
0
;
if
(
o
==
nullptr
)
{
return
nullptr
;
}
urls
.
push_back
(
o
);
}
}
jobjectArray
result
=
environment
->
NewObjectArray
(
static_cast
<
jsize
>
(
urls
.
size
()),
classUrl
,
0
);
static_cast
<
jsize
>
(
urls
.
size
()),
classUrl
,
nullptr
);
// static_cast is ok, as each element of urls occupied at least one
// character of the OUString classPath
if
(
result
==
0
)
{
return
0
;
if
(
result
==
nullptr
)
{
return
nullptr
;
}
jsize
idx
=
0
;
for
(
std
::
vector
<
jobject
>::
iterator
i
(
urls
.
begin
());
i
!=
urls
.
end
();
++
i
)
...
...
jvmaccess/source/unovirtualmachine.cxx
Dosyayı görüntüle @
81da71b6
...
...
@@ -45,14 +45,14 @@ UnoVirtualMachine::UnoVirtualMachine(
rtl
::
Reference
<
jvmaccess
::
VirtualMachine
>
const
&
virtualMachine
,
void
*
classLoader
)
:
m_virtualMachine
(
virtualMachine
),
m_classLoader
(
0
)
m_classLoader
(
nullptr
)
{
try
{
m_classLoader
=
jvmaccess
::
VirtualMachine
::
AttachGuard
(
m_virtualMachine
).
getEnvironment
()
->
NewGlobalRef
(
static_cast
<
jobject
>
(
classLoader
));
}
catch
(
jvmaccess
::
VirtualMachine
::
AttachGuard
::
CreationException
&
)
{}
if
(
m_classLoader
==
0
)
{
if
(
m_classLoader
==
nullptr
)
{
throw
CreationException
();
}
}
...
...
jvmaccess/source/virtualmachine.cxx
Dosyayı görüntüle @
81da71b6
...
...
@@ -49,7 +49,7 @@ VirtualMachine::AttachGuard::AttachGuard(
{
assert
(
m_xMachine
.
is
());
m_pEnvironment
=
m_xMachine
->
attachThread
(
&
m_bDetach
);
if
(
m_pEnvironment
==
0
)
if
(
m_pEnvironment
==
nullptr
)
throw
CreationException
();
}
...
...
@@ -64,7 +64,7 @@ VirtualMachine::VirtualMachine(JavaVM * pVm, int nVersion, bool bDestroy,
m_pVm
(
pVm
),
m_nVersion
(
nVersion
),
m_bDestroy
(
bDestroy
)
{
(
void
)
pMainThreadEnv
;
// avoid warnings
assert
(
pVm
!=
0
);
assert
(
pVm
!=
nullptr
);
assert
(
nVersion
>=
JNI_VERSION_1_2
);
assert
(
pMainThreadEnv
);
}
...
...
@@ -86,12 +86,12 @@ VirtualMachine::~VirtualMachine()
JNIEnv
*
VirtualMachine
::
attachThread
(
bool
*
pAttached
)
const
{
assert
(
pAttached
!=
0
&&
"bad parameter"
);
assert
(
pAttached
!=
nullptr
&&
"bad parameter"
);
JNIEnv
*
pEnv
;
jint
n
=
m_pVm
->
GetEnv
(
reinterpret_cast
<
void
**
>
(
&
pEnv
),
m_nVersion
);
SAL_WARN_IF
(
n
!=
JNI_OK
&&
n
!=
JNI_EDETACHED
,
"jvmaccess"
,
"JNI: GetEnv failed"
);
if
(
pEnv
==
0
)
if
(
pEnv
==
nullptr
)
{
if
(
m_pVm
->
AttachCurrentThread
(
...
...
@@ -102,9 +102,9 @@ JNIEnv * VirtualMachine::attachThread(bool * pAttached) const
// JNIEnv** and not void **
&
pEnv
,
#endif
0
)
nullptr
)
!=
JNI_OK
)
return
0
;
return
nullptr
;
*
pAttached
=
true
;
}
else
...
...
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