You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by ma...@apache.org on 2021/11/14 19:16:27 UTC

[netbeans] branch master updated: Handle invalid package.json only containing a single string

This is an automated email from the ASF dual-hosted git repository.

matthiasblaesing pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/netbeans.git


The following commit(s) were added to refs/heads/master by this push:
     new 6b6b6f9  Handle invalid package.json only containing a single string
     new 735dcf7  Merge pull request #3318 from matthiasblaesing/client_project_catch_exception
6b6b6f9 is described below

commit 6b6b6f9d8e8fe3ab9c2f849f855f2095d21b500c
Author: Matthias Bläsing <mb...@doppel-helix.eu>
AuthorDate: Fri Nov 12 22:18:41 2021 +0100

    Handle invalid package.json only containing a single string
    
    If package.json is a string (invalid format) a ClassCastException is
    raised and not a ParseException. The ClassCastException should be
    handled identically to the other fatal exceptions.
---
 .../netbeans/modules/web/clientproject/ClientSideProjectConvertor.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/webcommon/web.clientproject/src/org/netbeans/modules/web/clientproject/ClientSideProjectConvertor.java b/webcommon/web.clientproject/src/org/netbeans/modules/web/clientproject/ClientSideProjectConvertor.java
index f694a57..b2fc53e 100644
--- a/webcommon/web.clientproject/src/org/netbeans/modules/web/clientproject/ClientSideProjectConvertor.java
+++ b/webcommon/web.clientproject/src/org/netbeans/modules/web/clientproject/ClientSideProjectConvertor.java
@@ -109,7 +109,7 @@ public final class ClientSideProjectConvertor implements ProjectConvertor {
             if (name instanceof String) {
                 return (String) name;
             }
-        } catch (ParseException | IOException ex) {
+        } catch (ParseException | IOException | ClassCastException ex) {
             LOGGER.log(Level.FINE, jsonFile.getPath(), ex);
         }
         return null;

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists