[openrtm-commit:01201] r510 - branches/work_ForRTMSafety/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/util
openrtm @ openrtm.org
openrtm @ openrtm.org
2014年 1月 30日 (木) 09:56:26 JST
Author: win-ei
Date: 2014-01-30 09:56:22 +0900 (Thu, 30 Jan 2014)
New Revision: 510
Modified:
branches/work_ForRTMSafety/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/util/RtsProfileHandler.java
Log:
Coped with it for JDK7.The definition of a method with a different return value with the same erasure and signature becomes an error from JDK7.
Modified: branches/work_ForRTMSafety/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/util/RtsProfileHandler.java
===================================================================
--- branches/work_ForRTMSafety/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/util/RtsProfileHandler.java 2014-01-29 16:49:46 UTC (rev 509)
+++ branches/work_ForRTMSafety/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/util/RtsProfileHandler.java 2014-01-30 00:56:22 UTC (rev 510)
@@ -689,7 +689,7 @@
DataportExt port = factory.createDataportExt();
port.setName(ePort.getNameL());
if (original != null) {
- Dataport originalPort = findOriginalPort(original.getDataPorts(), port.getName());
+ Dataport originalPort = findOriginalDataPort(original.getDataPorts(), port.getName());
if (originalPort instanceof DataportExt) {
DataportExt source = (DataportExt) originalPort;
port.setComment(source.getComment());
@@ -713,7 +713,7 @@
ServiceportExt port = factory.createServiceportExt();
port.setName(ePort.getNameL());
if (original != null) {
- Serviceport originalPort = findOriginalPort(original.getServicePorts(), port.getName());
+ Serviceport originalPort = findOriginalServicePort(original.getServicePorts(), port.getName());
if (originalPort instanceof ServiceportExt) {
ServiceportExt source = (ServiceportExt) originalPort;
port.setComment(source.getComment());
@@ -1296,6 +1296,21 @@
}
/** OpenしたRTSプロファイルに存在したDataport要素を探し出す */
+ private Dataport findOriginalDataPort(List<Dataport> ports, String name)
+ {
+ for (Dataport port : ports) {
+ if (port.getName().equals(name)) {
+ return port;
+ }
+ }
+ return null;
+ }
+ /*
+ The definition of a method with a different return value
+ with the same erasure and signature becomes an error from JDK7.
+ For the reason, Coped with it.
+ */
+ /*
private Dataport findOriginalPort(List<Dataport> ports, String name) {
for (Dataport port : ports) {
if (port.getName().equals(name)) {
@@ -1304,8 +1319,24 @@
}
return null;
}
+ */
/** OpenしたRTSプロファイルに存在したServiceport要素を探し出す */
+ private Serviceport findOriginalServicePort(List<Serviceport> ports, String name)
+ {
+ for (Serviceport port : ports) {
+ if (port.getName().equals(name)) {
+ return port;
+ }
+ }
+ return null;
+ }
+ /*
+ The definition of a method with a different return value
+ with the same erasure and signature becomes an error from JDK7.
+ For the reason, Coped with it.
+ */
+ /*
private Serviceport findOriginalPort(List<Serviceport> ports, String name) {
for (Serviceport port : ports) {
if (port.getName().equals(name)) {
@@ -1314,6 +1345,7 @@
}
return null;
}
+ */
/** OpenしたRTSプロファイルに存在したComponent要素を探し出す */
private Component findOriginalComponent(
More information about the openrtm-commit
mailing list