[Dubbo-6463] fix issue: start.sh can't work when dubbo.properties contain commented dubbo.protocol.port property #6508
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What is the purpose of the change
fix issue #6463 : start.sh can't work when dubbo.properties contain commented dubbo.protocol.port property
Brief changelog
dubbo-container/dubbo-container-api/src/main/resources/META-INF/assembly/bin/start.sh
Verifying this change
When configure the port of dubbo protocol in dubbo.properties file, start.sh will parse dubbo.properties using sed and get the dubbo protocol port number, then determine whether the application starts successfully by checking whether the port is opened.
But the mechanism of parsing dubbo protocol port isn't rigorous, when my dubbo.properties contains commented dubbo.protocol.port like this:
#dubbo.protocol.port=20943
dubbo.protocol.port=20945
start.sh will get wrong port number, and can't work normally.