/** * Set the checked exceptions thrown by this method. Use null or an * empty array for none. */ public void setExceptions(String[] exceptions) { if (exceptions != null) { for (int i = 0; i < exceptions.length; i++) if (exceptions[i] == null) throw new NullPointerException("exceptions[" + i + "] = null"); } clear(); if (exceptions != null) for (int i = 0; i < exceptions.length; i++) addException(exceptions[i]); }
/** * Set the checked exceptions thrown by this method. Use null or an * empty array for none. */ public void setExceptions(String[] exceptions) { if (exceptions != null) { for (int i = 0; i < exceptions.length; i++) if (exceptions[i] == null) throw new NullPointerException("exceptions[" + i + "] = null"); } clear(); if (exceptions != null) for (int i = 0; i < exceptions.length; i++) addException(exceptions[i]); }