Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix locale for Java example.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Mon, 28 Mar 2022 14:45:33 +0000 (16:45 +0200)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Mon, 28 Mar 2022 14:45:33 +0000 (16:45 +0200)
examples/deprecated/java/cloud/migration/Test.java
examples/deprecated/java/cloud/migration/XVM.java

index 8bc3127..6bed352 100644 (file)
@@ -27,7 +27,7 @@ public class Test extends Process{
     vm.migrate(dst);
     double endTime = Msg.getClock();
     Msg.info("     - End of Migration from "+ src.getName() +" to " + dst.getName()+ " (duration:" +
-             String.format("%.9f", (endTime-startTime))+")");
+             String.format(java.util.Locale.ROOT, "%.9f", (endTime-startTime))+")");
   }
 
   public void main(String[] strings) throws MsgException {
index 3a5055c..bba4cf4 100644 (file)
@@ -49,7 +49,7 @@ public class XVM extends VM {
   public void migrate(Host host) throws HostFailureException {
     Msg.info("Start migration of VM " + this.getName() + " to " + host.getName());
     Msg.info("    currentLoad:" + this.currentLoad + "/ramSize:" + this.ramsize + "/dpIntensity:" + this.dpIntensity
-        + "/remaining:" + String.format(java.util.Locale.US, "%.2E",this.daemon.getRemaining()));
+        + "/remaining:" + String.format(java.util.Locale.ROOT, "%.2E",this.daemon.getRemaining()));
     try{
       super.migrate(host);
     } catch (Exception e){