Hello everyone,
I found a little problem about
net.tinyos.message.MessageSelection.java ( 1.9 ) in line 198 of the
code.
196 if (isRelated(newClass, messageClass) &&
197 !alreadyHave(newClass)) {
198 Message m = (Message)newClass.newInstance();
199 vector.addElement(m);
200 }
We should catch the InstantiationException inside the if section
immediately or make sure newClass is not an abstract class. Otherwise,
findMessages method would stop finding the others Messages in the same
root of classpath. That causes somewhat lacking in the list of packet
showed in MessageInjector (Provided by MessageCenter). By adding the
following condition check, the MessageInjector got fixed.
(newClass.getModifiers() & java.lang.reflect.Modifier.ABSTRACT) == 0
--
Best regards,
Junyan Ma
School of Computer Science and Engineering
Northwestern Polytechnical University
Xi'an, Shaanxi, P.R. China
--
Best regards,
Junyan Ma
School of Computer Science and Engineering
Northwestern Polytechnical University
Xi'an, Shaanxi, P.R. China
Email: [EMAIL PROTECTED]
MSN: [EMAIL PROTECTED]
Gtalk: [EMAIL PROTECTED]
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help