svnno****@sourc*****
svnno****@sourc*****
2009年 10月 20日 (火) 19:50:23 JST
Revision: 3741 http://sourceforge.jp/projects/jiemamy/svn/view?view=rev&revision=3741 Author: daisuke_m Date: 2009-10-20 19:50:23 +0900 (Tue, 20 Oct 2009) Log Message: ----------- Collections.emptyList() を使用して、SuppressWarningsを除去。 Modified Paths: -------------- artemis/trunk/jiemamy-view/src/main/java/org/jiemamy/internal/model/node/StickyModelImpl.java hestia/trunk/org.jiemamy.eclipse.ui/src/main/java/org/jiemamy/eclipse/editor/editpart/diagram/AbstractJmNodeEditPart.java zeus/trunk/jiemamy-spec-core/src/main/java/org/jiemamy/dialect/BuiltinDataTypeMold.java zeus/trunk/jiemamy-test-helper/src/main/java/org/jiemamy/internal/test/mock/MockBuiltinDataType.java zeus/trunk/jiemamy-test-helper/src/main/java/org/jiemamy/internal/test/mock/MockBuiltinDataTypeMold.java zeus/trunk/jiemamy-test-helper/src/main/java/org/jiemamy/internal/test/mock/MockDialect.java zeus/trunk/jiemamy-test-helper/src/main/java/org/jiemamy/internal/test/mock/MockValidator.java Modified: artemis/trunk/jiemamy-view/src/main/java/org/jiemamy/internal/model/node/StickyModelImpl.java =================================================================== --- artemis/trunk/jiemamy-view/src/main/java/org/jiemamy/internal/model/node/StickyModelImpl.java 2009-10-15 02:01:46 UTC (rev 3740) +++ artemis/trunk/jiemamy-view/src/main/java/org/jiemamy/internal/model/node/StickyModelImpl.java 2009-10-20 10:50:23 UTC (rev 3741) @@ -18,11 +18,10 @@ */ package org.jiemamy.internal.model.node; +import java.util.Collections; import java.util.List; import java.util.UUID; -import org.apache.commons.collections15.ListUtils; - import org.jiemamy.Jiemamy; import org.jiemamy.internal.model.AbstractJiemamyElement; import org.jiemamy.model.connection.ConnectionAdapter; @@ -65,18 +64,14 @@ return contents; } - @SuppressWarnings("unchecked") - // 空のコレクションなので問題ない public List<ConnectionAdapter> getSourceConnections() { // 現状で、Stickyはコネクションを持たない - return ListUtils.EMPTY_LIST; + return Collections.emptyList(); } - @SuppressWarnings("unchecked") - // 空のコレクションなので問題ない public List<ConnectionAdapter> getTargetConnections() { // 現状で、Stickyはコネクションを持たない - return ListUtils.EMPTY_LIST; + return Collections.emptyList(); } public void setContents(String contents) { Modified: hestia/trunk/org.jiemamy.eclipse.ui/src/main/java/org/jiemamy/eclipse/editor/editpart/diagram/AbstractJmNodeEditPart.java =================================================================== --- hestia/trunk/org.jiemamy.eclipse.ui/src/main/java/org/jiemamy/eclipse/editor/editpart/diagram/AbstractJmNodeEditPart.java 2009-10-15 02:01:46 UTC (rev 3740) +++ hestia/trunk/org.jiemamy.eclipse.ui/src/main/java/org/jiemamy/eclipse/editor/editpart/diagram/AbstractJmNodeEditPart.java 2009-10-20 10:50:23 UTC (rev 3741) @@ -19,10 +19,10 @@ package org.jiemamy.eclipse.editor.editpart.diagram; import java.util.Collection; +import java.util.Collections; import java.util.List; import java.util.Map; -import org.apache.commons.collections15.ListUtils; import org.apache.commons.lang.Validate; import org.eclipse.draw2d.ChopboxAnchor; import org.eclipse.draw2d.ConnectionAnchor; @@ -176,10 +176,7 @@ @Override protected List<ConnectionAdapter> getModelSourceConnections() { if (getParent() == null) { - // 空リストであるため、型引数は無意味 - @SuppressWarnings("unchecked") - List<ConnectionAdapter> result = ListUtils.EMPTY_LIST; - return result; + return Collections.emptyList(); } RootModel rootModel = (RootModel) getRoot().getContents().getModel(); DiagramPresentations diagramPresentations = rootModel.getAdapter(DiagramPresentations.class); @@ -200,10 +197,7 @@ @Override protected List<ConnectionAdapter> getModelTargetConnections() { if (getParent() == null) { - // 空リストであるため、型引数は無意味 - @SuppressWarnings("unchecked") - List<ConnectionAdapter> result = ListUtils.EMPTY_LIST; - return result; + return Collections.emptyList(); } RootModel rootModel = (RootModel) getRoot().getContents().getModel(); DiagramPresentations diagramPresentations = rootModel.getAdapter(DiagramPresentations.class); Modified: zeus/trunk/jiemamy-spec-core/src/main/java/org/jiemamy/dialect/BuiltinDataTypeMold.java =================================================================== --- zeus/trunk/jiemamy-spec-core/src/main/java/org/jiemamy/dialect/BuiltinDataTypeMold.java 2009-10-15 02:01:46 UTC (rev 3740) +++ zeus/trunk/jiemamy-spec-core/src/main/java/org/jiemamy/dialect/BuiltinDataTypeMold.java 2009-10-20 10:50:23 UTC (rev 3741) @@ -37,10 +37,8 @@ /** 不明なモールド */ BuiltinDataTypeMold UNKNOWN = new BuiltinDataTypeMold() { - @SuppressWarnings("unchecked") - // 空のコレクションなので問題ない public Collection<String> getAliases() { - return Collections.EMPTY_LIST; + return Collections.emptyList(); } public DataTypeCategory getCategory() { Modified: zeus/trunk/jiemamy-test-helper/src/main/java/org/jiemamy/internal/test/mock/MockBuiltinDataType.java =================================================================== --- zeus/trunk/jiemamy-test-helper/src/main/java/org/jiemamy/internal/test/mock/MockBuiltinDataType.java 2009-10-15 02:01:46 UTC (rev 3740) +++ zeus/trunk/jiemamy-test-helper/src/main/java/org/jiemamy/internal/test/mock/MockBuiltinDataType.java 2009-10-20 10:50:23 UTC (rev 3741) @@ -18,10 +18,9 @@ */ package org.jiemamy.internal.test.mock; +import java.util.Collections; import java.util.List; -import org.apache.commons.collections15.ListUtils; - import org.jiemamy.ReferenceResolver; import org.jiemamy.model.datatype.BuiltinDataType; import org.jiemamy.model.datatype.DataTypeCategory; @@ -33,10 +32,8 @@ throw new AdapterNotFoundException(adapterClass); } - @SuppressWarnings("unchecked") - // 空のコレクションなので問題ない public List<Object> getAdapters() { - return ListUtils.EMPTY_LIST; + return Collections.emptyList(); } public DataTypeCategory getCategory() { Modified: zeus/trunk/jiemamy-test-helper/src/main/java/org/jiemamy/internal/test/mock/MockBuiltinDataTypeMold.java =================================================================== --- zeus/trunk/jiemamy-test-helper/src/main/java/org/jiemamy/internal/test/mock/MockBuiltinDataTypeMold.java 2009-10-15 02:01:46 UTC (rev 3740) +++ zeus/trunk/jiemamy-test-helper/src/main/java/org/jiemamy/internal/test/mock/MockBuiltinDataTypeMold.java 2009-10-20 10:50:23 UTC (rev 3741) @@ -20,9 +20,8 @@ import java.util.ArrayList; import java.util.Collection; +import java.util.Collections; -import org.apache.commons.collections15.CollectionUtils; - import org.jiemamy.dialect.BuiltinDataTypeMold; import org.jiemamy.model.datatype.DataTypeCategory; import org.jiemamy.model.datatype.adapter.PrecisionedDataTypeAdapter; @@ -37,10 +36,8 @@ */ public class MockBuiltinDataTypeMold implements BuiltinDataTypeMold { - @SuppressWarnings("unchecked") - // 空のコレクションなので問題ない public Collection<String> getAliases() { - return CollectionUtils.EMPTY_COLLECTION; + return Collections.emptyList(); } public DataTypeCategory getCategory() { Modified: zeus/trunk/jiemamy-test-helper/src/main/java/org/jiemamy/internal/test/mock/MockDialect.java =================================================================== --- zeus/trunk/jiemamy-test-helper/src/main/java/org/jiemamy/internal/test/mock/MockDialect.java 2009-10-15 02:01:46 UTC (rev 3740) +++ zeus/trunk/jiemamy-test-helper/src/main/java/org/jiemamy/internal/test/mock/MockDialect.java 2009-10-20 10:50:23 UTC (rev 3741) @@ -19,10 +19,10 @@ package org.jiemamy.internal.test.mock; import java.sql.DatabaseMetaData; +import java.util.Collections; import java.util.List; import java.util.Map; -import org.apache.commons.collections15.ListUtils; import org.apache.commons.lang.StringUtils; import org.jiemamy.Jiemamy; @@ -49,10 +49,8 @@ DataTypeResolver mgr = new MockDataTypeResolver(); - @SuppressWarnings("unchecked") - // 空のコレクションなので問題ない public List<SqlStatement> emitStatements(RootModel rootModel, EmitConfig config) { - return ListUtils.EMPTY_LIST; + return Collections.emptyList(); } public BuiltinDataTypeMold findDataTypeMold(BuiltinDataType dataType) { Modified: zeus/trunk/jiemamy-test-helper/src/main/java/org/jiemamy/internal/test/mock/MockValidator.java =================================================================== --- zeus/trunk/jiemamy-test-helper/src/main/java/org/jiemamy/internal/test/mock/MockValidator.java 2009-10-15 02:01:46 UTC (rev 3740) +++ zeus/trunk/jiemamy-test-helper/src/main/java/org/jiemamy/internal/test/mock/MockValidator.java 2009-10-20 10:50:23 UTC (rev 3741) @@ -19,9 +19,8 @@ package org.jiemamy.internal.test.mock; import java.util.Collection; +import java.util.Collections; -import org.apache.commons.collections15.CollectionUtils; - import org.jiemamy.model.RootModel; import org.jiemamy.validator.Problem; import org.jiemamy.validator.Validator; @@ -33,10 +32,8 @@ */ public class MockValidator implements Validator { - @SuppressWarnings("unchecked") - // 空のコレクションなので問題ない public Collection<Problem> validate(RootModel rootModel) { - return CollectionUtils.EMPTY_COLLECTION; + return Collections.emptyList(); } }