[
https://issues.apache.org/jira/browse/CLOUDSTACK-9920?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Rohit Yadav reassigned CLOUDSTACK-9920:
---------------------------------------
Assignee: (was: Rohit Yadav)
> Possible null pointer exception
> -------------------------------
>
> Key: CLOUDSTACK-9920
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9920
> Project: CloudStack
> Issue Type: Bug
> Security Level: Public(Anyone can view this level - this is the
> default.)
> Components: Hypervisor Controller, KVM
> Affects Versions: 4.9.0.1, 4.5.2.2
> Reporter: AppChecker
> Labels: appchecker, static-analysis
>
> Hi.
> Please look this [code
> fragment|https://github.com/apache/cloudstack/blob/87ef8137534fa798101f65c6691fcf71513ac978/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/BridgeVifDriver.java#L242]:
> {code}
> if (brNameMatcher.group(1) != null || !brNameMatcher.group(1).isEmpty()) {
> {code}
> if brNameMatcher.group(1) is null, method isEmpty will be called, so null
> pointer exception is happened,
> Probably, is should be:
> {code}
> if (brNameMatcher.group(1) != null && !brNameMatcher.group(1).isEmpty()) {
> {code}
> Similar code:
> https://github.com/apache/cloudstack/blob/87ef8137534fa798101f65c6691fcf71513ac978/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/IvsVifDriver.java#L214
> This possible defect found by
> [AppChecker|https://npo-echelon.ru/en/solutions/appchecker.php]
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)