Menu

#117 [rawtypes] found raw type: IAxis

next_bugfix_release
open
nobody
None
5
2015-11-27
2015-11-26
Anonymous
No

Hi,

Great library - thank you for sharing it!

However,

 IAxis axisX = staticChart.getAxisX();

at http://www.coderanch.com/how-to/java/JChart2DDemo generates the following warning:

warning: [rawtypes] found raw type: IAxis
    IAxis axisX = staticChart.getAxisX();
    ^
missing type arguments for generic class IAxis<T>
    where T is a type-variable:
    T extends IAxisScalePolicy declared in interface IAxis

Please, what is the correct type declaration?
(I also tried IAxis<iaxisscalepolicy> without success.)</iaxisscalepolicy>

Many thanks and best regards,

Simon

Discussion

  • Achim Westermann

    Hi Simon,
    the source you refer to is some totally outdated example. Even if jchart2d has been in a long hiatus for now.

    Try stick to the examples within the original source: http://sourceforge.net/p/jchart2d/code/ci/master/tree/src/info/monitorenter/gui/chart/demos/AdvancedDynamicChart.java

    However I don't know which version of the library you use.

    kind regards,
    Achim

     
  • Anonymous

    Anonymous - 2015-11-27

    Hi Achim,

    Thanks for your quick reply! With an added type indication < ? > like in

    IAxis< ? > axisX = staticChart.getAxisX();
    

    or like in your source, I then not only get a compilation warning but even the following compilation error:

    error: incompatible types: AxisScalePolicyManualTicks cannot be converted to CAP#1
        axisX.setAxisScalePolicy(new AxisScalePolicyManualTicks());
                                 ^
      where CAP#1 is a fresh type-variable:
        CAP#1 extends IAxisScalePolicy from capture of ?
    

    Kind regards,

    Simon

     
  • Achim Westermann

    Hi Simon,

    yes that's weak. I should have some time from December 10th on to fix the issue. Unfortunately not sooner.

    thx for reporting.

    cheers,
    Achim

     

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB