minor bug fix: enforce string to avoid merging mote ids

This commit is contained in:
nifi 2009-09-24 08:56:17 +00:00
parent 1ee52635c8
commit 51cbcd9193

View File

@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE. * SUCH DAMAGE.
* *
* $Id: RadioLogger.java,v 1.23 2009/09/17 13:20:48 fros4943 Exp $ * $Id: RadioLogger.java,v 1.24 2009/09/24 08:56:17 nifi Exp $
*/ */
package se.sics.cooja.plugins; package se.sics.cooja.plugins;
@ -137,10 +137,10 @@ public class RadioLogger extends VisPlugin {
return "-"; return "-";
} }
if (dests.length == 1) { if (dests.length == 1) {
return dests[0].getMote().getID(); return "" + dests[0].getMote().getID();
} }
if (dests.length == 2) { if (dests.length == 2) {
return dests[0].getMote().getID() + ',' + dests[1].getMote().getID(); return "" + dests[0].getMote().getID() + ',' + dests[1].getMote().getID();
} }
return "[" + dests.length + " d]"; return "[" + dests.length + " d]";
} else if (col == COLUMN_DATA) { } else if (col == COLUMN_DATA) {
@ -381,7 +381,7 @@ public class RadioLogger extends VisPlugin {
} }
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
for (Radio dest: dests) { for (Radio dest: dests) {
sb.append(dest.getMote().getID() + ','); sb.append(dest.getMote().getID()).append(',');
} }
sb.setLength(sb.length()-1); sb.setLength(sb.length()-1);
return sb.toString(); return sb.toString();