You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Dennis Hendriks <D....@tue.nl> on 2012/03/09 11:34:16 UTC

[math] javadoc unbalanced

Hi all,

See http://commons.apache.org/math/apidocs/index-all.html and scroll to the 
section 'D'. Observe how in method discardMostRecentElements(int) in class 
org.apache.commons.math3.util.ResizableDoubleArray, the style changes to 
larger font. This can be fixed using this patch:


Index: src/main/java/org/apache/commons/math3/util/ResizableDoubleArray.java
===================================================================
--- src/main/java/org/apache/commons/math3/util/ResizableDoubleArray.java 
      (revision 1298781)
+++ src/main/java/org/apache/commons/math3/util/ResizableDoubleArray.java 
      (working copy)
@@ -457,7 +457,7 @@
      }

      /**
-     * Discards the <code>i<code> last elements of the array.  For example,
+     * Discards the <code>i</code> last elements of the array.  For example,
       * if the array contains the elements 1,2,3,4, invoking
       * <code>discardMostRecentElements(2)</code> will cause the last two 
elements
       * to be discarded, leaving 1,2 in the array.  Throws 
illegalArgumentException


and is obviously due to <code>i</code> not being balanced. Similar issues 
exist elsewhere in the javadoc, for instance at the isSame(Chromosome) 
method in the org.apache.commons.math3.genetics.BinaryChromosome class.

Best regards,
Dennis

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [math] javadoc unbalanced

Posted by sebb <se...@gmail.com>.
On 9 March 2012 10:50, Benedikt Ritter <be...@googlemail.com> wrote:
> Thanks for the patch Dennis! Feel free create a JIRA ticket [1] for
> this issue, where you can attach your patch (and maybe more ;). One
> little suggestion for improvement: According to [2] {@code } should be
> used in instead of <code> and <tt>.

<code> still needs to be used in some cases, because {@code} does not
support some types of nested content.
[Cannot remember exactly what, sorry, but I had to change some @code tags back.]

> Regards,
> Benedikt
>
> [1] https://issues.apache.org/jira
> [2] https://blogs.oracle.com/darcy/entry/javadoc_tip_code_and_literal
>
> Am 9. März 2012 11:34 schrieb Dennis Hendriks <D....@tue.nl>:
>> Hi all,
>>
>> See http://commons.apache.org/math/apidocs/index-all.html and scroll to the
>> section 'D'. Observe how in method discardMostRecentElements(int) in class
>> org.apache.commons.math3.util.ResizableDoubleArray, the style changes to
>> larger font. This can be fixed using this patch:
>>
>>
>> Index: src/main/java/org/apache/commons/math3/util/ResizableDoubleArray.java
>> ===================================================================
>> --- src/main/java/org/apache/commons/math3/util/ResizableDoubleArray.java
>>    (revision 1298781)
>> +++ src/main/java/org/apache/commons/math3/util/ResizableDoubleArray.java
>>    (working copy)
>> @@ -457,7 +457,7 @@
>>     }
>>
>>     /**
>> -     * Discards the <code>i<code> last elements of the array.  For example,
>> +     * Discards the <code>i</code> last elements of the array.  For
>> example,
>>      * if the array contains the elements 1,2,3,4, invoking
>>      * <code>discardMostRecentElements(2)</code> will cause the last two
>> elements
>>      * to be discarded, leaving 1,2 in the array.  Throws
>> illegalArgumentException
>>
>>
>> and is obviously due to <code>i</code> not being balanced. Similar issues
>> exist elsewhere in the javadoc, for instance at the isSame(Chromosome)
>> method in the org.apache.commons.math3.genetics.BinaryChromosome class.
>>
>> Best regards,
>> Dennis
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>> For additional commands, e-mail: dev-help@commons.apache.org
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [math] javadoc unbalanced

Posted by sebb <se...@gmail.com>.
On 9 March 2012 11:12, Gilles Sadowski <gi...@harfang.homelinux.org> wrote:
> On Fri, Mar 09, 2012 at 11:50:15AM +0100, Benedikt Ritter wrote:
>> Thanks for the patch Dennis! Feel free create a JIRA ticket [1] for
>> this issue, where you can attach your patch (and maybe more ;). One
>> little suggestion for improvement: According to [2] {@code } should be
>> used in instead of <code> and <tt>.
>
> +1
>
> Gilles
>
>
> P.S. For this sort of changes, what is the procedure for fixing the web
>     site? I.e. ensuring that no Java code modifications in trunk is
>     reflected in the newly generated docs. Do we create a branch?

That needs a new thread.

> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [math] javadoc unbalanced

Posted by Gilles Sadowski <gi...@harfang.homelinux.org>.
On Fri, Mar 09, 2012 at 11:50:15AM +0100, Benedikt Ritter wrote:
> Thanks for the patch Dennis! Feel free create a JIRA ticket [1] for
> this issue, where you can attach your patch (and maybe more ;). One
> little suggestion for improvement: According to [2] {@code } should be
> used in instead of <code> and <tt>.

+1

Gilles


P.S. For this sort of changes, what is the procedure for fixing the web
     site? I.e. ensuring that no Java code modifications in trunk is
     reflected in the newly generated docs. Do we create a branch?

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [math] javadoc unbalanced

Posted by Dennis Hendriks <D....@tue.nl>.
JIRA ticket created: https://issues.apache.org/jira/browse/MATH-767

Best regards,
Dennis

On 03/09/2012 11:50 AM, Benedikt Ritter wrote:
> Thanks for the patch Dennis! Feel free create a JIRA ticket [1] for
> this issue, where you can attach your patch (and maybe more ;). One
> little suggestion for improvement: According to [2] {@code } should be
> used in instead of<code>  and<tt>.
>
> Regards,
> Benedikt
>
> [1] https://issues.apache.org/jira
> [2] https://blogs.oracle.com/darcy/entry/javadoc_tip_code_and_literal
>
> Am 9. März 2012 11:34 schrieb Dennis Hendriks<D....@tue.nl>:
>> Hi all,
>>
>> See http://commons.apache.org/math/apidocs/index-all.html and scroll to the
>> section 'D'. Observe how in method discardMostRecentElements(int) in class
>> org.apache.commons.math3.util.ResizableDoubleArray, the style changes to
>> larger font. This can be fixed using this patch:
>>
>>
>> Index: src/main/java/org/apache/commons/math3/util/ResizableDoubleArray.java
>> ===================================================================
>> --- src/main/java/org/apache/commons/math3/util/ResizableDoubleArray.java
>>     (revision 1298781)
>> +++ src/main/java/org/apache/commons/math3/util/ResizableDoubleArray.java
>>     (working copy)
>> @@ -457,7 +457,7 @@
>>      }
>>
>>      /**
>> -     * Discards the<code>i<code>  last elements of the array.  For example,
>> +     * Discards the<code>i</code>  last elements of the array.  For
>> example,
>>       * if the array contains the elements 1,2,3,4, invoking
>>       *<code>discardMostRecentElements(2)</code>  will cause the last two
>> elements
>>       * to be discarded, leaving 1,2 in the array.  Throws
>> illegalArgumentException
>>
>>
>> and is obviously due to<code>i</code>  not being balanced. Similar issues
>> exist elsewhere in the javadoc, for instance at the isSame(Chromosome)
>> method in the org.apache.commons.math3.genetics.BinaryChromosome class.
>>
>> Best regards,
>> Dennis
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>> For additional commands, e-mail: dev-help@commons.apache.org
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [math] javadoc unbalanced

Posted by Benedikt Ritter <be...@googlemail.com>.
Thanks for the patch Dennis! Feel free create a JIRA ticket [1] for
this issue, where you can attach your patch (and maybe more ;). One
little suggestion for improvement: According to [2] {@code } should be
used in instead of <code> and <tt>.

Regards,
Benedikt

[1] https://issues.apache.org/jira
[2] https://blogs.oracle.com/darcy/entry/javadoc_tip_code_and_literal

Am 9. März 2012 11:34 schrieb Dennis Hendriks <D....@tue.nl>:
> Hi all,
>
> See http://commons.apache.org/math/apidocs/index-all.html and scroll to the
> section 'D'. Observe how in method discardMostRecentElements(int) in class
> org.apache.commons.math3.util.ResizableDoubleArray, the style changes to
> larger font. This can be fixed using this patch:
>
>
> Index: src/main/java/org/apache/commons/math3/util/ResizableDoubleArray.java
> ===================================================================
> --- src/main/java/org/apache/commons/math3/util/ResizableDoubleArray.java
>    (revision 1298781)
> +++ src/main/java/org/apache/commons/math3/util/ResizableDoubleArray.java
>    (working copy)
> @@ -457,7 +457,7 @@
>     }
>
>     /**
> -     * Discards the <code>i<code> last elements of the array.  For example,
> +     * Discards the <code>i</code> last elements of the array.  For
> example,
>      * if the array contains the elements 1,2,3,4, invoking
>      * <code>discardMostRecentElements(2)</code> will cause the last two
> elements
>      * to be discarded, leaving 1,2 in the array.  Throws
> illegalArgumentException
>
>
> and is obviously due to <code>i</code> not being balanced. Similar issues
> exist elsewhere in the javadoc, for instance at the isSame(Chromosome)
> method in the org.apache.commons.math3.genetics.BinaryChromosome class.
>
> Best regards,
> Dennis
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org