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

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        4m 28s 1 Richard S. Hall 09/Jun/10 20:32
        Resolved Resolved Closed Closed
        6m 3s 1 Clement Escoffier 09/Jun/10 20:38
        Richard S. Hall made changes -
        Fix Version/s framework-3.0.1 [ 12315138 ]
        Fix Version/s framework-3.2.0 [ 12315053 ]
        Clement Escoffier made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Hide
        Clement Escoffier added a comment -

        Works like a charm !

        Thanks !

        Show
        Clement Escoffier added a comment - Works like a charm ! Thanks !
        Richard S. Hall made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Assignee Richard S. Hall [ rickhall ]
        Fix Version/s framework-3.2.0 [ 12315053 ]
        Resolution Fixed [ 1 ]
        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.
        Clement Escoffier created issue -

          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