RFR: 8255947: [macos] Signed macOS jpackage app doesn't filter spurious '-psn' argument
Alexey Semenyuk
asemenyuk at openjdk.java.net
Thu Nov 12 17:23:57 UTC 2020
On Wed, 11 Nov 2020 04:28:02 GMT, Alexander Matveev <almatvee at openjdk.org> wrote:
> This is regression from JDK-8242302 and for some reason removing -psn argument code was removed during refactoring. Fixed be adding removing -psn argument back. Also, test was added to test this functionality.
src/jdk.jpackage/macosx/native/common/MacSysInfo.cpp line 90:
> 88: }
> 89: result.push_back(argv[i]);
> 90: }
I'd suggest to use C++ here:
Suggestion:
const tstring psnArgPrefix = "-psn_";
for (int i = progNameMode == ExcludeProgramName ? 1 : 0; i < argc; i++) {
const tstring arg = argv[i];
if (!tstrings::startsWith(arg, psnArgPrefix)) {
result.push_back(arg);
}
}
-------------
PR: https://git.openjdk.java.net/jdk/pull/1154
More information about the core-libs-dev
mailing list