mosn / mosn

The Cloud-Native Network Proxy Platform
https://mosn.io
Apache License 2.0
4.43k stars 797 forks source link

空指针转换string问题 #2325

Open lualeslie opened 1 year ago

lualeslie commented 1 year ago

Describe the bug

func convertFilterChainMatch(filterChainMatch *envoy_config_listener_v3.FilterChainMatch) (chainMatch string, destinationPort uint32) { chainMatch = filterChainMatch.String() if filterChainMatch.GetDestinationPort() != nil { destinationPort = filterChainMatch.GetDestinationPort().Value } return } 这个方法获取当filterChainMatch为nil时,chainMatch为“”字符串,这个对MOSN运行没有问题吗?

Expected behavior

Actual behavior

Steps to reproduce

Minimal yet complete reproducer code (or GitHub URL to code)

Environment

doujiang24 commented 1 year ago

欢迎提补丁 + 测试用例