[openrtm-commit:02698] r974 - trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/SDOPackage

openrtm @ openrtm.org openrtm @ openrtm.org
2017年 7月 19日 (水) 16:40:04 JST


Author: t-katami
Date: 2017-07-19 16:40:04 +0900 (Wed, 19 Jul 2017)
New Revision: 974

Modified:
   trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/SDOPackage/Configuration_impl.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/SDOPackage/Configuration_impl.java
===================================================================
--- trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/SDOPackage/Configuration_impl.java	2017-07-19 06:58:10 UTC (rev 973)
+++ trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/SDOPackage/Configuration_impl.java	2017-07-19 07:40:04 UTC (rev 974)
@@ -198,8 +198,10 @@
         rtcout.println(Logbuf.TRACE, "Configuration_impl.set_device_profile()");
 
         try {
-            if(m_deviceProfile == null) m_deviceProfile = new DeviceProfile();
-            synchronized (m_deviceProfile) {
+            synchronized (m_device_profile_lock) {
+                if(m_deviceProfile == null) {
+                    m_deviceProfile = new DeviceProfile();
+                }
                 m_deviceProfile = dProfile;
             }
         } catch(Exception ex) {
@@ -1024,6 +1026,7 @@
      * {@.en DeviceProfile}
      */
     protected DeviceProfile m_deviceProfile = new DeviceProfile();
+    protected final String m_device_profile_lock = new String();
     /**
      * {@.ja ServiceProfile リスト}
      * {@.en List of ServiceProfile}



More information about the openrtm-commit mailing list