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 2023/01/10 20:48:55 UTC

[netbeans] branch master updated: Removed StringUtils unused object creation

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 7e775d6d3d Removed StringUtils unused object creation
     new cd14cf5e66 Merge pull request #5242 from tbw777/unused2
7e775d6d3d is described below

commit 7e775d6d3d62ed15d622e1d49ce72bcf5cf3b3bd
Author: Andrei Briukhov <an...@gmail.com>
AuthorDate: Sun Jan 8 08:26:05 2023 -0300

    Removed StringUtils unused object creation
    
    Removed unused StringBuffer object without any side effects.
---
 .../installer/wizard/components/panels/PreInstallSummaryPanel.java  | 6 ++----
 .../wizard/components/panels/netbeans/NbPreInstallSummaryPanel.java | 6 ++----
 nbi/engine/src/org/netbeans/installer/utils/StringUtils.java        | 2 --
 3 files changed, 4 insertions(+), 10 deletions(-)

diff --git a/harness/libs.nbi.ant/stub/ext/engine/src/org/mycompany/installer/wizard/components/panels/PreInstallSummaryPanel.java b/harness/libs.nbi.ant/stub/ext/engine/src/org/mycompany/installer/wizard/components/panels/PreInstallSummaryPanel.java
index 587f633163..c46e24b89b 100644
--- a/harness/libs.nbi.ant/stub/ext/engine/src/org/mycompany/installer/wizard/components/panels/PreInstallSummaryPanel.java
+++ b/harness/libs.nbi.ant/stub/ext/engine/src/org/mycompany/installer/wizard/components/panels/PreInstallSummaryPanel.java
@@ -210,13 +210,11 @@ public class PreInstallSummaryPanel extends ErrorMessagePanel {
             
             installationSizeLabel.setText(
                     panel.getProperty(INSTALLATION_SIZE_PROPERTY));
-            installationSizeValue.setText(StringUtils.formatSize(
-                    installationSize));
+            installationSizeValue.setText(StringUtils.formatSize(installationSize));
 
             downloadSizeLabel.setText(
                     panel.getProperty(DOWNLOAD_SIZE_PROPERTY));
-            downloadSizeValue.setText(StringUtils.formatSize(
-                    downloadSize));
+            downloadSizeValue.setText(StringUtils.formatSize(downloadSize));
 
             if (registry.getProductsToInstall().size() == 0) {
                 locationsPane.setVisible(false);
diff --git a/nbbuild/installer/engine/src/org/netbeans/installer/wizard/components/panels/netbeans/NbPreInstallSummaryPanel.java b/nbbuild/installer/engine/src/org/netbeans/installer/wizard/components/panels/netbeans/NbPreInstallSummaryPanel.java
index 6d744533f8..04c4a1187d 100644
--- a/nbbuild/installer/engine/src/org/netbeans/installer/wizard/components/panels/netbeans/NbPreInstallSummaryPanel.java
+++ b/nbbuild/installer/engine/src/org/netbeans/installer/wizard/components/panels/netbeans/NbPreInstallSummaryPanel.java
@@ -458,13 +458,11 @@ public class NbPreInstallSummaryPanel extends ErrorMessagePanel {
             
             installationSizeLabel.setText(
                     panel.getProperty(INSTALLATION_SIZE_PROPERTY));
-            installationSizeValue.setText(StringUtils.formatSize(
-                    installationSize));
+            installationSizeValue.setText(StringUtils.formatSize(installationSize));
             
             downloadSizeLabel.setText(
                     panel.getProperty(DOWNLOAD_SIZE_PROPERTY));
-            downloadSizeValue.setText(StringUtils.formatSize(
-                    downloadSize));
+            downloadSizeValue.setText(StringUtils.formatSize(downloadSize));
             
             if (registry.getProductsToInstall().isEmpty()) {
                 locationsPane.setVisible(false);
diff --git a/nbi/engine/src/org/netbeans/installer/utils/StringUtils.java b/nbi/engine/src/org/netbeans/installer/utils/StringUtils.java
index 467e789f34..0d0aaab487 100644
--- a/nbi/engine/src/org/netbeans/installer/utils/StringUtils.java
+++ b/nbi/engine/src/org/netbeans/installer/utils/StringUtils.java
@@ -168,8 +168,6 @@ public abstract class StringUtils {
     
     public static String formatSize(
             final long longBytes) {
-        StringBuffer result = new StringBuffer();
-        
         double bytes = (double) longBytes;
         
         // try as GB


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