[openrtm-commit:02735] r1000 - in trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC: executionContext port
openrtm @ openrtm.org
openrtm @ openrtm.org
2017年 8月 10日 (木) 12:12:11 JST
Author: t-katami
Date: 2017-08-10 12:12:11 +0900 (Thu, 10 Aug 2017)
New Revision: 1000
Modified:
trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/executionContext/ExecutionContextWorker.java
trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/InPortBase.java
trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/OutPortBase.java
Log:
[compat,bugfix,->RELENG_1_2] Fixed the items pointed out by the static code analysis tool.
Modified: trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/executionContext/ExecutionContextWorker.java
===================================================================
--- trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/executionContext/ExecutionContextWorker.java 2017-08-09 06:27:29 UTC (rev 999)
+++ trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/executionContext/ExecutionContextWorker.java 2017-08-10 03:12:11 UTC (rev 1000)
@@ -642,7 +642,7 @@
Iterator<RTObjectStateMachine> it = m_comps.iterator();
while (it.hasNext()) {
if(rtobj == (RTObjectStateMachine)it.next()){
- m_comps.remove(it);
+ it.remove();
}
}
rtobj = null;
Modified: trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/InPortBase.java
===================================================================
--- trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/InPortBase.java 2017-08-09 06:27:29 UTC (rev 999)
+++ trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/InPortBase.java 2017-08-10 03:12:11 UTC (rev 1000)
@@ -689,13 +689,21 @@
}
*/
}
- int index = NVUtil.find_index(holder, "dataport.serializer.cdr.endian");
- holder.value[index].value.insert_string(endian_type);
+ int index =
+ NVUtil.find_index(holder, "dataport.serializer.cdr.endian");
+ if(index<0) {
+ CORBA_SeqUtil.push_back(holder,
+ NVUtil.newNVString("dataport.serializer.cdr.endian",
+ endian_type));
+ }
+ else{
+ holder.value[index].value.insert_string(endian_type);
+ }
cprof.value.properties = holder.value;
- }
- catch(Exception e){
+ }
+ catch(Exception e){
;
- }
+ }
/*
* Because properties of ConnectorProfileHolder was merged,
* the accesses such as prop["dataflow_type"] and
Modified: trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/OutPortBase.java
===================================================================
--- trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/OutPortBase.java 2017-08-09 06:27:29 UTC (rev 999)
+++ trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/OutPortBase.java 2017-08-10 03:12:11 UTC (rev 1000)
@@ -698,8 +698,16 @@
}
*/
}
- int index = NVUtil.find_index(holder, "dataport.serializer.cdr.endian");
- holder.value[index].value.insert_string(endian_type);
+ int index =
+ NVUtil.find_index(holder, "dataport.serializer.cdr.endian");
+ if(index<0) {
+ CORBA_SeqUtil.push_back(holder,
+ NVUtil.newNVString("dataport.serializer.cdr.endian",
+ endian_type));
+ }
+ else{
+ holder.value[index].value.insert_string(endian_type);
+ }
cprof.value.properties = holder.value;
}
catch(Exception e){
@@ -1680,11 +1688,6 @@
connector = new OutPortPullConnector(profile, provider,
m_listeners, buffer);
- if (connector == null) {
- rtcout.println(Logbuf.ERROR,
- "old compiler? new returned 0;");
- return null;
- }
rtcout.println(Logbuf.TRACE, "OutPortPullConnector create");
More information about the openrtm-commit
mailing list