Can't have an abstract method in a non-abstract class

View: New views
5 Messages — Rating Filter:   Alert me  

Can't have an abstract method in a non-abstract class

by st.clair :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

I have this class in Java that compiles and run normally:
public class NameValidator implements IFieldValidator< String >
{
   

    public String getErrorMessage()
    {
       

        return "Must begin with \"ab\".";
    }
   

    public String getWarningMessage()
    {
        return "We prefer the third letter to a \"c\".";
    }
   

    public boolean isValid( String contents )
    {
        return contents.startsWith( "ab" );
    }
   

    public boolean warningExist( String contents )
    {
        return contents.startsWith( "ab" ) && ( ( contents.length() < 3 ) || ( contents.charAt( 2 ) != 'c' ) );
    }
   
}


When I change the extension to groovy an error is shown and the src will not compile with the subject being the popup on the error decorator.

Could someone explain this please.

Thanks.

Re: Can't have an abstract method in a non-abstract class

by glaforge :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

At first sight sounds like a bug.
Could you please show us the exact message / stacktrace you get?
Also, could you create a reproducable sample which doesn't depend on
any framework?

On Wed, Jul 9, 2008 at 7:01 AM, st.clair <st_clair@...> wrote:

>
> Hello,
>
> I have this class in Java that compiles and run normally:
> public class NameValidator implements IFieldValidator< String >
> {
>
>
>    public String getErrorMessage()
>    {
>
>
>        return "Must begin with \"ab\".";
>    }
>
>
>    public String getWarningMessage()
>    {
>        return "We prefer the third letter to a \"c\".";
>    }
>
>
>    public boolean isValid( String contents )
>    {
>        return contents.startsWith( "ab" );
>    }
>
>
>    public boolean warningExist( String contents )
>    {
>        return contents.startsWith( "ab" ) && ( ( contents.length() < 3 ) ||
> ( contents.charAt( 2 ) != 'c' ) );
>    }
>
> }
>
>
> When I change the extension to groovy an error is shown and the src will not
> compile with the subject being the popup on the error decorator.
>
> Could someone explain this please.
>
> Thanks.
> --
> View this message in context: http://www.nabble.com/Can%27t-have-an-abstract-method-in-a-non-abstract-class-tp18354519p18354519.html
> Sent from the groovy - user mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>
>



--
Guillaume Laforge
Groovy Project Manager
G2One, Inc. Vice-President Technology
http://www.g2one.com

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Re: Can't have an abstract method in a non-abstract class

by st.clair :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,
Thanks for the reply.

There is no stack trace, only the error decorator with its popup. It seems to occur with this framework only. Attached is a screen shot of the full decorator errors.

Thanks


glaforge wrote:
At first sight sounds like a bug.
Could you please show us the exact message / stacktrace you get?
Also, could you create a reproducable sample which doesn't depend on
any framework?

On Wed, Jul 9, 2008 at 7:01 AM, st.clair <st_clair@flowja.com> wrote:
>
> Hello,
>
> I have this class in Java that compiles and run normally:
> public class NameValidator implements IFieldValidator< String >
> {
>
>
>    public String getErrorMessage()
>    {
>
>
>        return "Must begin with \"ab\".";
>    }
>
>
>    public String getWarningMessage()
>    {
>        return "We prefer the third letter to a \"c\".";
>    }
>
>
>    public boolean isValid( String contents )
>    {
>        return contents.startsWith( "ab" );
>    }
>
>
>    public boolean warningExist( String contents )
>    {
>        return contents.startsWith( "ab" ) && ( ( contents.length() < 3 ) ||
> ( contents.charAt( 2 ) != 'c' ) );
>    }
>
> }
>
>
> When I change the extension to groovy an error is shown and the src will not
> compile with the subject being the popup on the error decorator.
>
> Could someone explain this please.
>
> Thanks.
> --
> View this message in context: http://www.nabble.com/Can%27t-have-an-abstract-method-in-a-non-abstract-class-tp18354519p18354519.html
> Sent from the groovy - user mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>
>



--
Guillaume Laforge
Groovy Project Manager
G2One, Inc. Vice-President Technology
http://www.g2one.com

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email

error-decorator.png

Re: Can't have an abstract method in a non-abstract class

by glaforge :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I see, thanks for the screenshots.
Ideally, as I said, if you could have a simpler / reproducable code example we could use, that would help a lot in resolving this issue.

On Fri, Jul 11, 2008 at 11:39 AM, st.clair <st_clair@...> wrote:

Hello,
Thanks for the reply.

There is no stack trace, only the error decorator with its popup. It seems
to occur with this framework only. Attached is a screen shot of the full
decorator errors.

Thanks



glaforge wrote:
>
> At first sight sounds like a bug.
> Could you please show us the exact message / stacktrace you get?
> Also, could you create a reproducable sample which doesn't depend on
> any framework?
>
> On Wed, Jul 9, 2008 at 7:01 AM, st.clair <st_clair@...> wrote:
>>
>> Hello,
>>
>> I have this class in Java that compiles and run normally:
>> public class NameValidator implements IFieldValidator< String >
>> {
>>
>>
>>    public String getErrorMessage()
>>    {
>>
>>
>>        return "Must begin with \"ab\".";
>>    }
>>
>>
>>    public String getWarningMessage()
>>    {
>>        return "We prefer the third letter to a \"c\".";
>>    }
>>
>>
>>    public boolean isValid( String contents )
>>    {
>>        return contents.startsWith( "ab" );
>>    }
>>
>>
>>    public boolean warningExist( String contents )
>>    {
>>        return contents.startsWith( "ab" ) && ( ( contents.length() < 3 )
>> ||
>> ( contents.charAt( 2 ) != 'c' ) );
>>    }
>>
>> }
>>
>>
>> When I change the extension to groovy an error is shown and the src will
>> not
>> compile with the subject being the popup on the error decorator.
>>
>> Could someone explain this please.
>>
>> Thanks.
>> --
>> View this message in context:
>> http://www.nabble.com/Can%27t-have-an-abstract-method-in-a-non-abstract-class-tp18354519p18354519.html
>> Sent from the groovy - user mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>    http://xircles.codehaus.org/manage_email
>>
>>
>>
>
>
>
> --
> Guillaume Laforge
> Groovy Project Manager
> G2One, Inc. Vice-President Technology
> http://www.g2one.com
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>     http://xircles.codehaus.org/manage_email
>
>
>
>
http://www.nabble.com/file/p18400137/error-decorator.png error-decorator.png
--
View this message in context: http://www.nabble.com/Can%27t-have-an-abstract-method-in-a-non-abstract-class-tp18354519p18400137.html
Sent from the groovy - user mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email





--
Guillaume Laforge
Groovy Project Manager
G2One, Inc. Vice-President Technology
http://www.g2one.com

Re: Can't have an abstract method in a non-abstract class

by Alex Tkachman :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

btw, usual trick to test compilation is

new GroovyShell ().parse """
// your script
"""

On Fri, Jul 11, 2008 at 1:45 PM, Guillaume Laforge <glaforge@...> wrote:

> I see, thanks for the screenshots.
> Ideally, as I said, if you could have a simpler / reproducable code example
> we could use, that would help a lot in resolving this issue.
>
> On Fri, Jul 11, 2008 at 11:39 AM, st.clair <st_clair@...> wrote:
>>
>> Hello,
>> Thanks for the reply.
>>
>> There is no stack trace, only the error decorator with its popup. It seems
>> to occur with this framework only. Attached is a screen shot of the full
>> decorator errors.
>>
>> Thanks
>>
>>
>>
>> glaforge wrote:
>> >
>> > At first sight sounds like a bug.
>> > Could you please show us the exact message / stacktrace you get?
>> > Also, could you create a reproducable sample which doesn't depend on
>> > any framework?
>> >
>> > On Wed, Jul 9, 2008 at 7:01 AM, st.clair <st_clair@...> wrote:
>> >>
>> >> Hello,
>> >>
>> >> I have this class in Java that compiles and run normally:
>> >> public class NameValidator implements IFieldValidator< String >
>> >> {
>> >>
>> >>
>> >>    public String getErrorMessage()
>> >>    {
>> >>
>> >>
>> >>        return "Must begin with \"ab\".";
>> >>    }
>> >>
>> >>
>> >>    public String getWarningMessage()
>> >>    {
>> >>        return "We prefer the third letter to a \"c\".";
>> >>    }
>> >>
>> >>
>> >>    public boolean isValid( String contents )
>> >>    {
>> >>        return contents.startsWith( "ab" );
>> >>    }
>> >>
>> >>
>> >>    public boolean warningExist( String contents )
>> >>    {
>> >>        return contents.startsWith( "ab" ) && ( ( contents.length() < 3
>> >> )
>> >> ||
>> >> ( contents.charAt( 2 ) != 'c' ) );
>> >>    }
>> >>
>> >> }
>> >>
>> >>
>> >> When I change the extension to groovy an error is shown and the src
>> >> will
>> >> not
>> >> compile with the subject being the popup on the error decorator.
>> >>
>> >> Could someone explain this please.
>> >>
>> >> Thanks.
>> >> --
>> >> View this message in context:
>> >>
>> >> http://www.nabble.com/Can%27t-have-an-abstract-method-in-a-non-abstract-class-tp18354519p18354519.html
>> >> Sent from the groovy - user mailing list archive at Nabble.com.
>> >>
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe from this list, please visit:
>> >>
>> >>    http://xircles.codehaus.org/manage_email
>> >>
>> >>
>> >>
>> >
>> >
>> >
>> > --
>> > Guillaume Laforge
>> > Groovy Project Manager
>> > G2One, Inc. Vice-President Technology
>> > http://www.g2one.com
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe from this list, please visit:
>> >
>> >     http://xircles.codehaus.org/manage_email
>> >
>> >
>> >
>> >
>> http://www.nabble.com/file/p18400137/error-decorator.png
>> error-decorator.png
>> --
>> View this message in context:
>> http://www.nabble.com/Can%27t-have-an-abstract-method-in-a-non-abstract-class-tp18354519p18400137.html
>> Sent from the groovy - user mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>    http://xircles.codehaus.org/manage_email
>>
>>
>
>
>
> --
> Guillaume Laforge
> Groovy Project Manager
> G2One, Inc. Vice-President Technology
> http://www.g2one.com

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email