matthiasblaesing closed pull request #318: Avoid creation of some temporary 
objects
URL: https://github.com/apache/incubator-netbeans/pull/318
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/subversion/src/org/netbeans/modules/subversion/options/SvnOptionsController.java
 
b/subversion/src/org/netbeans/modules/subversion/options/SvnOptionsController.java
index d7153929b..874877cb6 100644
--- 
a/subversion/src/org/netbeans/modules/subversion/options/SvnOptionsController.java
+++ 
b/subversion/src/org/netbeans/modules/subversion/options/SvnOptionsController.java
@@ -98,12 +98,13 @@ public Component getListCellRendererComponent (JList list, 
Object value, int ind
                 return super.getListCellRendererComponent(list, value, index, 
isSelected, cellHasFocus);
             }
         });
-        List<JPanel> clients = new ArrayList<>();
-        clients.addAll(Arrays.asList(panel.panelCLI, panel.panelJavahl));
+        List<JPanel> clients = new ArrayList<>(3);
+        clients.add(panel.panelCLI);
+        clients.add(panel.panelJavahl);
         if (SvnClientFactory.hasSvnKit()) {
             clients.add(panel.panelSvnkit);
         }
-        panel.cmbPreferredClient.setModel(new 
DefaultComboBoxModel(clients.toArray(new Object[0])));
+        panel.cmbPreferredClient.setModel(new 
DefaultComboBoxModel(clients.toArray()));
         panel.textPaneClient.addHyperlinkListener(new HyperlinkListener() {
             @Override
             public void hyperlinkUpdate (HyperlinkEvent e) {


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

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