[openrtm-commit:02727] r992 - in trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src: RTMExamples/SeqIO/view jp/go/aist/rtm/RTC/SDOPackage
openrtm @ openrtm.org
openrtm @ openrtm.org
2017年 8月 8日 (火) 13:04:56 JST
Author: t-katami
Date: 2017-08-08 13:04:56 +0900 (Tue, 08 Aug 2017)
New Revision: 992
Modified:
trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/SeqIO/view/SeqViewApp.java
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 items pointed out by the static code analysis tool.
Modified: trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/SeqIO/view/SeqViewApp.java
===================================================================
--- trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/SeqIO/view/SeqViewApp.java 2017-08-08 00:46:17 UTC (rev 991)
+++ trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/SeqIO/view/SeqViewApp.java 2017-08-08 04:04:56 UTC (rev 992)
@@ -192,17 +192,37 @@
private void reset() {
- _octetValMarked = false;
- _shortValMarked = false;
- _longValMarked = false;
- _floatValMarked = false;
- _doubleValMarked = false;
- _octetSeqVal = null;
- _shortSeqVal = null;
- _longSeqVal = null;
- _floatSeqVal = null;
- _doubleSeqVal = null;
+ synchronized (_octetValMarked_mutex) {
+ _octetValMarked = false;
+ }
+ synchronized (_shortValMarked_mutex) {
+ _shortValMarked = false;
+ }
+ synchronized (_longValMarked_mutex) {
+ _longValMarked = false;
+ }
+ synchronized (_floatValMarked_mutex) {
+ _floatValMarked = false;
+ }
+ synchronized (_doubleValMarked_mutex) {
+ _doubleValMarked = false;
+ }
+ synchronized (_octetSeqVal_mutex) {
+ _octetSeqVal = null;
+ }
+ synchronized (_shortSeqVal_mutex) {
+ _shortSeqVal = null;
+ }
+ synchronized (_longSeqVal_mutex) {
+ _longSeqVal = null;
+ }
+ synchronized (_floatSeqVal_mutex) {
+ _floatSeqVal = null;
+ }
+ synchronized (_doubleSeqVal_mutex) {
+ _doubleSeqVal = null;
+ }
_registered = false;
}
@@ -215,21 +235,31 @@
}
}
+ private final Object _octetValMarked_mutex = new Object();
private boolean _octetValMarked;
private byte _octetVal;
+ private final Object _shortValMarked_mutex = new Object();
private boolean _shortValMarked;
private short _shortVal;
+ private final Object _longValMarked_mutex = new Object();
private boolean _longValMarked;
private int _longVal;
+ private final Object _floatValMarked_mutex = new Object();
private boolean _floatValMarked;
private float _floatVal;
+ private final Object _doubleValMarked_mutex = new Object();
private boolean _doubleValMarked;
private double _doubleVal;
+ private final Object _octetSeqVal_mutex = new Object();
private byte[] _octetSeqVal;
+ private final Object _shortSeqVal_mutex = new Object();
private short[] _shortSeqVal;
+ private final Object _longSeqVal_mutex = new Object();
private int[] _longSeqVal;
+ private final Object _floatSeqVal_mutex = new Object();
private float[] _floatSeqVal;
+ private final Object _doubleSeqVal_mutex = new Object();
private double[] _doubleSeqVal;
private boolean _registered;
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-08-08 00:46:17 UTC (rev 991)
+++ trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/SDOPackage/Configuration_impl.java 2017-08-08 04:04:56 UTC (rev 992)
@@ -950,8 +950,11 @@
public final DeviceProfile getDeviceProfile() {
rtcout.println(Logbuf.TRACE, "Configuration_impl.getDeviceProfile()");
+System.out.println("Configuration_impl.getDeviceProfile()");
- return m_deviceProfile;
+ synchronized(m_deviceProfile){
+ return m_deviceProfile;
+ }
}
/**
More information about the openrtm-commit
mailing list