File tree Expand file tree Collapse file tree
src/main/java/org/netbeans/modules/python/options Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -255,20 +255,20 @@ void load() {
255255
256256 }
257257
258+ static final File settingsSchema = PythonUtility .SETTINGS_SCHEMA ;
259+ static final JsonSchemaFactory factory = JsonSchemaFactory .getInstance (SpecVersion .VersionFlag .V7 );
260+
258261 void store () {
259262 if (controller .isChanged ()) {
260263 errroLabel .setText ("" );
261264 try {
262265 String jsonSettings = lspEditorPane .getText ();
263266
264- File settingsSchema = PythonUtility .SETTINGS_SCHEMA ;
265267 if (settingsSchema .exists ()) {
266- JsonSchemaFactory factory = JsonSchemaFactory .getInstance (SpecVersion .VersionFlag .V7 );
267268 JsonSchema jsonSchema = factory .getSchema (Files .readString (settingsSchema .toPath ()));
268269 JsonNode jsonNode = new ObjectMapper ().readTree (jsonSettings );
269270 Set <ValidationMessage > errors = jsonSchema .validate (jsonNode );
270271 if (!errors .isEmpty ()) {
271- errors .iterator ().next ().getMessage ();
272272 errroLabel .setText (errors .iterator ().next ().getMessage ());
273273 return ;
274274 }
You can’t perform that action at this time.
0 commit comments