[openrtm-commit:02717] r986 - in trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC: . executionContext port util
openrtm @ openrtm.org
openrtm @ openrtm.org
2017年 7月 28日 (金) 10:34:26 JST
Author: t-katami
Date: 2017-07-28 10:34:25 +0900 (Fri, 28 Jul 2017)
New Revision: 986
Modified:
trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/ConfigAdmin.java
trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/DataFlowComponent_impl.java
trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/RTObject_impl.java
trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/executionContext/OpenHRPExecutionContext.java
trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/executionContext/PeriodicECOrganization.java
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/util/NVUtil.java
Log:
[compat,bugfix,->RELENG_1_2] Fixed the item pointed out by the static code analysis tool.
Modified: trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/ConfigAdmin.java
===================================================================
--- trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/ConfigAdmin.java 2017-07-27 08:27:04 UTC (rev 985)
+++ trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/ConfigAdmin.java 2017-07-28 01:34:25 UTC (rev 986)
@@ -692,7 +692,7 @@
*/
public final Properties getConfigurationSet(final String config_id) {
Properties p = new Properties(m_configsets.getNode(config_id));
- if( p == null ) return m_emptyconf;
+ //if( p == null ) return m_emptyconf;
return p;
}
Modified: trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/DataFlowComponent_impl.java
===================================================================
--- trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/DataFlowComponent_impl.java 2017-07-27 08:27:04 UTC (rev 985)
+++ trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/DataFlowComponent_impl.java 2017-07-28 01:34:25 UTC (rev 986)
@@ -3044,6 +3044,7 @@
}
return ret;
}
+ /*
public final Vector<InPortBase> getInPorts() {
return m_inports;
}
@@ -3050,7 +3051,7 @@
public final Vector<OutPortBase> getOutPorts() {
return m_outports;
}
-
+ */
/**
* {@.ja [local interface] DataInPort を登録します。}
* {@.en [local interface] Register DataInPort.}
Modified: trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/RTObject_impl.java
===================================================================
--- trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/RTObject_impl.java 2017-07-27 08:27:04 UTC (rev 985)
+++ trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/RTObject_impl.java 2017-07-28 01:34:25 UTC (rev 986)
@@ -3066,6 +3066,7 @@
}
return ret;
}
+ /*
public final Vector<InPortBase> getInPorts() {
return m_inports;
}
@@ -3072,7 +3073,7 @@
public final Vector<OutPortBase> getOutPorts() {
return m_outports;
}
-
+ */
/**
* {@.ja [local interface] DataInPort を登録します。}
* {@.en [local interface] Register DataInPort.}
Modified: trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/executionContext/OpenHRPExecutionContext.java
===================================================================
--- trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/executionContext/OpenHRPExecutionContext.java 2017-07-27 08:27:04 UTC (rev 985)
+++ trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/executionContext/OpenHRPExecutionContext.java 2017-07-28 01:34:25 UTC (rev 986)
@@ -30,11 +30,11 @@
* <p> tick </p>
*/
public void tick() throws SystemException {
- if(m_workerthread.isRunning())
- {
- return ;
- }
synchronized (m_tickmutex) {
+ if(m_workerthread.isRunning())
+ {
+ return ;
+ }
m_workerthread.invokeWorkerPostDo();
TimeValue t0 = new TimeValue();
t0.convert(System.nanoTime()/1000);
Modified: trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/executionContext/PeriodicECOrganization.java
===================================================================
--- trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/executionContext/PeriodicECOrganization.java 2017-07-27 08:27:04 UTC (rev 985)
+++ trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/executionContext/PeriodicECOrganization.java 2017-07-28 01:34:25 UTC (rev 986)
@@ -446,7 +446,7 @@
for(int i=0; i < orglist.length; ++i) {
SDO[] sdos = orglist[i].get_members();
for (int j=0; j < sdos.length; ++j) {
- DataFlowComponentHolder dfc = null;
+ DataFlowComponentHolder dfc = new DataFlowComponentHolder();
if (!sdoToDFC(sdos[j], dfc)) {
continue;
}
@@ -485,7 +485,7 @@
for (int i=0; i < orglist.length; ++i) {
SDO[] sdos = orglist[i].get_members();
for (int j=0; j < sdos.length; ++j) {
- DataFlowComponentHolder dfc = null;
+ DataFlowComponentHolder dfc = new DataFlowComponentHolder();
if (!sdoToDFC(sdos[j], dfc)) {
continue;
}
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-07-27 08:27:04 UTC (rev 985)
+++ trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/port/OutPortBase.java 2017-07-28 01:34:25 UTC (rev 986)
@@ -579,13 +579,15 @@
"invalid connection_limit value: "+_str );
}
- int value = _type;
+ int value = _type;
- if(value <= m_connectors.size()) {
- return ReturnCode_t.PRECONDITION_NOT_MET;
- }
+ synchronized (m_connectors){
+ if(value <= m_connectors.size()) {
+ return ReturnCode_t.PRECONDITION_NOT_MET;
+ }
+ }
- return super.notify_connect(connector_profile);
+ return super.notify_connect(connector_profile);
}
/**
Modified: trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/util/NVUtil.java
===================================================================
--- trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/util/NVUtil.java 2017-07-27 08:27:04 UTC (rev 985)
+++ trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/util/NVUtil.java 2017-07-28 01:34:25 UTC (rev 986)
@@ -311,7 +311,10 @@
public static Properties toProperties(final NVListHolder nvlist) {
to_prop prop = new to_prop();
prop = (to_prop) CORBA_SeqUtil.for_each(nvlist, prop);
- return prop.m_prop;
+ if(prop != null) {
+ return prop.m_prop;
+ }
+ return new Properties();
}
/**
More information about the openrtm-commit
mailing list