code: private static Property getPropertyOrThrow(Bean bean, String propertyName) {
          Property property = bean.getProperty(propertyName);
  
          if (property == null) {
              throw new PropertyNotFoundException("Cannot find property with name '" + propertyName + "' in " + bean + ".");
          }
  
          return property;
      }
docs: Internal: Static version of {@link #getProperty(String)}, throws an exception instead of return null.
  
  @param bean         the bean object whose property is to be searched
  @param propertyName the name of the property to search
  @return the property with the given name, if found
  @throws NullPointerException if the bean object does not have a property with the given name