Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8229791

Code clean up regressions

XMLWordPrintable

      After code clean up done in JDK-8223586 logic of some code was altered unexpectedly.

      E.g.: rename of parameter from "p" to "params" in WindowsAppImageBuilder.createLauncherForEntryPoint():
      ---
      private void createLauncherForEntryPoint(
                  Map<String, ? super Object> params) throws IOException {
              File launcherIcon = ICON_ICO.fetchFrom(params);
              File icon = launcherIcon != null ?
                      launcherIcon : ICON_ICO.fetchFrom(params);
      ...
      }
      ---

      Used to be before renaming:
      ---
      private void createLauncherForEntryPoint(
                  Map<String, ? super Object> p) throws IOException {
              File launcherIcon = ICON_ICO.fetchFrom(p);
              File icon = launcherIcon != null ?
                      launcherIcon : ICON_ICO.fetchFrom(params);
      ...
      }
      ---

      "params" parameter shadows WindowsAppImageBuilder.params member field.

      I've discovered this issue accidentally. Probably there are more like this.

            herrick Andy Herrick (Inactive)
            asemenyuk Alexey Semenyuk
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: