if (getMethod == null && getMethodName2 != null) { try { getMethod = beanClass.getMethod(getMethodName2, new Class[0]); } catch (NoSuchMethodException e) {
if (getMethod == null && getMethodName2 != null) { try { getMethod = beanClass.getMethod(getMethodName2, new Class[0]);
  private void findMethods(Class beanClass, String getMethodName1, 			   String getMethodName2, String setMethodName)     throws IntrospectionException   {    try {      // Try the first get method name      if (getMethodName1 != null) {	try {	  getMethod = beanClass.getMethod(getMethodName1, new Class[0]);	} 	catch (NoSuchMethodException e) {	}      }      // Fall back to the second get method name      if (getMethod == null && getMethodName2 != null) {	try {	  getMethod = beanClass.getMethod(getMethodName2, new Class[0]);	} 	catch (NoSuchMethodException e) {	}      }      // Try the set method name      if (setMethodName != null) {	if (getMethod != null) {	  // If there is a get method, use its return type to help	  // select the corresponding set method.	  Class propertyType = getMethod.getReturnType();	  if (propertyType == Void.TYPE) {	    String msg = "The property's read method has return type 'void'";	    throw new IntrospectionException(msg);	  }	  	  Class[] setArgs = new Class[]{propertyType};	  try {	    setMethod = beanClass.getMethod(setMethodName, setArgs);	  } 	  catch (NoSuchMethodException e) {	  }	}	else if (getMethodName1 == null && getMethodName2 == null) {	  // If this is a write-only property, choose the first set method	  // with the required name, one parameter and return type 'void'	  Method[] methods = beanClass.getMethods();	  for (int i = 0; i < methods.length; i++) {	    if (methods[i].getName().equals(setMethodName) &&		methods[i].getParameterTypes().length == 1 &&		methods[i].getReturnType() == Void.TYPE) {	      setMethod = methods[i];	      break;	    }	  }	}      }    }     catch (SecurityException e) {      // FIXME -- shouldn't we just allow SecurityException to propagate?      String msg = "SecurityException thrown on attempt to access methods.";      throw new IntrospectionException(msg);    }  }