Bonjour,

J'ai actuellement une application Web compilée pour le jdk 5.x !
Sauf que je dois la déployer sur un environnement qui utilise un jdk 1.4x ... la bonne blague.

Donc j'ai commencé à réecrire l'application là où ca ne passe pas mais je vois que l'auto boxing (si je me souviens bien du terme) n'est pas geré sous 1.4.

Donc je n'arrive pas à réecrire de manière simple une ligne de ce type :

anneeVente = anneePlantation + (articleVO.getDureeFpa() / 12 );
Pour laquelle anneeVente, anneePlantation et articleVO.getDureeFpa() sont des java.lang.Integer.

La compilation me renvoie ces erreurs :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
CoeffProductionServiceImpl.java:48: operator / 
cannot be applied to java.lang.Integer,int                                                                                                            
                anneeVente = anneePlantation + (articleVO.getDureeFpa() / 12 );                                                                       
                                                                        ^                                                                             
CoeffProductionServiceImpl.java:48: operator + 
cannot be applied to java.lang.Integer,<any>                                                                                                          
                anneeVente = anneePlantation + (articleVO.getDureeFpa() / 12 );                                                                       
                             ^
Toute aide est la bienvenue

Merci !