Dukascopy
 
 
Wiki JStore Search Login

Attention! Read the forum rules carefully before posting a topic.

    Submit JForex API bug reports in this forum only.
    Submit Converter issues in Converter Issues.
    Off topics are strictly forbidden.

Any topics which do not satisfy these rules will be deleted.

JDateChooser nullary constructor issue in the new JForex API 3
 Post subject: JDateChooser nullary constructor issue in the new JForex API 3 Post rating: 0   New post Posted: Wed 04 Jan, 2017, 15:06 

User rating: 3
Joined: Mon 23 May, 2011, 16:06
Posts: 17
Location: Hungary,
Dear Support Team,

The zero-argument constructor of JDateChooser class throws NullPointerException in the new JForex versions 3.0 (DDS2-jClient-JForex 3.0.x). In other words, the source code you have recently taken from jcalendar and added to JForex API contains a bug in the com.dukascopy.ui.components.calendar.JDateChooser class.
Note that it is not a top priority issue as it is easy to work around by adding jcalendar:jcalendar:1.3.3 or com.toedter:jcalendar:1.4 to the user project POM. However, you are kindly requested to fix it in the next release or the one after that.
Should you require a sample code for the reproduction or the stack trace, I will assist you.

Regards,
Argiris

PS:
My versions are: Win 10 64 bit, JDK 1.8.0_111, JForex (DDS2-jClient-JForex) 3.0.15, NetBeans 8.1


 
 Post subject: Re: JDateChooser nullary constructor issue in the new JForex API 3 Post rating: 0   New post Posted: Wed 04 Jan, 2017, 15:19 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Please describe how to reproduce the NullPointerException.


 
 Post subject: Re: JDateChooser nullary constructor issue in the new JForex API 3 Post rating: 0   New post Posted: Wed 04 Jan, 2017, 17:14 

User rating: 3
Joined: Mon 23 May, 2011, 16:06
Posts: 17
Location: Hungary,
In my code, the constructor is called in the simplest way from swing's Event Dispatch Thread:
JDateChooser dateChooser = new JDateChooser();

This line is the first line in the constructor of a class that extends JPanel. That's enough to provoke the exception.

I have two IDE projects. The first one is a library with JForex dependency (with artefact com.dukascopy.dds2:DDS2-jClient-JForex:3.0.15 in the POM file). The second one has a dependency on the first (library) project. That latter project's source code contains the mentioned invocation of the nullary constructor.

The stack trace I receive is as follows:
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
   at com.dukascopy.ui.components.textfield.CommonFormattedTextField.decorateFonts(CommonFormattedTextField.java:217)
   at com.dukascopy.ui.components.textfield.CommonFormattedTextField.updateUI(CommonFormattedTextField.java:184)
   at com.dukascopy.ui.components.calendar.JTextFieldDateEditor.updateUI(JTextFieldDateEditor.java:148)
   at javax.swing.text.JTextComponent.<init>(JTextComponent.java:312)
   at javax.swing.JTextField.<init>(JTextField.java:231)
   at javax.swing.JTextField.<init>(JTextField.java:172)
   at javax.swing.JFormattedTextField.<init>(JFormattedTextField.java:276)
   at com.dukascopy.ui.components.textfield.CommonFormattedTextField.<init>(CommonFormattedTextField.java:60)
   at com.dukascopy.ui.components.calendar.JTextFieldDateEditor.<init>(JTextFieldDateEditor.java:110)
   at com.dukascopy.ui.components.calendar.JTextFieldDateEditor.<init>(JTextFieldDateEditor.java:107)
   at com.dukascopy.ui.components.calendar.JTextFieldDateEditor.<init>(JTextFieldDateEditor.java:99)
   at com.dukascopy.ui.components.calendar.JDateChooser.<init>(JDateChooser.java:171)
   at com.dukascopy.ui.components.calendar.JDateChooser.<init>(JDateChooser.java:91)
   at com.argiris... <*** my source code, the line mentioned above ***>


 

Jump to:  

  © 1998-2024 Dukascopy® Bank SA
On-line Currency forex trading with Swiss Forex Broker - ECN Forex Brokerage,
Managed Forex Accounts, introducing forex brokers, Currency Forex Data Feed and News
Currency Forex Trading Platform provided on-line by Dukascopy.com