When I did jdprscn for my java Project I found following warning message:
class com/mes/mvc/mes/ApiLogRecord uses deprecated method java/math/BigDecimal::divide(Ljava/math/BigDecimal;I)Ljava/math/BigDecimal;
command used to scan jdprscan:
/Library/Java/JavaVirtualMachines/jdk-11.0.2.jdk/Contents/Home/bin/jdeprscan --class-path `mvn -f pom.xml -q exec:exec -Dexec.executable=echo -Dexec.args="%classpath"` target/classes > ~/Downloads/bpDeps.txt
actual method where this error coming from is :
/**
* Convert duration milliseconds to seconds suitable for displaying.
*
* 246 milliseconds -> '0.246 secs'
*/
public String getDurationForDisplay() {
BigDecimal duration = new BigDecimal("" + requestDuration).setScale(3);
duration = duration.divide(new BigDecimal("1000"), BigDecimal.ROUND_HALF_UP);
return "" + duration + " secs";
}
I have to fix this issue, anyone here can guide me.