Felix
  1. Felix
  2. FELIX-2401

NPE in org.apache.felix.framework.FilterImpl.DictionaryCapability.getAttribute(String)

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: framework-3.0.0
    • Fix Version/s: framework-3.0.1
    • Component/s: Framework
    • Labels:
      None

      Description

      The getAttribute method can throw an NPE if the key is not contained into in map (m_map)

      if (m_dict != null)
                  {
                      if (m_map != null)
                      {
                          key = (String) m_map.get(name);  <= returns null
                      }
                      value = m_dict.get(key);  <= NPE here, because the comparator to null.toString()
                  }
      

        Activity

        Hide
        Clement Escoffier added a comment -

        Works like a charm !

        Thanks !

        Show
        Clement Escoffier added a comment - Works like a charm ! Thanks !
        Hide
        Richard S. Hall added a comment -

        I just committed a patch to trunk to check for null, please close if you are satisfied. Thanks.

        Show
        Richard S. Hall added a comment - I just committed a patch to trunk to check for null, please close if you are satisfied. Thanks.

          People

          • Assignee:
            Richard S. Hall
            Reporter:
            Clement Escoffier
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development