jdk/src/java.base/share/native/libjli/args.c
changeset 40261 86a49ba76f52
parent 39640 6f1a839ff43d
child 43325 033e4cced1dc
equal deleted inserted replaced
40260:4e69b50ccd97 40261:86a49ba76f52
   100         return;
   100         return;
   101     }
   101     }
   102 
   102 
   103     // All arguments arrive here must be a launcher argument,
   103     // All arguments arrive here must be a launcher argument,
   104     // ie. by now, all argfile expansions must have been performed.
   104     // ie. by now, all argfile expansions must have been performed.
   105     if (*arg++ == '-') {
   105     if (*arg == '-') {
   106         expectingNoDashArg = JNI_FALSE;
   106         expectingNoDashArg = JNI_FALSE;
   107         if (JLI_StrCmp(arg, "cp") == 0 ||
   107         if (IsWhiteSpaceOption(arg)) {
   108             JLI_StrCmp(arg, "classpath") == 0 ||
   108             // expect an argument
   109             JLI_StrCmp(arg, "addmods") == 0 ||
       
   110             JLI_StrCmp(arg, "limitmods") == 0 ||
       
   111             JLI_StrCmp(arg, "mp") == 0 ||
       
   112             JLI_StrCmp(arg, "modulepath") == 0 ||
       
   113             JLI_StrCmp(arg, "upgrademodulepath") == 0) {
       
   114             expectingNoDashArg = JNI_TRUE;
   109             expectingNoDashArg = JNI_TRUE;
   115         } else if (JLI_StrCmp(arg, "jar") == 0 ||
   110 
   116                    JLI_StrCmp(arg, "m") == 0) {
   111             if (JLI_StrCmp(arg, "-jar") == 0 ||
   117             // This is tricky, we do expect NoDashArg
   112                 JLI_StrCmp(arg, "-m") == 0) {
   118             // But that is considered main class to stop expansion
   113                 // This is tricky, we do expect NoDashArg
   119             expectingNoDashArg = JNI_FALSE;
   114                 // But that is considered main class to stop expansion
   120             // We can not just update the idx here because if -jar @file
   115                 expectingNoDashArg = JNI_FALSE;
   121             // still need expansion of @file to get the argument for -jar
   116                 // We can not just update the idx here because if -jar @file
   122         } else if (JLI_StrCmp(arg, "Xdisable-@files") == 0) {
   117                 // still need expansion of @file to get the argument for -jar
       
   118             }
       
   119         } else if (JLI_StrCmp(arg, "-Xdisable-@files") == 0) {
   123             stopExpansion = JNI_TRUE;
   120             stopExpansion = JNI_TRUE;
   124         }
   121         }
   125     } else {
   122     } else {
   126         if (!expectingNoDashArg) {
   123         if (!expectingNoDashArg) {
   127             // this is main class, argsCount is index to next arg
   124             // this is main class, argsCount is index to next arg