shuber      2004/10/28 21:02:17 CEST

  Modified files:        (Branch: JAHIA-4-0-BRANCH)
    src/java/org/jahia/engines/shared Application_Field.java 
  Log:
  Fix for JAHIA-212 : Caught exception and changed behavior so that clicking "OK" is 
accepted in this case.
  
  Revision  Changes    Path
  1.15.4.3  +8 -1      jahia/src/java/org/jahia/engines/shared/Application_Field.java
http://jahia.mine.nu:8080/cgi-bin/cvsweb.cgi/jahia/src/java/org/jahia/engines/shared/Application_Field.java.diff?r1=1.15.4.2&r2=1.15.4.3&f=h
  
  
  
  Index: Application_Field.java
  ===================================================================
  RCS file: 
/home/cvs/repository/jahia/src/java/org/jahia/engines/shared/Attic/Application_Field.java,v
  retrieving revision 1.15.4.2
  retrieving revision 1.15.4.3
  diff -u -r1.15.4.2 -r1.15.4.3
  --- Application_Field.java    17 Aug 2004 13:54:45 -0000      1.15.4.2
  +++ Application_Field.java    28 Oct 2004 19:02:17 -0000      1.15.4.3
  @@ -159,7 +159,14 @@
               //  -> no need to create a new one
   
               // get the application's roles list
  -            Integer appID = new Integer(theField.getValue());
  +            Integer appID = null;
  +            try {
  +                appID = new Integer(theField.getValue());
  +            } catch (NumberFormatException nfe) {
  +                // invalid app ID, probably because we have no application
  +                // installed on this site.
  +                return true;
  +            }
               // Try to recover application role members
               appRoleMembers = (HashMap)engineMap.get(APPLICATION_ROLES);
               ArrayList roleMembersList = (ArrayList)appRoleMembers.get(appID);
  

Reply via email to