aries-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hao Zhong (JIRA)" <>
Subject [jira] [Created] (ARIES-1701) A Possible NPE
Date Fri, 17 Mar 2017 00:46:41 GMT
Hao Zhong created ARIES-1701:

             Summary: A Possible NPE
                 Key: ARIES-1701
             Project: Aries
          Issue Type: Bug
          Components: Blueprint
    Affects Versions: blueprint-core-1.7.0
            Reporter: Hao Zhong

I found that the CmUtils.getProperties method has a buggy code as follow:
try {
            ConfigurationAdmin ca = bc.getService(caRef);
            Configuration config = getConfiguration(ca, persistentId);
            if (config != null) {
                Dictionary<String, Object> props = new CaseInsensitiveDictionary(config.getProperties());
                BundleContext caBc = caRef.getBundle().getBundleContext();
                callPlugins(caBc, props, service, persistentId, null);
                return props;
            } else {
                return null;
        } finally {
Here, before calling ungetService, the call chain BundleContext caBc = caRef.getBundle().getBundleContext()
can throw NPE.

Indeed, a similar bug is fixed in ARIES-788. Please check this bug at

This message was sent by Atlassian JIRA

View raw message