You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by Myrna van Lunteren <m....@gmail.com> on 2010/08/30 22:35:33 UTC

javadoc warning on one machine (DateTimeParser: 191: warning - @return tag cannot be used in method with void return type.)

Hi,

On one windows  machine (windows 2008) I see the following javadoc
warning since check-in of revision 989918 for DERBY-3173:
(slightly edited path)
[javadoc] C:\trunk\java\engine\org\apache\derby\iapi\types\DateTimeParser.java:191:
warning - @return tag cannot be used in method with void return type.

I've been trying to duplicate this for a while on my laptop, which is
running Windows XP, but I seem to be unable to do so. It's really odd,
for as far as I know, all pieces of software - jvms, ant, (local.) ant
properties file and steps are the same. I've compared printcompiler
output and it looks the same to me also.
The Hudson build also hasn't complained, or did I miss a warning?

The complaint seems valid, and seems easy to fix, but I thought I'd
check to see if anyone else sees this javadoc warning?

Myrna

Re: javadoc warning on one machine (DateTimeParser: 191: warning - @return tag cannot be used in method with void return type.)

Posted by Myrna van Lunteren <m....@gmail.com>.
On Mon, Aug 30, 2010 at 6:59 PM, Bryan Pendleton
<bp...@gmail.com> wrote:
> I don't see this error with my build (Ubuntu Linux). From what I can see, my
> 'ant javadoc' build *is* building the javadoc for DateTimeParser, so I don't
> know why I don't see the error.
>
>> [javadoc]
>> C:\trunk\java\engine\org\apache\derby\iapi\types\DateTimeParser.java:191:
>> warning - @return tag cannot be used in method with void return type.
>
> But I agree with you, it seems definitely wrong, as that method is certainly
> void, and so shouldn't have a @return tag.
>
>> The Hudson build also hasn't complained, or did I miss a warning?
>
> I'm not quite sure. When I look at the bottom of
> https://hudson.apache.org/hudson/job/Derby-trunk/lastBuild/console
>
> I see this:
>
> [WARNINGS] Found 1 new annotations (0 high, 1 normal, 0 low)
> [WARNINGS] Found 1  annotations (0 high, 1 normal, 0 low)
> [WARNINGS] Setting build status to FAILURE since total number of annotations
> exceeds the threshold 0
> ERROR: Illegal address
> javax.mail.internet.AddressException: Illegal address in string
> ``kahatlen@gmail.com,knut.hatlen@sun.com''
>        at
> javax.mail.internet.InternetAddress.<init>(InternetAddress.java:94)
>        at hudson.tasks.MailSender.buildCulpritList(MailSender.java:374)
>
> So maybe the Hudson build was trying to tell you something,
> but can't figure out how.
>
> thanks,
>
> bryan
>
>
>
Interesting - maybe Hudson is choking on the sun address, or cannot
handle the comma separated list?

I'm also still puzzled why we didn't get this everywhere, but as the
issue has been fixed, I'm not going to dedicate more time to it.

Myrna

Re: javadoc warning on one machine (DateTimeParser: 191: warning - @return tag cannot be used in method with void return type.)

Posted by Myrna van Lunteren <m....@gmail.com>.
On Mon, Aug 30, 2010 at 10:33 PM, Eranda Sooriyabandara
<er...@gmail.com> wrote:
> This should something with the patch of issue
> https://issues.apache.org/jira/browse/DERBY-3173.

> Here we change the return type String to void but we didn't change the
> comments. I will reopen the issue and come up with a patch.
>
>
Thanks Erranda for your patch fixing this & Knut Anders for checking it in...
Myrna

Re: javadoc warning on one machine (DateTimeParser: 191: warning - @return tag cannot be used in method with void return type.)

Posted by Eranda Sooriyabandara <er...@gmail.com>.
This should something with the patch of issue
https://issues.apache.org/jira/browse/DERBY-3173.<https://issues.apache.org/jira/browse/DERBY-3173>
Here I got the part which the warning is appeared.

/**
     * Check that we are at the end of the string: that the rest of the
characters, if any, are blanks.
     *
     * @return the original string with trailing blanks trimmed off.
     * @exception StandardException if there are more non-blank characters.
     */
    void checkEnd() throws StandardException
    {
        int end = fieldStart;
        for( ; fieldStart < len; fieldStart++)
        {
            if( str.charAt( fieldStart) != ' ')
                throw StandardException.newException(
SQLState.LANG_DATE_SYNTAX_EXCEPTION);
        }
        currentSeparator = 0;
        while( end > 0 && str.charAt( end - 1) == ' ')
            end--;
    } // end of checkEnd

Here we change the return type String to void but we didn't change the
comments. I will reopen the issue and come up with a patch.

Re: javadoc warning on one machine (DateTimeParser: 191: warning - @return tag cannot be used in method with void return type.)

Posted by Bryan Pendleton <bp...@gmail.com>.
I don't see this error with my build (Ubuntu Linux). From what I can see, my
'ant javadoc' build *is* building the javadoc for DateTimeParser, so I don't
know why I don't see the error.

> [javadoc] C:\trunk\java\engine\org\apache\derby\iapi\types\DateTimeParser.java:191:
> warning - @return tag cannot be used in method with void return type.

But I agree with you, it seems definitely wrong, as that method is certainly
void, and so shouldn't have a @return tag.

> The Hudson build also hasn't complained, or did I miss a warning?

I'm not quite sure. When I look at the bottom of
https://hudson.apache.org/hudson/job/Derby-trunk/lastBuild/console

I see this:

[WARNINGS] Found 1 new annotations (0 high, 1 normal, 0 low)
[WARNINGS] Found 1  annotations (0 high, 1 normal, 0 low)
[WARNINGS] Setting build status to FAILURE since total number of annotations exceeds the threshold 0
ERROR: Illegal address
javax.mail.internet.AddressException: Illegal address in string ``kahatlen@gmail.com,knut.hatlen@sun.com''
	at javax.mail.internet.InternetAddress.<init>(InternetAddress.java:94)
	at hudson.tasks.MailSender.buildCulpritList(MailSender.java:374)

So maybe the Hudson build was trying to tell you something,
but can't figure out how.

thanks,

bryan