[openrtm-commit:02729] r994 - in trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples: SeqIO/view SimpleIO
openrtm @ openrtm.org
openrtm @ openrtm.org
2017年 8月 8日 (火) 14:57:15 JST
Author: t-katami
Date: 2017-08-08 14:57:15 +0900 (Tue, 08 Aug 2017)
New Revision: 994
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/SimpleIO/get_actual_ec.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 05:05:16 UTC (rev 993)
+++ trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/SeqIO/view/SeqViewApp.java 2017-08-08 05:57:15 UTC (rev 994)
@@ -95,30 +95,46 @@
if (_shortValMarked) {
_view.setShortVal(_shortVal);
}
- if (_longValMarked) {
- _view.setLongVal(_longVal);
+ synchronized (_longValMarked_mutex) {
+ if (_longValMarked) {
+ _view.setLongVal(_longVal);
+ }
}
- if (_floatValMarked) {
- _view.setFloatVal(_floatVal);
+ synchronized (_floatValMarked_mutex) {
+ if (_floatValMarked) {
+ _view.setFloatVal(_floatVal);
+ }
}
- if (_doubleValMarked) {
- _view.setDoubleVal(_doubleVal);
+ synchronized (_doubleValMarked_mutex) {
+ if (_doubleValMarked) {
+ _view.setDoubleVal(_doubleVal);
+ }
}
- if (_octetSeqVal != null) {
- _view.setOctetSeqVal(_octetSeqVal);
+ synchronized (_octetSeqVal_mutex) {
+ if (_octetSeqVal != null) {
+ _view.setOctetSeqVal(_octetSeqVal);
+ }
}
- if (_shortSeqVal != null) {
- _view.setShortSeqVal(_shortSeqVal);
+ synchronized (_shortSeqVal_mutex) {
+ if (_shortSeqVal != null) {
+ _view.setShortSeqVal(_shortSeqVal);
+ }
}
- if (_longSeqVal != null) {
- _view.setLongSeqVal(_longSeqVal);
+ synchronized (_longSeqVal_mutex) {
+ if (_longSeqVal != null) {
+ _view.setLongSeqVal(_longSeqVal);
+ }
}
- if (_floatSeqVal != null) {
- _view.setFloatSeqVal(_floatSeqVal);
+ synchronized (_floatSeqVal_mutex) {
+ if (_floatSeqVal != null) {
+ _view.setFloatSeqVal(_floatSeqVal);
+ }
}
- if (_doubleSeqVal != null) {
- _view.setDoubleSeqVal(_doubleSeqVal);
+ synchronized (_doubleSeqVal_mutex) {
+ if (_doubleSeqVal != null) {
+ _view.setDoubleSeqVal(_doubleSeqVal);
+ }
}
reset();
@@ -127,7 +143,9 @@
synchronized public void setOctetVal(byte value) {
- _octetValMarked = true;
+ synchronized (_octetValMarked_mutex) {
+ _octetValMarked = true;
+ }
_octetVal = value;
registInvoker();
}
@@ -134,7 +152,9 @@
synchronized public void setShortVal(short value) {
- _shortValMarked = true;
+ synchronized (_shortValMarked_mutex) {
+ _shortValMarked = true;
+ }
_shortVal = value;
registInvoker();
}
@@ -141,7 +161,9 @@
synchronized public void setLongVal(int value) {
- _longValMarked = true;
+ synchronized (_longValMarked_mutex) {
+ _longValMarked = true;
+ }
_longVal = value;
registInvoker();
}
@@ -148,7 +170,9 @@
synchronized public void setFloatVal(float value) {
- _floatValMarked = true;
+ synchronized (_floatValMarked_mutex) {
+ _floatValMarked = true;
+ }
_floatVal = value;
registInvoker();
}
@@ -155,7 +179,9 @@
synchronized public void setDoubleVal(double value) {
- _doubleValMarked = true;
+ synchronized (_doubleValMarked_mutex) {
+ _doubleValMarked = true;
+ }
_doubleVal = value;
registInvoker();
}
@@ -162,31 +188,41 @@
synchronized public void setOctetSeqVal(byte[] values) {
- _octetSeqVal = values;
+ synchronized (_octetSeqVal_mutex) {
+ _octetSeqVal = values;
+ }
registInvoker();
}
synchronized public void setShortSeqVal(short[] values) {
- _shortSeqVal = values;
+ synchronized (_shortSeqVal_mutex) {
+ _shortSeqVal = values;
+ }
registInvoker();
}
synchronized public void setLongSeqVal(int[] values) {
- _longSeqVal = values;
+ synchronized (_longSeqVal_mutex) {
+ _longSeqVal = values;
+ }
registInvoker();
}
synchronized public void setFloatSeqVal(float[] values) {
- _floatSeqVal = values;
+ synchronized (_floatSeqVal_mutex) {
+ _floatSeqVal = values;
+ }
registInvoker();
}
synchronized public void setDoubleSeqVal(double[] values) {
- _doubleSeqVal = values;
+ synchronized (_doubleSeqVal_mutex) {
+ _doubleSeqVal = values;
+ }
registInvoker();
}
Modified: trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/SimpleIO/get_actual_ec.java
===================================================================
--- trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/SimpleIO/get_actual_ec.java 2017-08-08 05:05:16 UTC (rev 993)
+++ trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/SimpleIO/get_actual_ec.java 2017-08-08 05:57:15 UTC (rev 994)
@@ -122,6 +122,10 @@
System.out.println("Failed to create CorbaConsumer.");
return;
}
+ if( naming == null ){
+ System.out.println("CorbaNaming is null.");
+ return;
+ }
try {
conout.setObject(naming.resolve(".host_cxt/ConsoleOut0.rtc"));
} catch (NotFound e) {
More information about the openrtm-commit
mailing list