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
90b27c94
Kaydet (Commit)
90b27c94
authored
Mar 10, 2014
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
javaunohelper: simplify deprecated XTypeProvider.getImplementationId
Change-Id: I63f111811b4b09bf4dd376d0c02e3c03a6555e48
üst
92793340
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
32 deletions
+2
-32
WeakBase.java
javaunohelper/com/sun/star/lib/uno/helper/WeakBase.java
+2
-32
No files found.
javaunohelper/com/sun/star/lib/uno/helper/WeakBase.java
Dosyayı görüntüle @
90b27c94
...
...
@@ -38,7 +38,6 @@ public class WeakBase implements XWeak, XTypeProvider
// They have to be notified when this object dies
private
WeakAdapter
m_adapter
;
protected
static
Map
<
Class
<?>,
byte
[]>
_mapImplementationIds
=
new
HashMap
<
Class
<?>,
byte
[]>();
protected
static
Map
<
Class
<?>,
Type
[]>
_mapTypes
=
new
HashMap
<
Class
<?>,
Type
[]>();
/** Method of XWeak. The returned XAdapter implementation can be used to keap
...
...
@@ -94,39 +93,10 @@ public class WeakBase implements XWeak, XTypeProvider
return
arTypes
;
}
/** Method of XTypeProvider. It provides an identifier that represents the set of UNO
* interfaces implemented by this class. All instances of this class
* which run in the same Java Virtual Machine return the same array. (This only works as long
* the ClassLoader preserves the class even if no instance exist.)
*@return identifier as array of bytes
/** Obsolete method of XTypeProvider.
*/
public
byte
[]
getImplementationId
()
{
byte
[]
id
=
null
;
synchronized
(
_mapImplementationIds
)
{
id
=
_mapImplementationIds
.
get
(
getClass
());
if
(
id
==
null
)
{
int
hash
=
hashCode
();
String
sName
=
getClass
().
getName
();
byte
[]
arName
=
sName
.
getBytes
();
int
nNameLength
=
arName
.
length
;
id
=
new
byte
[
4
+
nNameLength
];
id
[
0
]=
(
byte
)(
hash
&
0xff
);
id
[
1
]=
(
byte
)((
hash
>>>
8
)
&
0xff
);
id
[
2
]=
(
byte
)((
hash
>>>
16
)
&
0xff
);
id
[
3
]=
(
byte
)((
hash
>>>
24
)
&
0xff
);
for
(
int
i
=
0
;
i
<
nNameLength
;
i
++)
{
id
[
4
+
i
]=
arName
[
i
];
}
_mapImplementationIds
.
put
(
getClass
(),
id
);
}
}
return
id
;
return
new
byte
[
0
];
}
}
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