google-code-export / umple

Automatically exported from code.google.com/p/umple
1 stars 0 forks source link

not valid datatype generation in Java #555

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When we define a method with Float or Double return type, we don't have correct 
generated code for them. They are just considered as is while Float must be 
float and Double must be double. For example:
class SuperClass{
    public Float y1() {
        return 0;
    }
    Double y2(){
        return 0.0;
    }   
}

The generated code is as follows.

  public Float y1(){
    return 0;
  }

  public Double y2(){
    return 0.0;
  }

while it must be as following:

  public float y1(){
    return 0;
  }

  public double y2(){
    return 0.0;
  }

Original issue reported on code.google.com by V.Abdel...@gmail.com on 9 May 2014 at 3:10

GoogleCodeExporter commented 9 years ago

Original comment by V.Abdel...@gmail.com on 10 May 2014 at 6:03

GoogleCodeExporter commented 9 years ago

Original comment by V.Abdel...@gmail.com on 10 May 2014 at 6:09

GoogleCodeExporter commented 9 years ago
We do not change the return types of user-defined methods for a good reason: It 
is easy for the user to change their method signature. 

We only intercept the types of attributes.

Original comment by TimothyCLethbridge on 12 May 2014 at 5:51