Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Adding some new functions.
[mapping.git] / src / and / Mapping / Mapping.java
index c6ee73a..9429df4 100644 (file)
@@ -59,9 +59,17 @@ public class Mapping implements Serializable
                }
                
                /** For the usage of algorithms which map groups of tasks on cluster **/
+               GNode tmp = null ;
                for( int i = 0 ; i < at.size() ; i++ )
                {
-                       insertMapping( new Association( c.nextGNode(), at.get( i ) ) ) ;
+                       tmp = c.nextGNode() ;
+                       if( tmp != null )
+                       {
+                               insertMapping( new Association( tmp, at.get( i ) ) ) ;
+                       } else {
+                               System.err.println( "Error during reception of the next GNode !" ) ;
+                               break ;
+                       }
                }
        }