Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
Openfire
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Openfire
Commits
a9fca53c
Commit
a9fca53c
authored
Nov 03, 2017
by
Guus der Kinderen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
OF-1424: Use weakly consistent impl to prevent CME.
parent
daf92ff2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
17 deletions
+18
-17
Group.java
src/java/org/jivesoftware/openfire/group/Group.java
+18
-17
No files found.
src/java/org/jivesoftware/openfire/group/Group.java
View file @
a9fca53c
...
...
@@ -28,6 +28,7 @@ import java.util.HashSet;
import
java.util.Iterator
;
import
java.util.Map
;
import
java.util.Set
;
import
java.util.concurrent.ConcurrentSkipListSet
;
import
org.jivesoftware.openfire.XMPPServer
;
import
org.jivesoftware.openfire.event.GroupEventDispatcher
;
...
...
@@ -62,8 +63,8 @@ public class Group implements Cacheable, Externalizable {
private
String
name
;
private
String
description
;
private
Set
<
JID
>
members
;
private
Set
<
JID
>
administrators
;
private
ConcurrentSkipList
Set
<
JID
>
members
;
private
ConcurrentSkipList
Set
<
JID
>
administrators
;
/**
* Constructor added for Externalizable. Do not use this constructor.
...
...
@@ -88,8 +89,8 @@ public class Group implements Cacheable, Externalizable {
this
.
provider
=
groupManager
.
getProvider
();
this
.
name
=
name
;
this
.
description
=
description
;
this
.
members
=
new
Hash
Set
<>(
members
);
this
.
administrators
=
new
Hash
Set
<>(
administrators
);
this
.
members
=
new
ConcurrentSkipList
Set
<>(
members
);
this
.
administrators
=
new
ConcurrentSkipList
Set
<>(
administrators
);
}
/**
...
...
@@ -110,8 +111,8 @@ public class Group implements Cacheable, Externalizable {
this
.
provider
=
groupManager
.
getProvider
();
this
.
name
=
name
;
this
.
description
=
description
;
this
.
members
=
new
Hash
Set
<>(
members
);
this
.
administrators
=
new
Hash
Set
<>(
administrators
);
this
.
members
=
new
ConcurrentSkipList
Set
<>(
members
);
this
.
administrators
=
new
ConcurrentSkipList
Set
<>(
administrators
);
this
.
properties
=
provider
.
loadProperties
(
this
);
...
...
@@ -502,8 +503,8 @@ public class Group implements Cacheable, Externalizable {
if
(
ExternalizableUtil
.
getInstance
().
readBoolean
(
in
))
{
description
=
ExternalizableUtil
.
getInstance
().
readSafeUTF
(
in
);
}
members
=
new
Hash
Set
<>();
administrators
=
new
Hash
Set
<>();
members
=
new
ConcurrentSkipList
Set
<>();
administrators
=
new
ConcurrentSkipList
Set
<>();
ExternalizableUtil
.
getInstance
().
readSerializableCollection
(
in
,
members
,
getClass
().
getClassLoader
());
ExternalizableUtil
.
getInstance
().
readSerializableCollection
(
in
,
administrators
,
getClass
().
getClassLoader
());
}
...
...
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