#428 Javadoc throw tags

release_4.2
closed
nobody
Check (274)
5
2012-10-10
2006-08-31
No

Hello

I have following problem
if I have something like:

public void test() throws IndexOutOfBoundsException,
NullPointerException

I want to have a Javadoc like

/*
* @throws IndexOutOfBoundsException
* @throws NullPointerException
/

to explain both Exceptions.
but my Checkstyle fails because it checks only for

  • @throws IndexOutOfBoundsException,
    NullPointerException

in one line.

There should be a option to change this.

Discussion

  • Lars Kühne

    Lars Kühne - 2006-09-03

    Logged In: YES
    user_id=401384

    I am unable to reproduce this, please clarify your problem.

    With JavadocMethod configured like this

    <module name="JavadocMethod">
    <property name="allowUndeclaredRTE" value="true"/>
    </module>

    I can check the following class without generating any
    checkstyle violation

    public class Test
    {
    /
    * returns an element of an object array.

    * @param arr an array of objects
    * @param n the index of the element in arr

    * @throws IndexOutOfBoundsException if n is not between
    0 and (arr.length - 1)
    * @throws NullPointerException if arr is null
    *
    */
    public static Object (Object[] arr, int n)
    {
    return arr[n];
    }
    }

     
  • Helmut Poppen

    Helmut Poppen - 2006-09-15

    Logged In: YES
    user_id=1572978

    Hmm that’s weird.
    I had this problem and a colleague of too but we both
    can’t reproduce it.
    Maybe it’s gone.

    Thanks for your help

     
  • Lars Kühne

    Lars Kühne - 2006-09-18

    Logged In: YES
    user_id=401384

    Closing as not reproducible

     

Log in to post a comment.