Skip to content

Commit

Permalink
Merge pull request apache#5242 from tbw777/unused2
Browse files Browse the repository at this point in the history
Removed StringUtils unused object creation
  • Loading branch information
matthiasblaesing authored Jan 10, 2023
2 parents e5dd712 + 7e775d6 commit cd14cf5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -210,13 +210,11 @@ protected void initialize() {

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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -458,13 +458,11 @@ protected void initialize() {

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);
Expand Down
2 changes: 0 additions & 2 deletions nbi/engine/src/org/netbeans/installer/utils/StringUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,6 @@ public static String getFilenameFromUrl(

public static String formatSize(
final long longBytes) {
StringBuffer result = new StringBuffer();

double bytes = (double) longBytes;

// try as GB
Expand Down

0 comments on commit cd14cf5

Please sign in to comment.