Unexpected compilation error

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Unexpected compilation error

Paul Bennett
Andrew,

This script:

package com.metaficient.fast.scripts
import javax.swing.JFrame;
import org.joda.time.DateTime;
import com.metaficient.core.objectmodel.*;
import com.metaficient.core.tools.schemabuilder.SchemaBuilder;
import com.metaficient.fast.gui.core.EditorPanel;
import com.metaficient.fast.gui.core.FormModel;
import com.metaficient.fast.gui.core.Frame;
import com.metaficient.fast.gui.core.ListWithEditorPanel;
import com.metaficient.fast.gui.forms.AttributeTypeForm;
def sb = new SchemaBuilder()
sb.build {
attributeType(name:'DOUBLE',type: Double.class )
attributeType(name:'INTEGER',type: Integer.class )
attributeType(name:'STRING',type: String.class )
attributeType(name:'LONG',type: Long.class )
attributeType(name:'DATE_TIME',type: DateTime.class )
}
def fm = new AttributeTypeForm(null);
def editor = new EditorPanel(fm)
def lweditor = new ListWithEditorPanel<AttributeType>(AttributeType.allInstances(),editor)
def window = new Frame([defaultCloseOperation: JFrame.EXIT_ON_CLOSE])
window.addSubModel('content',lweditor)
window.show()

causes the following error:

Description Resource Path Location Type
Groovy:The method finalize should be public as it implements the corresponding method from interface java.lang.Object ListWithEditorTest.groovy /Faster/src/test/groovy/com/metaficient/fast/scripts line 77 Java Problem


In addition, no class files are generated at all in the project. The other strange thing is that the error report says the error is at line 77. There is no line 77 in the script. Which makes me think that 1) the line counting is wrong or 2) the error is from another class file, and is being displayed in/associated with the wrong file/view. I suspect #2, as the Eclipse error graphic is displayed on the first line of the above editor view, by the 'package' declaration.

Any ideas? This is a show-stopper for me right now.

I'm running Eclipse Helios (3.6) SR2, with 2.6.1 version of the GrEclipse plugin, using the 1.7.10 compiler. OS is Mac OS X 10.6.8

-pb


Reply | Threaded
Open this post in threaded view
|

Re: Unexpected compilation error

Paul Bennett
OK, I answered my own issue. It was indeed associating the error with the wrong file. There was another file with a finalize() method declared protected. I fixed that, and the error report went away

The problem is hard to reproduce, but is clearly a bug. Should I report it anyway?

-pb

On Apr 19, 2012, at 10:28 AM, Paul Bennett wrote:

Andrew,

This script:

package com.metaficient.fast.scripts
import javax.swing.JFrame;
import org.joda.time.DateTime;
import com.metaficient.core.objectmodel.*;
import com.metaficient.core.tools.schemabuilder.SchemaBuilder;
import com.metaficient.fast.gui.core.EditorPanel;
import com.metaficient.fast.gui.core.FormModel;
import com.metaficient.fast.gui.core.Frame;
import com.metaficient.fast.gui.core.ListWithEditorPanel;
import com.metaficient.fast.gui.forms.AttributeTypeForm;
def sb = new SchemaBuilder()
sb.build {
attributeType(name:'DOUBLE',type: Double.class )
attributeType(name:'INTEGER',type: Integer.class )
attributeType(name:'STRING',type: String.class )
attributeType(name:'LONG',type: Long.class )
attributeType(name:'DATE_TIME',type: DateTime.class )
}
def fm = new AttributeTypeForm(null);
def editor = new EditorPanel(fm)
def lweditor = new ListWithEditorPanel<AttributeType>(AttributeType.allInstances(),editor)
def window = new Frame([defaultCloseOperation: JFrame.EXIT_ON_CLOSE])
window.addSubModel('content',lweditor)
window.show()

causes the following error:

Description Resource Path Location Type
Groovy:The method finalize should be public as it implements the corresponding method from interface java.lang.Object ListWithEditorTest.groovy /Faster/src/test/groovy/com/metaficient/fast/scripts line 77 Java Problem


In addition, no class files are generated at all in the project. The other strange thing is that the error report says the error is at line 77. There is no line 77 in the script. Which makes me think that 1) the line counting is wrong or 2) the error is from another class file, and is being displayed in/associated with the wrong file/view. I suspect #2, as the Eclipse error graphic is displayed on the first line of the above editor view, by the 'package' declaration.

Any ideas? This is a show-stopper for me right now.

I'm running Eclipse Helios (3.6) SR2, with 2.6.1 version of the GrEclipse plugin, using the 1.7.10 compiler. OS is Mac OS X 10.6.8

-pb



-pb


Reply | Threaded
Open this post in threaded view
|

Re: Unexpected compilation error

Andy Clement
Yes, please report it at http://jira.codehaus.org/browse/GRECLIPSE

I'd have suspected it was easy to reproduce (just use a protected
finalize method somewhere) but I guess you are saying it isn't that
simple?

cheers,
Andy

On 19 April 2012 07:36, Paul Bennett <[hidden email]> wrote:

> OK, I answered my own issue. It was indeed associating the error with the
> wrong file. There was another file with a finalize() method declared
> protected. I fixed that, and the error report went away
>
> The problem is hard to reproduce, but is clearly a bug. Should I report it
> anyway?
>
> -pb
>
> On Apr 19, 2012, at 10:28 AM, Paul Bennett wrote:
>
> Andrew,
>
> This script:
>
> package com.metaficient.fast.scripts
> import javax.swing.JFrame;
> import org.joda.time.DateTime;
> import com.metaficient.core.objectmodel.*;
> import com.metaficient.core.tools.schemabuilder.SchemaBuilder;
> import com.metaficient.fast.gui.core.EditorPanel;
> import com.metaficient.fast.gui.core.FormModel;
> import com.metaficient.fast.gui.core.Frame;
> import com.metaficient.fast.gui.core.ListWithEditorPanel;
> import com.metaficient.fast.gui.forms.AttributeTypeForm;
> def sb = new SchemaBuilder()
> sb.build {
> attributeType(name:'DOUBLE',type: Double.class )
> attributeType(name:'INTEGER',type: Integer.class )
> attributeType(name:'STRING',type: String.class )
> attributeType(name:'LONG',type: Long.class )
> attributeType(name:'DATE_TIME',type: DateTime.class )
> }
> def fm = new AttributeTypeForm(null);
> def editor = new EditorPanel(fm)
> def lweditor
> = new ListWithEditorPanel<AttributeType>(AttributeType.allInstances(),editor)
> def window = new Frame([defaultCloseOperation: JFrame.EXIT_ON_CLOSE])
> window.addSubModel('content',lweditor)
> window.show()
>
>
> causes the following error:
>
> Description Resource Path Location Type
> Groovy:The method finalize should be public as it implements the
> corresponding method from interface java.lang.Object
> ListWithEditorTest.groovy
> /Faster/src/test/groovy/com/metaficient/fast/scripts line 77 Java Problem
>
>
> In addition, no class files are generated at all in the project. The other
> strange thing is that the error report says the error is at line 77. There
> is no line 77 in the script. Which makes me think that 1) the line counting
> is wrong or 2) the error is from another class file, and is being displayed
> in/associated with the wrong file/view. I suspect #2, as the Eclipse error
> graphic is displayed on the first line of the above editor view, by the
> 'package' declaration.
>
> Any ideas? This is a show-stopper for me right now.
>
> I'm running Eclipse Helios (3.6) SR2, with 2.6.1 version of the GrEclipse
> plugin, using the 1.7.10 compiler. OS is Mac OS X 10.6.8
>
> -pb
>
>
>
> -pb
>
>

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

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Unexpected compilation error

Paul Bennett
In reply to this post by Paul Bennett
Oh, things get even better.  I just checked the Javadoc for Java SE 6 (which we are using) and - of course! - Object#finalize() is indeed protected. So the compiler would seem to be wrong in this case. 

Two other pointers:

1) I have another Eclipse project that also has a class that overrides finalize(), which it declares (correctly) as protected, and the compiler does not complain in that case.
2) Editing the file so the method finalize() is public, then restoring it from my VC system to the original protected declaration makes the error go away.

Thus is would seem that the compiler became confused about the visibility of Object#finalize(), and re-compiling the overriding declaration reset it. Other than that, I have no clue.

-pb

On Apr 19, 2012, at 10:36 AM, Paul Bennett wrote:

OK, I answered my own issue. It was indeed associating the error with the wrong file. There was another file with a finalize() method declared protected. I fixed that, and the error report went away

The problem is hard to reproduce, but is clearly a bug. Should I report it anyway?

-pb

On Apr 19, 2012, at 10:28 AM, Paul Bennett wrote:

Andrew,

This script:

package com.metaficient.fast.scripts
import javax.swing.JFrame;
import org.joda.time.DateTime;
import com.metaficient.core.objectmodel.*;
import com.metaficient.core.tools.schemabuilder.SchemaBuilder;
import com.metaficient.fast.gui.core.EditorPanel;
import com.metaficient.fast.gui.core.FormModel;
import com.metaficient.fast.gui.core.Frame;
import com.metaficient.fast.gui.core.ListWithEditorPanel;
import com.metaficient.fast.gui.forms.AttributeTypeForm;
def sb = new SchemaBuilder()
sb.build {
attributeType(name:'DOUBLE',type: Double.class )
attributeType(name:'INTEGER',type: Integer.class )
attributeType(name:'STRING',type: String.class )
attributeType(name:'LONG',type: Long.class )
attributeType(name:'DATE_TIME',type: DateTime.class )
}
def fm = new AttributeTypeForm(null);
def editor = new EditorPanel(fm)
def lweditor = new ListWithEditorPanel<AttributeType>(AttributeType.allInstances(),editor)
def window = new Frame([defaultCloseOperation: JFrame.EXIT_ON_CLOSE])
window.addSubModel('content',lweditor)
window.show()

causes the following error:

Description Resource Path Location Type
Groovy:The method finalize should be public as it implements the corresponding method from interface java.lang.Object ListWithEditorTest.groovy /Faster/src/test/groovy/com/metaficient/fast/scripts line 77 Java Problem


In addition, no class files are generated at all in the project. The other strange thing is that the error report says the error is at line 77. There is no line 77 in the script. Which makes me think that 1) the line counting is wrong or 2) the error is from another class file, and is being displayed in/associated with the wrong file/view. I suspect #2, as the Eclipse error graphic is displayed on the first line of the above editor view, by the 'package' declaration.

Any ideas? This is a show-stopper for me right now.

I'm running Eclipse Helios (3.6) SR2, with 2.6.1 version of the GrEclipse plugin, using the 1.7.10 compiler. OS is Mac OS X 10.6.8

-pb



-pb



-pb


Reply | Threaded
Open this post in threaded view
|

Re: Unexpected compilation error

Paul Bennett
In reply to this post by Andy Clement
It does not appear to be. See my subsequent email, which I will include in the JIRA entry

-pb

On Apr 19, 2012, at 10:42 AM, Andy Clement wrote:

> Yes, please report it at http://jira.codehaus.org/browse/GRECLIPSE
>
> I'd have suspected it was easy to reproduce (just use a protected
> finalize method somewhere) but I guess you are saying it isn't that
> simple?
>
> cheers,
> Andy
>
> On 19 April 2012 07:36, Paul Bennett <[hidden email]> wrote:
>> OK, I answered my own issue. It was indeed associating the error with the
>> wrong file. There was another file with a finalize() method declared
>> protected. I fixed that, and the error report went away
>>
>> The problem is hard to reproduce, but is clearly a bug. Should I report it
>> anyway?
>>
>> -pb
>>
>> On Apr 19, 2012, at 10:28 AM, Paul Bennett wrote:
>>
>> Andrew,
>>
>> This script:
>>
>> package com.metaficient.fast.scripts
>> import javax.swing.JFrame;
>> import org.joda.time.DateTime;
>> import com.metaficient.core.objectmodel.*;
>> import com.metaficient.core.tools.schemabuilder.SchemaBuilder;
>> import com.metaficient.fast.gui.core.EditorPanel;
>> import com.metaficient.fast.gui.core.FormModel;
>> import com.metaficient.fast.gui.core.Frame;
>> import com.metaficient.fast.gui.core.ListWithEditorPanel;
>> import com.metaficient.fast.gui.forms.AttributeTypeForm;
>> def sb = new SchemaBuilder()
>> sb.build {
>> attributeType(name:'DOUBLE',type: Double.class )
>> attributeType(name:'INTEGER',type: Integer.class )
>> attributeType(name:'STRING',type: String.class )
>> attributeType(name:'LONG',type: Long.class )
>> attributeType(name:'DATE_TIME',type: DateTime.class )
>> }
>> def fm = new AttributeTypeForm(null);
>> def editor = new EditorPanel(fm)
>> def lweditor
>> = new ListWithEditorPanel<AttributeType>(AttributeType.allInstances(),editor)
>> def window = new Frame([defaultCloseOperation: JFrame.EXIT_ON_CLOSE])
>> window.addSubModel('content',lweditor)
>> window.show()
>>
>>
>> causes the following error:
>>
>> Description Resource Path Location Type
>> Groovy:The method finalize should be public as it implements the
>> corresponding method from interface java.lang.Object
>> ListWithEditorTest.groovy
>> /Faster/src/test/groovy/com/metaficient/fast/scripts line 77 Java Problem
>>
>>
>> In addition, no class files are generated at all in the project. The other
>> strange thing is that the error report says the error is at line 77. There
>> is no line 77 in the script. Which makes me think that 1) the line counting
>> is wrong or 2) the error is from another class file, and is being displayed
>> in/associated with the wrong file/view. I suspect #2, as the Eclipse error
>> graphic is displayed on the first line of the above editor view, by the
>> 'package' declaration.
>>
>> Any ideas? This is a show-stopper for me right now.
>>
>> I'm running Eclipse Helios (3.6) SR2, with 2.6.1 version of the GrEclipse
>> plugin, using the 1.7.10 compiler. OS is Mac OS X 10.6.8
>>
>> -pb
>>
>>
>>
>> -pb
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>

-pb



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

    http://xircles.codehaus.org/manage_email