matthiasblaesing commented on a change in pull request #2336:
URL: https://github.com/apache/netbeans/pull/2336#discussion_r485096324



##########
File path: 
enterprise/web.freeform/src/org/netbeans/modules/web/freeform/WebModules.java
##########
@@ -193,11 +193,7 @@ private FileObject getFile (Element parent, String 
fileElName) {
         Set<FileObject> srcRootSet = new HashSet<FileObject>();
         for (int i = 0; i < sg.length; i++) {
             URL entry; 
-            try {
-                entry = sg[i].getRootFolder().getURL();
-            } catch (FileStateInvalidException x) {
-                throw new AssertionError(x);
-            }
+            entry = sg[i].getRootFolder().toURL();

Review comment:
       Please merge new lines 195+196

##########
File path: 
enterprise/j2ee.ddloaders/src/org/netbeans/modules/j2ee/ddloaders/web/DDDataNode.java
##########
@@ -73,11 +73,7 @@ public String getShortDescription() {
         if (saxError == null) {
             if (dataObject instanceof DDFragmentDataObject) {
                 URL url = null;
-                try {
-                    url = dataObject.getPrimaryFile().getURL();
-                } catch (FileStateInvalidException ex) {
-                    // ignore
-                }
+                url = dataObject.getPrimaryFile().toURL();

Review comment:
       could you please merge the new lines 75 + 76? The null assignement is 
unecessary.

##########
File path: ide/image/src/org/netbeans/modules/image/ImageDataObject.java
##########
@@ -330,13 +315,8 @@ public ImageWidthProperty() {
 
           /** Gets value of property. Overrides superclass method. */
           public Integer getValue() throws InvocationTargetException {

Review comment:
       Is it intentional, that the `InvocationTargetException` was not removed? 
This is in contrast to new line 238.

##########
File path: 
java/dbschema/src/org/netbeans/modules/dbschema/SchemaElementUtil.java
##########
@@ -59,7 +59,7 @@ public static SchemaElement forName(String name, Object obj) {
                 String tempURL = ""; //NOI18N
                 if (schemaFO != null)
                     try {
-                        tempURL = schemaFO.getURL().toString();
+                        tempURL = schemaFO.toURL().toString();
                     } catch (Exception exc) {

Review comment:
       Is this catch still necessary? At lease I would reduce it to 
`RuntimeException` or is thee another checked exception that could be thrown?

##########
File path: java/i18n/src/org/netbeans/modules/i18n/wizard/Util.java
##########
@@ -179,15 +179,9 @@ static boolean wizardEnabled(Node[] activatedNodes) {
                 FileObject primaryFile = dobj.getPrimaryFile();
                 
                 boolean isLocal;
-                try {
-                    isLocal = !primaryFile.isVirtual()
+                isLocal = !primaryFile.isVirtual()

Review comment:
       Please merge new lines 181 + 182

##########
File path: ide/image/src/org/netbeans/modules/image/ImageDataObject.java
##########
@@ -353,13 +333,8 @@ public ImageHeightProperty() {
 
           /** Gets value of property. Overrides superclass method. */
           public Integer getValue() throws InvocationTargetException {

Review comment:
       Is it intentional, that the `InvocationTargetException` was not removed? 
This is in contrast to new line 238.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

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

Reply via email to