This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 177057 - Implement all abstract methods does not properly implement sequence argument with standard types
Summary: Implement all abstract methods does not properly implement sequence argument ...
Status: VERIFIED FIXED
Alias: None
Product: javafx
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P2 normal (vote)
Assignee: Karol Harezlak
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-18 03:06 UTC by Alexandr Scherbatiy
Modified: 2009-11-19 04:22 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexandr Scherbatiy 2009-11-18 03:06:40 UTC
Product Version         = NetBeans IDE Dev (Build 200911170201) (#3dca89945b8c)
  Operating System        = Windows XP version 5.1 running on x86
  Java; VM; Vendor        = 1.6.0_15; Java HotSpot(TM) Client VM 14.1-b02; Sun Microsystems Inc.


Steps to reproduce:

- Copy the code to the editor:
------------------------------------------------------------
abstract class A{
    abstract function f (seq:Boolean[]);

}

class B extends A{

}
------------------------------------------------------------
- Implement all abstract methods for the B class

The result is:
------------------------------------------------------------
import java.lang.UnsupportedOperationException;
import com.sun.javafx.runtime.sequence.Sequence;

abstract class A{
    abstract function f (seq:Boolean[]);

}

class B extends A{
    override function f (seq : boolean[]) : Object { 
        throw new UnsupportedOperationException('Not implemented yet');
    }


}
------------------------------------------------------------

javafxapplication9\Main.fx:18: cannot find symbol
symbol  : class boolean
location: class javafxapplication9.Main.B
    override function f (seq : boolean[]) : Object {
1 error
Comment 1 Alexandr Scherbatiy 2009-11-18 03:08:35 UTC
The same is for other types:

- Number
- Double 
- Character
and so on.

See http://java.sun.com/javafx/1/tutorials/core/dataTypes
-----------------------------------------------------------------------------------------------
Note: As of SDK 1.1, the language also contains numeric types that align with
those found in the Java programming
language. The full list of numeric types is therefore: Byte, Short, Number,
Integer, Long, Float, Double, and Character.
However, the advice given above still holds true: most programmers will only
need Integer (or Number) for the scripts
that they write. If you are coming to this language from a Java programming
language background and have a task that
absolutely requires one of the other types, just know that these additional
types are now available to your scripts. 
-----------------------------------------------------------------------------------------------
Comment 2 Karol Harezlak 2009-11-18 08:46:59 UTC
It's a stopper so it must be fixed in 6.8. It generates broken JavaFX code.
Comment 3 Lukas Hasik 2009-11-19 04:22:01 UTC
verified in 200911190201