You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cloudstack.apache.org by "AppChecker (JIRA)" <ji...@apache.org> on 2017/05/15 17:44:04 UTC

[jira] [Created] (CLOUDSTACK-9920) Possible null pointer exception

AppChecker created CLOUDSTACK-9920:
--------------------------------------

             Summary: 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.5.2.2, 4.9.0.1
            Reporter: AppChecker


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.3.15#6346)