Dgenerator.decimal=true not working for existing fields

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

Dgenerator.decimal=true not working for existing fields

Vipin Chaudhary
QuickFIX/J Documentation: http://www.quickfixj.org/documentation/
QuickFIX/J Support: http://www.quickfixj.org/support/



Hi All,

when I am packaging code using -Dgenerator.decimal=true, the existing Price type field are not changing to BigDecimal.

I want that all Price Type fields should take BigDecimal as input. As per the documentation this can be achieved, if we compile code using -Dgenerator.decimal=true option.

I used "package -Dgenerator.decimal=true -DskipAT=true" but still Price type fields constructor are taking double field.

I added some custom fields of Price type and those new custom fields constructor are taking BigDecimal value. So It seems that this(-Dgenerator.decimal=true) is working for new fields only.


Please provide your valuable suggestion.


Thanks

Vipin Chaudhary


------------------------------------------------------------------------------

_______________________________________________
Quickfixj-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quickfixj-users
Reply | Threaded
Open this post in threaded view
|

Re: Dgenerator.decimal=true not working for existing fields

Christoph John
QuickFIX/J Documentation: http://www.quickfixj.org/documentation/
QuickFIX/J Support: http://www.quickfixj.org/support/


Hi,

I think it would have been sufficient to either open a JIRA issue or post to the mailing list
(preferred). Not both.
However, what you aretrying to achieve works for me. I have started the build with

mvn clean package -Dgenerator.decimal=true -DskipTests

and this was the Price field class that I got:
# vi quickfixj-core/target/generated-sources/quickfix/field/Price.java

-----------
// cut the header here
public class Price extends DecimalField {

     static final long serialVersionUID = 20050617;

     public static final int FIELD = 44;

     public Price() {
         super(44);
     }

     public Price(java.math.BigDecimal data) {
         super(44, data);
     }

     public Price(double data) {
         super(44, new java.math.BigDecimal(data));
     }

}

-----------

Where did you get the source code from? Were you using the most current one from github?

Regards,
Chris.

On 18/11/16 11:02, Vipin Chaudhary wrote:

> QuickFIX/J Documentation: http://www.quickfixj.org/documentation/
> QuickFIX/J Support: http://www.quickfixj.org/support/
>
>
>
>
> Hi All,
>
> when I am packaging code using -Dgenerator.decimal=true, the existing Price type field are not
> changing to BigDecimal.
>
> I want that all Price Type fields should take BigDecimal as input. As per the documentation this
> can be achieved, if we compile code using -Dgenerator.decimal=true option.
>
> I used "package -Dgenerator.decimal=true -DskipAT=true" but still Price type fields constructor
> are taking double field.
>
> I added some custom fields of Price type and those new custom fields constructor are taking
> BigDecimal value. So It seems that this(-Dgenerator.decimal=true) is working for new fields only.
>
>
> Please provide your valuable suggestion.
>
>
> Thanks
>
> Vipin Chaudhary
>
>
>
> ------------------------------------------------------------------------------
>
>
> _______________________________________________
> Quickfixj-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/quickfixj-users

--
Christoph John
Development & Support
Direct: +49 241 557080-28
Mailto:[hidden email]
       


http://www.macd.com <http://www.macd.com/>
----------------------------------------------------------------------------------------------------
       
----------------------------------------------------------------------------------------------------
MACD GmbH
Oppenhoffallee 103
D-52066 Aachen
Tel: +49 241 557080-0 | Fax: +49 241 557080-10
         Amtsgericht Aachen: HRB 8151
Ust.-Id: DE 813021663

Geschäftsführer: George Macdonald
----------------------------------------------------------------------------------------------------
       
----------------------------------------------------------------------------------------------------

take care of the environment - print only if necessary

------------------------------------------------------------------------------
_______________________________________________
Quickfixj-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quickfixj-users
Reply | Threaded
Open this post in threaded view
|

Re: Dgenerator.decimal=true not working for existing fields

Vipin Chaudhary
QuickFIX/J Documentation: http://www.quickfixj.org/documentation/
QuickFIX/J Support: http://www.quickfixj.org/support/



Hi Christoph,

Yes I cloned the repository from github and added some field to the data dictionary. Now the custom fields that I added of price type are generating correctly(Having BigDecimal) but old fields are still having the double.

I am running the command on top level.

public class Price extends DoubleField {

static final long serialVersionUID = 20050617;

public static final int FIELD = 44;

public Price() {
super(44);
}

public Price(double data) {
super(44, data);
}

}
version - 1.7.0-SNAPSHOT
This is what I am getting. Can you suggest where I am wrong

Thanks
Vipin

On Fri, Nov 18, 2016 at 4:17 PM, Christoph John <[hidden email]> wrote:
QuickFIX/J Documentation: <a href="http://www.quickfixj.org/documentation/ QuickFIX/J" rel="noreferrer" target="_blank">http://www.quickfixj.org/documentation/
QuickFIX/J Support: http://www.quickfixj.org/support/


Hi,

I think it would have been sufficient to either open a JIRA issue or post to the mailing list
(preferred). Not both.
However, what you aretrying to achieve works for me. I have started the build with

mvn clean package -Dgenerator.decimal=true -DskipTests

and this was the Price field class that I got:
# vi quickfixj-core/target/generated-sources/quickfix/field/Price.java

-----------
// cut the header here
public class Price extends DecimalField {

     static final long serialVersionUID = 20050617;

     public static final int FIELD = 44;

     public Price() {
         super(44);
     }

     public Price(java.math.BigDecimal data) {
         super(44, data);
     }

     public Price(double data) {
         super(44, new java.math.BigDecimal(data));
     }

}

-----------

Where did you get the source code from? Were you using the most current one from github?

Regards,
Chris.

On 18/11/16 11:02, Vipin Chaudhary wrote:
> QuickFIX/J Documentation: http://www.quickfixj.org/documentation/
> QuickFIX/J Support: http://www.quickfixj.org/support/
>
>
>
>
> Hi All,
>
> when I am packaging code using -Dgenerator.decimal=true, the existing Price type field are not
> changing to BigDecimal.
>
> I want that all Price Type fields should take BigDecimal as input. As per the documentation this
> can be achieved, if we compile code using -Dgenerator.decimal=true option.
>
> I used "package -Dgenerator.decimal=true -DskipAT=true" but still Price type fields constructor
> are taking double field.
>
> I added some custom fields of Price type and those new custom fields constructor are taking
> BigDecimal value. So It seems that this(-Dgenerator.decimal=true) is working for new fields only.
>
>
> Please provide your valuable suggestion.
>
>
> Thanks
>
> Vipin Chaudhary
>
>
>
> ------------------------------------------------------------------------------
>
>
> _______________________________________________
> Quickfixj-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/quickfixj-users

--
Christoph John
Development & Support
Direct: +49 241 557080-28
Mailto:[hidden email]



http://www.macd.com <http://www.macd.com/>
----------------------------------------------------------------------------------------------------

----------------------------------------------------------------------------------------------------
MACD GmbH
Oppenhoffallee 103
D-52066 Aachen
Tel: +49 241 557080-0 | Fax: +49 241 557080-10
         Amtsgericht Aachen: HRB 8151
Ust.-Id: DE 813021663

Geschäftsführer: George Macdonald
----------------------------------------------------------------------------------------------------

----------------------------------------------------------------------------------------------------

take care of the environment - print only if necessary

------------------------------------------------------------------------------
_______________________________________________
Quickfixj-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quickfixj-users


------------------------------------------------------------------------------

_______________________________________________
Quickfixj-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quickfixj-users
Reply | Threaded
Open this post in threaded view
|

Re: Dgenerator.decimal=true not working for existing fields

Christoph John
QuickFIX/J Documentation: http://www.quickfixj.org/documentation/
QuickFIX/J Support: http://www.quickfixj.org/support/



Dumb question: did you use "clean" also? As in "mvn clean package..."? If you left out "clean" and were building a double-field build before that would at least explain why only the newly added fields are BigDecimal now.

Chris.

On 18/11/16 12:02, Vipin Chaudhary wrote:
Hi Christoph,

Yes I cloned the repository from github and added some field to the data dictionary. Now the custom fields that I added of price type are generating correctly(Having BigDecimal) but old fields are still having the double.

I am running the command on top level.

public class Price extends DoubleField {

   static final long serialVersionUID = 20050617;

   public static final int FIELD = 44;
   
   public Price() {
      super(44);
   }

   public Price(double data) {
      super(44, data);
   }
   
}
version - 1.7.0-SNAPSHOT
This is what I am getting. Can you suggest where I am wrong

          
Thanks
Vipin

On Fri, Nov 18, 2016 at 4:17 PM, Christoph John <[hidden email]> wrote:
QuickFIX/J Documentation: http://www.quickfixj.org/documentation/
QuickFIX/J
Support: http://www.quickfixj.org/support/


Hi,

I think it would have been sufficient to either open a JIRA issue or post to the mailing list
(preferred). Not both.
However, what you aretrying to achieve works for me. I have started the build with

mvn clean package -Dgenerator.decimal=true -DskipTests

and this was the Price field class that I got:
# vi quickfixj-core/target/generated-sources/quickfix/field/Price.java

-----------
// cut the header here
public class Price extends DecimalField {

     static final long serialVersionUID = 20050617;

     public static final int FIELD = 44;

     public Price() {
         super(44);
     }

     public Price(java.math.BigDecimal data) {
         super(44, data);
     }

     public Price(double data) {
         super(44, new java.math.BigDecimal(data));
     }

}

-----------

Where did you get the source code from? Were you using the most current one from github?

Regards,
Chris.

On 18/11/16 11:02, Vipin Chaudhary wrote:
> QuickFIX/J Documentation: http://www.quickfixj.org/documentation/
> QuickFIX/J Support: http://www.quickfixj.org/support/
>
>
>
>
> Hi All,
>
> when I am packaging code using -Dgenerator.decimal=true, the existing Price type field are not
> changing to BigDecimal.
>
> I want that all Price Type fields should take BigDecimal as input. As per the documentation this
> can be achieved, if we compile code using -Dgenerator.decimal=true option.
>
> I used "package -Dgenerator.decimal=true -DskipAT=true" but still Price type fields constructor
> are taking double field.
>
> I added some custom fields of Price type and those new custom fields constructor are taking
> BigDecimal value. So It seems that this(-Dgenerator.decimal=true) is working for new fields only.
>
>
> Please provide your valuable suggestion.
>
>
> Thanks
>
> Vipin Chaudhary
>
>
>
> ------------------------------------------------------------------------------
>
>
> _______________________________________________
> Quickfixj-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/quickfixj-users

--
Christoph John
Development & Support
Direct: +49 241 557080-28
Mailto:[hidden email]



http://www.macd.com <http://www.macd.com/>
----------------------------------------------------------------------------------------------------

----------------------------------------------------------------------------------------------------
MACD GmbH
Oppenhoffallee 103
D-52066 Aachen
Tel: +49 241 557080-0 | Fax: +49 241 557080-10
         Amtsgericht Aachen: HRB 8151
Ust.-Id: DE 813021663

Geschäftsführer: George Macdonald
----------------------------------------------------------------------------------------------------

----------------------------------------------------------------------------------------------------

take care of the environment - print only if necessary

------------------------------------------------------------------------------
_______________________________________________
Quickfixj-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quickfixj-users


--
Christoph John
Development & Support
Direct: +49 241 557080-28
Mailto:Christoph.John@...



http://www.macd.com


MACD GmbH
Oppenhoffallee 103
D-52066 Aachen
Tel: +49 241 557080-0 | Fax: +49 241 557080-10
 Amtsgericht Aachen: HRB 8151
Ust.-Id: DE 813021663

Geschäftsführer: George Macdonald


take care of the environment - print only if necessary

------------------------------------------------------------------------------

_______________________________________________
Quickfixj-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quickfixj-users