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

Perform null check before accessing it #16552

Merged
merged 5 commits into from Apr 2, 2022
Merged

Perform null check before accessing it #16552

merged 5 commits into from Apr 2, 2022

Conversation

pregress
Copy link
Contributor

@pregress pregress commented Dec 1, 2021

Description

Perform the null check on RouteTable.Routes before accessing it with SingleOrDefault.

Checklist

  • I have read the Submitting Changes section of CONTRIBUTING.md
  • The title of the PR is clear and informative
  • The appropriate ChangeLog.md file(s) has been updated:
    • For any service, the ChangeLog.md file can be found at src/{{SERVICE}}/{{SERVICE}}/ChangeLog.md
    • A snippet outlining the change(s) made in the PR should be written under the ## Upcoming Release header -- no new version header should be added
  • The PR does not introduce breaking changes
  • If applicable, the changes made in the PR have proper test coverage
  • For public API changes to cmdlets:
    • a cmdlet design review was approved for the changes in this repository (Microsoft internal only)
      • {Please put the link here}
    • the markdown help files have been regenerated using the commands listed here

Perform the null check on RouteTable.Routes before accessing it with SingleOrDefault.
@ghost
Copy link

ghost commented Dec 1, 2021

Thank you for your contribution pregress! We will review the pull request and get back to you soon.

@msJinLei
Copy link
Contributor

msJinLei commented Dec 2, 2021

@pregress Thanks for the contribution!
Please add a line to describe your change of this PR in https://github.com/Azure/azure-powershell/blob/05a86d3c19079361ffd103e1167b89e0c4583484/src/Network/Network/ChangeLog.md
BTW, are you a Microsoft team member?

@pregress
Copy link
Contributor Author

pregress commented Dec 2, 2021

Described the change in the changelog.
No, I'm not a MSFT team member.

Copy link
Member

@isra-fel isra-fel left a comment

Choose a reason for hiding this comment

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

Hey, src/Network/Network/Generated/RouteTable/Route/AddAzureRmRouteConfigCommand.cs this file is generated so we probably should not update it manually.

@MikhailTryakhov Hey Mikhail the customer is trying to fix a null-reference exception in the generated code of Network. What's you advice here?

@isra-fel isra-fel added the Service Attention This issue is responsible by Azure service team. label Dec 2, 2021
@pregress
Copy link
Contributor Author

pregress commented Dec 2, 2021

Can somebody point me in the right direction, from where the source code is generated?
I'll change it there.

@msJinLei
Copy link
Contributor

msJinLei commented Dec 3, 2021

Can somebody point me in the right direction, from where the source code is generated? I'll change it there.

src/Network/Network/Generated/RouteTable/Route/AddAzureRmRouteConfigCommand.cs looks generated. Need @MikhailTryakhov to confirm.

fix change log
wyunchi-ms
wyunchi-ms previously approved these changes Jan 11, 2022
@wyunchi-ms
Copy link
Contributor

Please resolve the conflicts

@wyunchi-ms
Copy link
Contributor

/azp run azure-powershell - security-tools

@azure-pipelines
Copy link
Contributor

Azure Pipelines successfully started running 1 pipeline(s).

@isra-fel isra-fel merged commit 6a87b55 into Azure:main Apr 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
customer-reported needs-revision Network Service Attention This issue is responsible by Azure service team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants