File tree Expand file tree Collapse file tree
pulsar-testclient/src/main/java/org/apache/pulsar/testclient Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -223,6 +223,15 @@ public static void main(String[] args) throws Exception {
223223 arguments .authPluginClassName = arguments .deprecatedAuthPluginClassName ;
224224 }
225225
226+ for (String arg : arguments .topic ) {
227+ if (arg .startsWith ("-" )) {
228+ System .out .printf ("invalid option: '%s'\n To use a topic with the name '%s', "
229+ + "please use a fully qualified topic name\n " , arg , arg );
230+ jc .usage ();
231+ PerfClientUtils .exit (-1 );
232+ }
233+ }
234+
226235 if (arguments .topic != null && arguments .topic .size () != arguments .numTopics ) {
227236 // keep compatibility with the previous version
228237 if (arguments .topic .size () == 1 ) {
Original file line number Diff line number Diff line change @@ -292,6 +292,15 @@ public static void main(String[] args) throws Exception {
292292 arguments .authPluginClassName = arguments .deprecatedAuthPluginClassName ;
293293 }
294294
295+ for (String arg : arguments .topics ) {
296+ if (arg .startsWith ("-" )) {
297+ System .out .printf ("invalid option: '%s'\n To use a topic with the name '%s', "
298+ + "please use a fully qualified topic name\n " , arg , arg );
299+ jc .usage ();
300+ PerfClientUtils .exit (-1 );
301+ }
302+ }
303+
295304 if (arguments .topics != null && arguments .topics .size () != arguments .numTopics ) {
296305 // keep compatibility with the previous version
297306 if (arguments .topics .size () == 1 ) {
Original file line number Diff line number Diff line change @@ -122,6 +122,15 @@ public static void main(String[] args) throws Exception {
122122 PerfClientUtils .exit (-1 );
123123 }
124124
125+ for (String arg : arguments .topic ) {
126+ if (arg .startsWith ("-" )) {
127+ System .out .printf ("invalid option: '%s'\n To use a topic with the name '%s', "
128+ + "please use a fully qualified topic name\n " , arg , arg );
129+ jc .usage ();
130+ PerfClientUtils .exit (-1 );
131+ }
132+ }
133+
125134 if (arguments .topic != null && arguments .topic .size () != arguments .numTopics ) {
126135 // keep compatibility with the previous version
127136 if (arguments .topic .size () == 1 ) {
You can’t perform that action at this time.
0 commit comments