1.) some examples of dead code that were pointed out in review:
VersionExtractor.java seems to be dead code.
Dead code in RelativeFileset: upshift(), contains(), copy constructor().
Platform.java:
- should use System Runtime.Version class.
Params.java: Dead code does not seem to be used in DeployParams
(and would probably be better as a map than an individual object).
setParams is unused.
2.) DeployParams:
- If there are accessor methods, use them!
- Lots of unused methods. (According to IntelliJ)
- setSystemWide should use primitive boolean, not Boolean; conversions will be done as needed.
- Ditto installDirChooser
- Ditto SignBundle flag
3.) Many .java files that pass a map of parameters use the argument name "p" but using "params"
would communicate better and be more consistent across the different files.
4.) LinuxDebBundler and LinuxRpmBundler should share more code.
5.) MacAppBundler.java:
- list of categories will need maintenance to stay in sync with Apple. Can the list be derived from the installed Mac tool chain?
- or don't validate the argument until it is built and let the mac app builder do the checking.
6.) (#1 formJDK-8223241) import statements:
Several files (e.g., Arguments.java) have unused imports that can be removed.
Except for wildcard static imports, we should replace the wild-card imports with explicit imports.
for example:
src/jdk.jpackage/linux/classes/jdk/jpackage/internal/LinuxDebBundler.java (java.util.* and java.io.*)
7.) (#13 fromJDK-8223241) simplify AbstractImageBundler.extractFlagsFromVersion()
The minimum that jpackage needs to support is JDK 11, so we should be able to assume JEP 322 compliant version numbers. This code could be greatly simplified.
VersionExtractor.java seems to be dead code.
Dead code in RelativeFileset: upshift(), contains(), copy constructor().
Platform.java:
- should use System Runtime.Version class.
Params.java: Dead code does not seem to be used in DeployParams
(and would probably be better as a map than an individual object).
setParams is unused.
2.) DeployParams:
- If there are accessor methods, use them!
- Lots of unused methods. (According to IntelliJ)
- setSystemWide should use primitive boolean, not Boolean; conversions will be done as needed.
- Ditto installDirChooser
- Ditto SignBundle flag
3.) Many .java files that pass a map of parameters use the argument name "p" but using "params"
would communicate better and be more consistent across the different files.
4.) LinuxDebBundler and LinuxRpmBundler should share more code.
5.) MacAppBundler.java:
- list of categories will need maintenance to stay in sync with Apple. Can the list be derived from the installed Mac tool chain?
- or don't validate the argument until it is built and let the mac app builder do the checking.
6.) (#1 form
Several files (e.g., Arguments.java) have unused imports that can be removed.
Except for wildcard static imports, we should replace the wild-card imports with explicit imports.
for example:
src/jdk.jpackage/linux/classes/jdk/jpackage/internal/LinuxDebBundler.java (java.util.* and java.io.*)
7.) (#13 from
The minimum that jpackage needs to support is JDK 11, so we should be able to assume JEP 322 compliant version numbers. This code could be greatly simplified.
- relates to
-
JDK-8223241 jpackage cleanup from code review
- Resolved
-
JDK-8225250 investigate category list from MacAppBundler.getMacCategories()
- Closed
-
JDK-8225249 LinuxDebBundler and LinuxRpmBundler should share more code
- Resolved
-
JDK-8225251 Minimise import statements in jpackage sources
- Resolved
-
JDK-8229791 Code clean up regressions
- Resolved