You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2022/06/08 14:46:51 UTC

[GitHub] [netbeans] mbien commented on a diff in pull request #4205: JDK downloader improvements

mbien commented on code in PR #4205:
URL: https://github.com/apache/netbeans/pull/4205#discussion_r892480489


##########
java/java.disco/src/org/netbeans/modules/java/disco/BundleTableModel.java:
##########
@@ -41,57 +69,37 @@ public BundleTableModel(final List<Pkg> bundles) {
     }
 
 
-    public List<Pkg> getBundles() { return bundles; }
+    public List<Pkg> getBundles() {
+        return bundles;
+    }
+
     public void setBundles(final List<Pkg> bundles) {
         this.bundles = bundles;
         this.fireTableDataChanged();
     }
 
-    public @NonNull String getColumnName(final int col) {
-        switch(col) {
-            case 0 :
-            case 1 :
-            case 2 :
-            case 3 :
-            case 4 :
-            case 5 : return columnNames[col];
-            default: throw new IllegalArgumentException("Column not found " + col);
-        }
+    @Override
+    public int getRowCount() {

Review Comment:
   yeah sorry about that. If you look at the final result you might see why I did that. I often put similar methods next to each other so that the eye can read the file faster (since we humans are really good at matching patterns). I think I moved only one method so that all three which operate on arrays are in one spot - but It was unnecessary I agree.



-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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

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