Lines 760-766
Link Here
|
760 |
|
760 |
|
761 |
ArrayList<NamingEntry> entries = new ArrayList<NamingEntry>(); |
761 |
ArrayList<NamingEntry> entries = new ArrayList<NamingEntry>(); |
762 |
Entry[] children = entry.getChildren(); |
762 |
Entry[] children = entry.getChildren(); |
763 |
Arrays.sort(children); |
|
|
764 |
NamingEntry namingEntry = null; |
763 |
NamingEntry namingEntry = null; |
765 |
|
764 |
|
766 |
for (int i = 0; i < children.length; i++) { |
765 |
for (int i = 0; i < children.length; i++) { |
Lines 811-816
Link Here
|
811 |
protected Entry children[] = new Entry[0]; |
810 |
protected Entry children[] = new Entry[0]; |
812 |
|
811 |
|
813 |
|
812 |
|
|
|
813 |
protected volatile boolean childrenSorted = false; |
814 |
|
815 |
|
814 |
// ----------------------------------------------------- Public Methods |
816 |
// ----------------------------------------------------- Public Methods |
815 |
|
817 |
|
816 |
|
818 |
|
Lines 849-858
Link Here
|
849 |
newChildren[i] = children[i]; |
851 |
newChildren[i] = children[i]; |
850 |
newChildren[children.length] = entry; |
852 |
newChildren[children.length] = entry; |
851 |
children = newChildren; |
853 |
children = newChildren; |
|
|
854 |
childrenSorted = false; |
852 |
} |
855 |
} |
853 |
|
856 |
|
854 |
|
857 |
|
855 |
public Entry[] getChildren() { |
858 |
public Entry[] getChildren() { |
|
|
859 |
if (!childrenSorted) { |
860 |
synchronized (children) { |
861 |
if (!childrenSorted) { |
862 |
Arrays.sort(children); |
863 |
childrenSorted = true; |
864 |
} |
865 |
} |
866 |
} |
856 |
return children; |
867 |
return children; |
857 |
} |
868 |
} |
858 |
|
869 |
|