merlimat commented on issue #1506: Underscore `_` should be allowed as property 
name
URL: 
https://github.com/apache/incubator-pulsar/issues/1506#issuecomment-379309339
 
 
   @zubchenok Yes, I verified this is a problem in 1.22 : 
   
   ```
   $ bin/pulsar-admin properties create -r tests -c standalone test_prop
   $ bin/pulsar-admin namespaces create test_prop/standalone/my-ns
   Got exception: Invalid trailing chars in named entity: 
http://test_prop/standalone/my-ns
   java.lang.IllegalArgumentException: Invalid trailing chars in named entity: 
http://test_prop/standalone/my-ns
        at 
org.apache.pulsar.common.naming.NamedEntity.checkURI(NamedEntity.java:43)
        at 
org.apache.pulsar.common.naming.NamespaceName.validateNamespaceName(NamespaceName.java:164)
        at 
org.apache.pulsar.common.naming.NamespaceName.<init>(NamespaceName.java:78)
        at 
org.apache.pulsar.common.naming.NamespaceName.<init>(NamespaceName.java:34)
        at 
org.apache.pulsar.common.naming.NamespaceName$1.load(NamespaceName.java:46)
        at 
org.apache.pulsar.common.naming.NamespaceName$1.load(NamespaceName.java:43)
        at 
com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3628)
        at 
com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2336)
        at 
com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2295)
        at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2208)
        at com.google.common.cache.LocalCache.get(LocalCache.java:4053)
        at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:4057)
        at 
com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4986)
        at 
org.apache.pulsar.common.naming.NamespaceName.get(NamespaceName.java:62)
        at 
org.apache.pulsar.admin.cli.CliCommand.validateNamespace(CliCommand.java:43)
        at 
org.apache.pulsar.admin.cli.CmdNamespaces$Create.run(CmdNamespaces.java:102)
        at org.apache.pulsar.admin.cli.CmdBase.run(CmdBase.java:61)
        at 
org.apache.pulsar.admin.cli.PulsarAdminTool.run(PulsarAdminTool.java:141)
        at 
org.apache.pulsar.admin.cli.PulsarAdminTool.main(PulsarAdminTool.java:162)
   ```
   
   This is not happening anymore in master, so I'll add a quick test to ensure 
it stays the same.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to