avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From blorit...@apache.org
Subject cvs commit: avalon-excalibur/fortress/src/java/org/apache/avalon/fortress/impl/role Role2MetaInfoManager.java
Date Fri, 23 May 2003 13:48:06 GMT
bloritsch    2003/05/23 06:48:06

  Modified:    fortress/src/java/org/apache/avalon/fortress/impl/role
                        Role2MetaInfoManager.java
  Log:
  Ensure that we don't have a NullPointerException
  
  Revision  Changes    Path
  1.5       +10 -1     avalon-excalibur/fortress/src/java/org/apache/avalon/fortress/impl/role/Role2MetaInfoManager.java
  
  Index: Role2MetaInfoManager.java
  ===================================================================
  RCS file: /home/cvs/avalon-excalibur/fortress/src/java/org/apache/avalon/fortress/impl/role/Role2MetaInfoManager.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- Role2MetaInfoManager.java	22 May 2003 12:29:05 -0000	1.4
  +++ Role2MetaInfoManager.java	23 May 2003 13:48:06 -0000	1.5
  @@ -103,6 +103,15 @@
        */
       public MetaInfoEntry getMetaInfoForClassname( final String classname )
       {
  -        return new MetaInfoEntry( m_manager.getRoleForClassname( classname ) );
  +        final RoleEntry roleEntry = m_manager.getRoleForClassname( classname );
  +
  +        if ( roleEntry != null )
  +        {
  +            return new MetaInfoEntry( roleEntry );
  +        }
  +        else
  +        {
  +            return null;
  +        }
       }
   }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@avalon.apache.org
For additional commands, e-mail: cvs-help@avalon.apache.org


Mime
View raw message