[openrtm-commit:02037] r842 - trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC
openrtm @ openrtm.org
openrtm @ openrtm.org
2016年 10月 10日 (月) 13:55:23 JST
Author: win-ei
Date: 2016-10-10 13:55:23 +0900 (Mon, 10 Oct 2016)
New Revision: 842
Modified:
trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/NamingServiceNumberingPolicy.java
trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/NodeNumberingPolicy.java
Log:
Fixed bugs. refs #3397
Modified: trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/NamingServiceNumberingPolicy.java
===================================================================
--- trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/NamingServiceNumberingPolicy.java 2016-10-08 13:47:05 UTC (rev 841)
+++ trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/NamingServiceNumberingPolicy.java 2016-10-10 04:55:23 UTC (rev 842)
@@ -49,7 +49,7 @@
String num_str = Integer.toString(num);
String name = obj.getTypeName() + num_str;
boolean pos = this.find(name);
- if(pos){
+ if(!pos){
return num_str;
}
num = num + 1;
@@ -96,6 +96,9 @@
rtc_name = rtc_name + name;
RTObject[] rtcs = m_mgr.getNaming().string_to_component(rtc_name);
+ if(rtcs==null){
+ return false;
+ }
if(rtcs.length>0){
return true;
}
Modified: trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/NodeNumberingPolicy.java
===================================================================
--- trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/NodeNumberingPolicy.java 2016-10-08 13:47:05 UTC (rev 841)
+++ trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/NodeNumberingPolicy.java 2016-10-10 04:55:23 UTC (rev 842)
@@ -50,7 +50,7 @@
String num_str = Integer.toString(num);
String name = obj.getTypeName() + num_str;
boolean pos = this.find(name);
- if(pos){
+ if(!pos){
return num_str;
}
num = num + 1;
@@ -96,6 +96,10 @@
rtc_name = rtc_name + name;
RTObject[] rtcs = m_mgr.getNaming().string_to_component(rtc_name);
+ if(rtcs==null){
+ return false;
+ }
+
if(rtcs.length>0){
return true;
}
More information about the openrtm-commit
mailing list