You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@groovy.apache.org by Robert Stagner <re...@gmail.com> on 2015/07/19 17:29:48 UTC

Error message in version 2.4.4 is not as helpful as it was in version 2.2.2

While executing the following code in 2.4.4

abstract class Module {
>     abstract String getModuleName()
> }
> class Master extends Module {
>     String title
>     String track
> }
> def master = new Master(title: "Hello", track: "1")
> println master.title


I receive the following error message

Abstract method 'java.lang.String getModuleName()' is not implemented but a
> method of the same name but different return type is defined: method
> 'java.lang.String getModuleName()'


However, when I execute the code in version 2.2.2, I receive the following
error message

Can't have an abstract method in a non-abstract class. The class 'Master'
> must be declared abstract or the method 'java.lang.String getModuleName()'
> must be implemented.


The *second* of the two error messages seems a bit clearer to me.

With respect to version 2.4.4, is this expected behavior or is this a
defect?

Re: Error message in version 2.4.4 is not as helpful as it was in version 2.2.2

Posted by Robert Stagner <re...@gmail.com>.
That's great! I had planned on doing that yesterday afternoon, but I could
not find the web site to enter the JIRA issue.  Now that you've provided me
the link, well, I know where to find the Groovy issue tracker.


On Thu, Jul 23, 2015 at 8:50 AM Keegan Witt <ke...@gmail.com> wrote:

> I went ahead and created a Jira so I had a number to name by PR branch
> against: https://issues.apache.org/jira/browse/GROOVY-7520.  Feel free to
> edit/comment.
>
> -Keegan
>
> On Wed, Jul 22, 2015 at 9:02 AM, Keegan Witt <ke...@gmail.com> wrote:
>
>> Cedric changed the message in commit
>> 59c4332763351d910f5bdc61164fdbab0bd05707
>> <https://github.com/apache/incubator-groovy/commit/59c4332763351d910f5bdc61164fdbab0bd05707>.
>> I agree that in this case, the old message was clearer.  Open a Jira, I
>> think I have an idea how we can improve this.
>>
>> -Keegan
>>
>>
>> On Sun, Jul 19, 2015 at 11:29 AM, Robert Stagner <re...@gmail.com>
>> wrote:
>>
>>> is not implemented but a method of the same name but different return
>>> type is defined
>>
>>
>>
>>
>

Re: Error message in version 2.4.4 is not as helpful as it was in version 2.2.2

Posted by Keegan Witt <ke...@gmail.com>.
I went ahead and created a Jira so I had a number to name by PR branch
against: https://issues.apache.org/jira/browse/GROOVY-7520.  Feel free to
edit/comment.

-Keegan

On Wed, Jul 22, 2015 at 9:02 AM, Keegan Witt <ke...@gmail.com> wrote:

> Cedric changed the message in commit
> 59c4332763351d910f5bdc61164fdbab0bd05707
> <https://github.com/apache/incubator-groovy/commit/59c4332763351d910f5bdc61164fdbab0bd05707>.
> I agree that in this case, the old message was clearer.  Open a Jira, I
> think I have an idea how we can improve this.
>
> -Keegan
>
>
> On Sun, Jul 19, 2015 at 11:29 AM, Robert Stagner <re...@gmail.com>
> wrote:
>
>> is not implemented but a method of the same name but different return
>> type is defined
>
>
>
>

Re: Error message in version 2.4.4 is not as helpful as it was in version 2.2.2

Posted by Keegan Witt <ke...@gmail.com>.
Cedric changed the message in commit
59c4332763351d910f5bdc61164fdbab0bd05707
<https://github.com/apache/incubator-groovy/commit/59c4332763351d910f5bdc61164fdbab0bd05707>.
I agree that in this case, the old message was clearer.  Open a Jira, I
think I have an idea how we can improve this.

-Keegan


On Sun, Jul 19, 2015 at 11:29 AM, Robert Stagner <re...@gmail.com>
wrote:

> is not implemented but a method of the same name but different return type
> is defined