Cloudslab / cloudsim

CloudSim: A Framework For Modeling And Simulation Of Cloud Computing Infrastructures And Services
http://www.cloudbus.org/cloudsim/
810 stars 492 forks source link

Wrong string comparison using == instead of .equals method in RunnerAbs.java #91

Open ziasistani opened 7 years ago

ziasistani commented 7 years ago

Dear @SarehFotuhi @nikolayg

in Java String Comparison is done by .equals instead of == operator because == is used to compare object reference not values. You got correct answer because your JRE de-duplication was on and you have 1GB memory assigned to the JRE so the platform put both objects to the same position in memory.

I assigned 2Gb and errors start to appear and the root cause was bad string comparison with == in RunnerAbs.java Regards

File Path with problem is : cloudsim/modules/cloudsim-examples/src/main/java/org/cloudbus/cloudsim/examples/container/RunnerAbs.java