Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug: web app name incorrect in prompt message #2217

Merged
merged 5 commits into from
Oct 18, 2018
Merged

Fix bug: web app name incorrect in prompt message #2217

merged 5 commits into from
Oct 18, 2018

Conversation

SummerSun
Copy link
Contributor

#2215

The name is initialized when loadActions, not webAppName.

@SummerSun SummerSun requested a review from Eskibear October 15, 2018 05:07
@SummerSun SummerSun changed the title Fix bug web app name incorrect in prompt message Fix bug: web app name incorrect in prompt message Oct 15, 2018
@@ -137,17 +132,17 @@ public void stopWebApp() {

private class DeleteWebAppAction extends AzureNodeActionPromptListener {
DeleteWebAppAction() {
super(WebAppNode.this, String.format(DELETE_WEBAPP_PROMPT_MESSAGE, getWebAppName()),
super(WebAppNode.this, String.format(DELETE_WEBAPP_PROMPT_MESSAGE, getName()),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the protected member webAppName is supposed to keep the correct value, so what's the root cause?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

webAppName is not initialized when calling loadActions from parent class when we change to use the base class WebAppBaseNode.

The sequence is:

WebAppNode constructor -> WebAppBaseNode constructor(super) -> loadActions -> DeleteWebAppAction constructor -> getWebAppName -> ... -> back to WebAppNode constructor to init the webAppName.

@SummerSun SummerSun merged commit 3af634d into microsoft:develop Oct 18, 2018
andxu pushed a commit to andxu/azure-tools-for-java that referenced this pull request Mar 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants