You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@juneau.apache.org by ja...@apache.org on 2021/01/22 14:23:50 UTC
[juneau] branch master updated: Minor perf improvement.
This is an automated email from the ASF dual-hosted git repository.
jamesbognar pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/juneau.git
The following commit(s) were added to refs/heads/master by this push:
new 30f17a4 Minor perf improvement.
30f17a4 is described below
commit 30f17a40e316ef5117fe67e1a9d73d30999d9eed
Author: JamesBognar <ja...@salesforce.com>
AuthorDate: Fri Jan 22 09:23:10 2021 -0500
Minor perf improvement.
---
.../src/main/java/org/apache/juneau/PropertyStore.java | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/PropertyStore.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/PropertyStore.java
index 9e8075f..317e4a4 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/PropertyStore.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/PropertyStore.java
@@ -198,15 +198,15 @@ public final class PropertyStore {
*/
public static PropertyStore DEFAULT = PropertyStore.create().build();
- final SortedMap<String,PropertyGroup> groups;
+ final Map<String,PropertyGroup> groups;
private final int hashCode;
// Created by PropertyStoreBuilder.build()
PropertyStore(Map<String,PropertyGroupBuilder> propertyMaps) {
- TreeMap<String,PropertyGroup> m = new TreeMap<>();
+ Map<String,PropertyGroup> m = new LinkedHashMap<>();
for (Map.Entry<String,PropertyGroupBuilder> p : propertyMaps.entrySet())
m.put(p.getKey(), p.getValue().build());
- this.groups = Collections.unmodifiableSortedMap(m);
+ this.groups = Collections.unmodifiableMap(m);
this.hashCode = groups.hashCode();
}
@@ -228,7 +228,7 @@ public final class PropertyStore {
}
private PropertyStore(SortedMap<String,PropertyGroup> propertyMaps) {
- this.groups = Collections.unmodifiableSortedMap(propertyMaps);
+ this.groups = Collections.unmodifiableMap(new LinkedHashMap<>(propertyMaps));
this.hashCode = groups.hashCode();
}
@@ -663,14 +663,14 @@ public final class PropertyStore {
* A group of properties with the same prefixes.
*/
public static class PropertyGroup {
- final SortedMap<String,Property> properties;
+ final Map<String,Property> properties;
private final int hashCode;
PropertyGroup(Map<String,MutableProperty> properties) {
- TreeMap<String,Property> m = new TreeMap<>();
+ Map<String,Property> m = new LinkedHashMap<>();
for (Map.Entry<String,MutableProperty> p : properties.entrySet())
m.put(p.getKey(), p.getValue().build());
- this.properties = Collections.unmodifiableSortedMap(m);
+ this.properties = Collections.unmodifiableMap(m);
this.hashCode = this.properties.hashCode();
}