@@ -104,7 +104,7 @@ public Builder(String uri) {
104104 }
105105
106106 private static Map <String , Keyword > createKeywordsMap (Map <String , Keyword > kwords , Map <String , Format > formats ) {
107- final Map <String , Keyword > map = new HashMap <String , Keyword >();
107+ Map <String , Keyword > map = new HashMap <String , Keyword >();
108108 for (Map .Entry <String , Keyword > type : kwords .entrySet ()) {
109109 String keywordName = type .getKey ();
110110 Keyword keyword = type .getValue ();
@@ -119,7 +119,7 @@ private static Map<String, Keyword> createKeywordsMap(Map<String, Keyword> kword
119119 }
120120 final FormatKeyword formatKeyword = new FormatKeyword (ValidatorTypeCode .FORMAT , formats );
121121 map .put (formatKeyword .getValue (), formatKeyword );
122- return Collections . unmodifiableMap ( map ) ;
122+ return map ;
123123 }
124124
125125 public Builder addKeyword (Keyword keyword ) {
@@ -154,14 +154,14 @@ public Builder idKeyword(String idKeyword) {
154154
155155 public JsonMetaSchema build () {
156156 // create builtin keywords with (custom) formats.
157- final Map <String , Keyword > kwords = createKeywordsMap (keywords , formats );
157+ Map <String , Keyword > kwords = createKeywordsMap (keywords , formats );
158158 return new JsonMetaSchema (uri , idKeyword , kwords );
159159 }
160160 }
161161
162162 private final String uri ;
163163 private final String idKeyword ;
164- private final Map <String , Keyword > keywords ;
164+ private Map <String , Keyword > keywords ;
165165
166166 private JsonMetaSchema (String uri , String idKeyword , Map <String , Keyword > keywords ) {
167167 if (StringUtils .isBlank (uri )) {
@@ -267,6 +267,9 @@ public String getUri() {
267267 return uri ;
268268 }
269269
270+ public Map <String , Keyword > getKeywords () {
271+ return keywords ;
272+ }
270273
271274 public JsonValidator newValidator (ValidationContext validationContext , String schemaPath , String keyword /* keyword */ , JsonNode schemaNode ,
272275 JsonSchema parentSchema , String customMessage ) {
0 commit comments