[jboss-cvs] jboss-seam/src/ui/org/jboss/seam/ui ...

Gavin King gavin.king at jboss.com
Tue Nov 7 01:33:42 EST 2006


  User: gavin   
  Date: 06/11/07 01:33:42

  Modified:    src/ui/org/jboss/seam/ui  UISelection.java
  Log:
  fix npe
  
  Revision  Changes    Path
  1.4       +9 -3      jboss-seam/src/ui/org/jboss/seam/ui/UISelection.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: UISelection.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/src/ui/org/jboss/seam/ui/UISelection.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -b -r1.3 -r1.4
  --- UISelection.java	28 Sep 2006 17:03:52 -0000	1.3
  +++ UISelection.java	7 Nov 2006 06:33:42 -0000	1.4
  @@ -24,9 +24,15 @@
      public Object getValue()
      {
         Object value = Contexts.lookupInStatefulContexts(dataModel);
  +      if (value==null)
  +      {
  +         return null;
  +      }
  +      else
  +      {
         int rowIndex = ( (DataModel) value ).getRowIndex();
  -      return value==null || rowIndex<0 ? 
  -            null : var + ':' + dataModel + '[' + rowIndex + ']';
  +         return rowIndex<0 ? null : var + ':' + dataModel + '[' + rowIndex + ']';
  +      }
      }
   
      @Override
  
  
  



More information about the jboss-cvs-commits mailing list