Use deterministic order for configuration properties metadata
This commit updates the annotation processor to write metadata in a consistent way. Groups, properties and hints are written and each item is ordered alphabetically based on its name. Also, deprecated items are written last. Closes gh-14347
This commit is contained in:
@@ -18,8 +18,8 @@ package org.springframework.boot.configurationprocessor.json;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
|
||||
// Note: this class was written without inspecting the non-free org.json source code.
|
||||
@@ -111,7 +111,7 @@ public class JSONObject {
|
||||
* Creates a {@code JSONObject} with no name/value mappings.
|
||||
*/
|
||||
public JSONObject() {
|
||||
this.nameValuePairs = new HashMap<>();
|
||||
this.nameValuePairs = new LinkedHashMap<>();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user