[openrtm-commit:02693] r969 - trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC
openrtm @ openrtm.org
openrtm @ openrtm.org
2017年 7月 18日 (火) 17:37:12 JST
Author: t-katami
Date: 2017-07-18 17:37:12 +0900 (Tue, 18 Jul 2017)
New Revision: 969
Modified:
trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/InPortConsumerFactory.java
trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/InPortProviderFactory.java
trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/OutPortConsumerFactory.java
trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/OutPortProviderFactory.java
Log:
[compat,bugfix,->RELENG_1_2] Fixed bugs.
Modified: trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/InPortConsumerFactory.java
===================================================================
--- trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/InPortConsumerFactory.java 2017-07-18 07:23:19 UTC (rev 968)
+++ trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/InPortConsumerFactory.java 2017-07-18 08:37:12 UTC (rev 969)
@@ -25,16 +25,12 @@
* {@.en InPortConsumerFactory object}
*
*/
- public static InPortConsumerFactory instance() {
+ synchronized public static InPortConsumerFactory instance() {
if (factory_global == null) {
- synchronized (factory_global_mutex) {
- if (factory_global == null) {
- try {
- factory_global = new InPortConsumerFactory();
- } catch (Exception e) {
- factory_global = null;
- }
- }
+ try {
+ factory_global = new InPortConsumerFactory();
+ } catch (Exception e) {
+ factory_global = null;
}
}
@@ -41,10 +37,6 @@
return factory_global;
}
/**
- * <p> mutex </p>
- */
- private static String factory_global_mutex = new String();
- /**
* <p> object </p>
*/
private static InPortConsumerFactory factory_global;
Modified: trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/InPortProviderFactory.java
===================================================================
--- trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/InPortProviderFactory.java 2017-07-18 07:23:19 UTC (rev 968)
+++ trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/InPortProviderFactory.java 2017-07-18 08:37:12 UTC (rev 969)
@@ -28,26 +28,18 @@
* {@.en InPortProviderFactory object}
*
*/
- //public static InPortProviderFactory instance() {
synchronized public static InPortProviderFactory instance() {
- //synchronized (factory_global_mutex) {
- if (factory_global == null) {
- try {
- factory_global = new InPortProviderFactory();
- } catch (Exception e) {
- factory_global = null;
- }
+ if (factory_global == null) {
+ try {
+ factory_global = new InPortProviderFactory();
+ } catch (Exception e) {
+ factory_global = null;
}
- //}
+ }
return factory_global;
}
/**
- * <p> mutex </p>
- */
- //private static String factory_global_mutex = new String();
- private static final Object factory_global_mutex = new Object();
- /**
* <p> object </p>
*/
private static InPortProviderFactory factory_global;
Modified: trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/OutPortConsumerFactory.java
===================================================================
--- trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/OutPortConsumerFactory.java 2017-07-18 07:23:19 UTC (rev 968)
+++ trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/OutPortConsumerFactory.java 2017-07-18 08:37:12 UTC (rev 969)
@@ -25,16 +25,12 @@
* {@.en OutPortConsumerFactory object}
*
*/
- public static OutPortConsumerFactory instance() {
+ synchronized public static OutPortConsumerFactory instance() {
if (factory_global == null) {
- synchronized (factory_global_mutex) {
- if (factory_global == null) {
- try {
- factory_global = new OutPortConsumerFactory();
- } catch (Exception e) {
- factory_global = null;
- }
- }
+ try {
+ factory_global = new OutPortConsumerFactory();
+ } catch (Exception e) {
+ factory_global = null;
}
}
@@ -41,10 +37,6 @@
return factory_global;
}
/**
- * <p> mutex </p>
- */
- private static String factory_global_mutex = new String();
- /**
* <p> object </p>
*/
private static OutPortConsumerFactory factory_global;
Modified: trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/OutPortProviderFactory.java
===================================================================
--- trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/OutPortProviderFactory.java 2017-07-18 07:23:19 UTC (rev 968)
+++ trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/OutPortProviderFactory.java 2017-07-18 08:37:12 UTC (rev 969)
@@ -25,14 +25,12 @@
* {@.en OutPortProviderFactory object}
*
*/
- public static OutPortProviderFactory instance() {
- synchronized (factory_global_mutex) {
- if (factory_global == null) {
- try {
- factory_global = new OutPortProviderFactory();
- } catch (Exception e) {
- factory_global = null;
- }
+ synchronized public static OutPortProviderFactory instance() {
+ if (factory_global == null) {
+ try {
+ factory_global = new OutPortProviderFactory();
+ } catch (Exception e) {
+ factory_global = null;
}
}
@@ -39,11 +37,6 @@
return factory_global;
}
/**
- * {@.ja 排他制御用変数}
- * {@.en Variable for exclusive control}
- */
- private static String factory_global_mutex = new String();
- /**
* <p> object </p>
*/
private static OutPortProviderFactory factory_global;
More information about the openrtm-commit
mailing list