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 :
Pour laquelle anneeVente, anneePlantation et articleVO.getDureeFpa() sont des java.lang.Integer.anneeVente = anneePlantation + (articleVO.getDureeFpa() / 12 );
La compilation me renvoie ces erreurs :
Toute aide est la bienvenue
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 ); ^
Merci !
Partager