You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "nzomkxia (GitHub)" <gi...@apache.org> on 2019/01/28 03:30:59 UTC
[GitHub] [incubator-dubbo] nzomkxia opened issue #3367: fail to parse
config text with white space
- [ ] I have searched the [issues](https://github.com/apache/incubator-dubbo/issues) of this repository and believe that this is not a duplicate.
- [ ] I have checked the [FAQ](https://github.com/apache/incubator-dubbo/blob/master/FAQ.md) of this repository and believe that this is not a duplicate.
### Environment
* Dubbo version: 2.7.0
* Operating System version: Mac OS
* Java version: JDK1.8
### Steps to reproduce this issue
1. create `dubbo.properties` with trailing white space
```properties
dubbo.provider.timeout=6666
```
2. start dubbo provider
3. will cause an exception:
```java
java.lang.NumberFormatException: For input string: "6666 "
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at java.lang.Integer.parseInt(Integer.java:580)
at java.lang.Integer.valueOf(Integer.java:766)
at org.apache.dubbo.common.utils.ClassHelper.convertPrimitive(ClassHelper.java:277)
at org.apache.dubbo.config.AbstractConfig.refresh(AbstractConfig.java:568)
at java.util.concurrent.ConcurrentHashMap$ValuesView.forEach(ConcurrentHashMap.java:4707)
at org.apache.dubbo.config.context.ConfigManager.refreshAll(ConfigManager.java:308)
at org.apache.dubbo.config.AbstractInterfaceConfig.startConfigCenter(AbstractInterfaceConfig.java:241)
at org.apache.dubbo.config.ServiceConfig.checkAndUpdateSubConfigs(ServiceConfig.java:267)
at org.apache.dubbo.config.ServiceConfig.export(ServiceConfig.java:328)
at org.apache.dubbo.config.spring.ServiceBean.onApplicationEvent(ServiceBean.java:104)
at org.apache.dubbo.config.spring.ServiceBean.onApplicationEvent(ServiceBean.java:55)
at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172)
at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139)
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:400)
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:354)
at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:886)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.finishRefresh(ServletWebServerApplicationContext.java:161)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:551)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:140)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:754)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:386)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:307)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1242)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1230)
at org.apache.dubbo.demo.DubboProviderApplication.main(DubboProviderApplication.java:13)
```
Pls. provide [GitHub address] to reproduce this issue.
### Expected Result
What do you expected from the above steps?
### Actual Result
What actually happens?
If there is an exception, please attach the exception trace:
```
Just put your stack trace here!
```
[ Full content available at: https://github.com/apache/incubator-dubbo/issues/3367 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org
[GitHub] [incubator-dubbo] CrazyHZM commented on issue #3367: fail to
parse config text with white space
Posted by "CrazyHZM (GitHub)" <gi...@apache.org>.
Deleting the space will succeed. I don't recommend enhancing the handling of the space here. What do you think?
[ Full content available at: https://github.com/apache/incubator-dubbo/issues/3367 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org
[GitHub] [incubator-dubbo] chickenlj commented on issue #3367: fail
to parse config text with white space
Posted by "chickenlj (GitHub)" <gi...@apache.org>.
White space should definitely be considered.
[ Full content available at: https://github.com/apache/incubator-dubbo/issues/3367 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org
[GitHub] [incubator-dubbo] biyuhao commented on issue #3367: fail to
parse config text with white space
Posted by "biyuhao (GitHub)" <gi...@apache.org>.
There is a similar discussion in Springboot project
https://github.com/spring-projects/spring-boot/issues/13602#issuecomment-402113151
[ Full content available at: https://github.com/apache/incubator-dubbo/issues/3367 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org
[GitHub] [incubator-dubbo] tswstarplanet closed issue #3367: fail to
parse config text with white space
Posted by "tswstarplanet (GitHub)" <gi...@apache.org>.
[ issue closed by tswstarplanet ]
[ Full content available at: https://github.com/apache/incubator-dubbo/issues/3367 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org