You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nutch.apache.org by Doug Cutting <cu...@nutch.org> on 2005/12/17 17:14:23 UTC

Re: svn commit: r357334 - in /lucene/nutch/trunk: conf/nutch-default.xml src/java/org/apache/nutch/protocol/Content.java src/java/org/apache/nutch/protocol/ContentProperties.java

jerome@apache.org wrote:
> +    /*
> +     * (non-Javadoc)
> +     * 
> +     * @see org.apache.nutch.io.Writable#write(java.io.DataOutput)
> +     */
> +    public final void write(DataOutput out) throws IOException {

We should either include javadoc or not.  In general, all public methods 
should have javadoc.  In this case, since this is implementing an 
interface method, if no Javadoc comment is added, then the interface's 
will be used.  That would be preferable.  Frequently in this case folks 
add a comment like:

// javadoc inherited

Doug

Re: svn commit: r357334 - in /lucene/nutch/trunk: conf/nutch-default.xml src/java/org/apache/nutch/protocol/Content.java src/java/org/apache/nutch/protocol/ContentProperties.java

Posted by Doug Cutting <cu...@nutch.org>.
Piotr Kosiorowski wrote:
> It is not a JavaDoc comment as it does not start with "/**"

You're right.  I missed that.  I'd prefer not to waste four lines on 
that, but it's not worth arguing about.

Doug

Re: svn commit: r357334 - in /lucene/nutch/trunk: conf/nutch-default.xml src/java/org/apache/nutch/protocol/Content.java src/java/org/apache/nutch/protocol/ContentProperties.java

Posted by Piotr Kosiorowski <pk...@gmail.com>.
Doug Cutting wrote:
> jerome@apache.org wrote:
> 
>> +    /*
>> +     * (non-Javadoc)
>> +     * +     * @see 
>> org.apache.nutch.io.Writable#write(java.io.DataOutput)
>> +     */
>> +    public final void write(DataOutput out) throws IOException {
> 
> 
> We should either include javadoc or not.  In general, all public methods 
> should have javadoc.  In this case, since this is implementing an 
> interface method, if no Javadoc comment is added, then the interface's 
> will be used.  That would be preferable.  Frequently in this case folks 
> add a comment like:
> 
> // javadoc inherited
> 
> Doug
> 
Doug,
It is not a JavaDoc comment as it does not start with "/**" - it has 
exactly the efect you mentioned - the JavaDoc would be inherited - in 
fact Eclipse generates such comment automatically. In fact in my opinion
both versions (//javadoc inherited) and commited one are ok and I have 
no preferences towards any of them.

Regards,
Piotr