ASF Bugzilla – Attachment 33201 Details for
Bug 58522
concurrency problem corrupts WARDirContext.Entry children
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposal
WARDirContext.patch (text/plain), 1.30 KB, created by
Violeta Georgieva
on 2015-10-23 15:07:07 UTC
(
hide
)
Description:
Proposal
Filename:
MIME Type:
Creator:
Violeta Georgieva
Created:
2015-10-23 15:07:07 UTC
Size:
1.30 KB
patch
obsolete
>Index: WARDirContext.java >=================================================================== >--- WARDirContext.java (revision 1710134) >+++ WARDirContext.java (working copy) >@@ -760,7 +760,6 @@ > > ArrayList<NamingEntry> entries = new ArrayList<NamingEntry>(); > Entry[] children = entry.getChildren(); >- Arrays.sort(children); > NamingEntry namingEntry = null; > > for (int i = 0; i < children.length; i++) { >@@ -811,6 +810,9 @@ > protected Entry children[] = new Entry[0]; > > >+ protected volatile boolean childrenSorted = false; >+ >+ > // ----------------------------------------------------- Public Methods > > >@@ -849,10 +851,19 @@ > newChildren[i] = children[i]; > newChildren[children.length] = entry; > children = newChildren; >+ childrenSorted = false; > } > > > public Entry[] getChildren() { >+ if (!childrenSorted) { >+ synchronized (children) { >+ if (!childrenSorted) { >+ Arrays.sort(children); >+ childrenSorted = true; >+ } >+ } >+ } > return children; > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 58522
:
33195
| 33201