summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkthoms2009-08-07 03:32:38 (EDT)
committerkthoms2009-08-07 03:32:38 (EDT)
commitaf3307443a7e302cf8ce084fb7b422a6cb194f9d (patch)
tree783c69f7d94c48b979ed890ddc569f046dec2df0
parent70c5930995c5cdf38cd7c9853d97a23f5880861d (diff)
downloadorg.eclipse.mwe-af3307443a7e302cf8ce084fb7b422a6cb194f9d.zip
org.eclipse.mwe-af3307443a7e302cf8ce084fb7b422a6cb194f9d.tar.gz
org.eclipse.mwe-af3307443a7e302cf8ce084fb7b422a6cb194f9d.tar.bz2
reduced compiler warningsGalileo_SR2
-rw-r--r--plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/core/container/CompositeComponent.java2
-rw-r--r--plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/core/container/ConditionEvaluationException.java1
-rw-r--r--plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/core/customizer/CustomizationException.java1
-rw-r--r--plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/ast/util/VisitorBase.java14
-rw-r--r--plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/ast/util/WorkflowContainer.java2
-rw-r--r--plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/debug/communication/Connection.java5
-rw-r--r--plugins/org.eclipse.emf.mwe.utils/src/org/eclipse/emf/mwe/utils/Reader.java3
-rw-r--r--plugins/org.eclipse.emf.mwe.utils/src/org/eclipse/emf/mwe/utils/StandaloneSetup.java4
-rw-r--r--plugins/org.eclipse.emf.mwe.utils/src/org/eclipse/emf/mwe/utils/Writer.java3
-rw-r--r--tests/org.eclipse.emf.mwe.tests/src/org/eclipse/emf/mwe/tests/ast/util/VisitorInitializerTest.java1
-rw-r--r--tests/org.eclipse.emf.mwe.tests/src/org/eclipse/emf/mwe/tests/util/WriterTest.java1
11 files changed, 20 insertions, 17 deletions
diff --git a/plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/core/container/CompositeComponent.java b/plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/core/container/CompositeComponent.java
index b303980..bf26200 100644
--- a/plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/core/container/CompositeComponent.java
+++ b/plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/core/container/CompositeComponent.java
@@ -321,7 +321,7 @@ public class CompositeComponent implements WorkflowComponentWithID {
* @param comp
* the component
*/
- public void put(@SuppressWarnings("unused") final String name, final WorkflowComponent comp) {
+ public void put(final String name, final WorkflowComponent comp) {
addComponent(comp);
}
diff --git a/plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/core/container/ConditionEvaluationException.java b/plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/core/container/ConditionEvaluationException.java
index 403e224..695f540 100644
--- a/plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/core/container/ConditionEvaluationException.java
+++ b/plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/core/container/ConditionEvaluationException.java
@@ -11,6 +11,7 @@
package org.eclipse.emf.mwe.core.container;
public class ConditionEvaluationException extends RuntimeException {
+ private static final long serialVersionUID = 1L;
public ConditionEvaluationException() {
super();
diff --git a/plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/core/customizer/CustomizationException.java b/plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/core/customizer/CustomizationException.java
index 37d8ca3..dc1b531 100644
--- a/plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/core/customizer/CustomizationException.java
+++ b/plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/core/customizer/CustomizationException.java
@@ -11,6 +11,7 @@
package org.eclipse.emf.mwe.core.customizer;
public class CustomizationException extends RuntimeException {
+ private static final long serialVersionUID = 1L;
public CustomizationException() {
super();
diff --git a/plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/ast/util/VisitorBase.java b/plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/ast/util/VisitorBase.java
index 2676417..c788727 100644
--- a/plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/ast/util/VisitorBase.java
+++ b/plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/ast/util/VisitorBase.java
@@ -51,31 +51,31 @@ public abstract class VisitorBase {
return result;
}
- public Object visitAbstractASTBase(@SuppressWarnings("unused") final AbstractASTBase ele) {
+ public Object visitAbstractASTBase(final AbstractASTBase ele) {
return null;
}
- public Object visitComponentAST(@SuppressWarnings("unused") final ComponentAST ele) {
+ public Object visitComponentAST(final ComponentAST ele) {
return null;
}
- public Object visitInclusionAST(@SuppressWarnings("unused") final InclusionAST ele) {
+ public Object visitInclusionAST(final InclusionAST ele) {
return null;
}
- public Object visitDeclaredPropertyAST(@SuppressWarnings("unused") final DeclaredPropertyAST ele) {
+ public Object visitDeclaredPropertyAST(final DeclaredPropertyAST ele) {
return null;
}
- public Object visitDeclaredPropertyFileAST(@SuppressWarnings("unused") final DeclaredPropertyFileAST ele) {
+ public Object visitDeclaredPropertyFileAST(final DeclaredPropertyFileAST ele) {
return null;
}
- public Object visitReferenceAST(@SuppressWarnings("unused") final ReferenceAST ele) {
+ public Object visitReferenceAST(final ReferenceAST ele) {
return null;
}
- public Object visitSimpleParamAST(@SuppressWarnings("unused") final SimpleParamAST ele) {
+ public Object visitSimpleParamAST(final SimpleParamAST ele) {
return null;
}
diff --git a/plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/ast/util/WorkflowContainer.java b/plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/ast/util/WorkflowContainer.java
index 9b969d1..359a57b 100644
--- a/plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/ast/util/WorkflowContainer.java
+++ b/plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/ast/util/WorkflowContainer.java
@@ -19,7 +19,7 @@ public class WorkflowContainer {
root = workflow;
}
- public void put(@SuppressWarnings("unused") final String name, final Object value) {
+ public void put(final String name, final Object value) {
root = value;
}
diff --git a/plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/debug/communication/Connection.java b/plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/debug/communication/Connection.java
index c284320..538c61d 100644
--- a/plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/debug/communication/Connection.java
+++ b/plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/debug/communication/Connection.java
@@ -145,6 +145,7 @@ public class Connection {
}
+ @SuppressWarnings("unchecked")
private AbstractPackage instantiatePackage(final String className) throws IOException {
Class<? extends AbstractPackage> packetClass = null;
AbstractPackage packet = null;
@@ -156,8 +157,8 @@ public class Connection {
}
if (msg == null) {
- Constructor c = packetClass.getConstructors()[0];
- Class[] parmTypes = c.getParameterTypes();
+ Constructor<?> c = packetClass.getConstructors()[0];
+ Class<?>[] parmTypes = c.getParameterTypes();
Object[] initargs = new Object[parmTypes.length];
for (int i = 0; i < parmTypes.length; i++) {
if (parmTypes[i] == int.class) {
diff --git a/plugins/org.eclipse.emf.mwe.utils/src/org/eclipse/emf/mwe/utils/Reader.java b/plugins/org.eclipse.emf.mwe.utils/src/org/eclipse/emf/mwe/utils/Reader.java
index 6c76ac7..8d00b4a 100644
--- a/plugins/org.eclipse.emf.mwe.utils/src/org/eclipse/emf/mwe/utils/Reader.java
+++ b/plugins/org.eclipse.emf.mwe.utils/src/org/eclipse/emf/mwe/utils/Reader.java
@@ -15,6 +15,7 @@ import java.util.Collections;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.resource.ResourceSet;
@@ -61,7 +62,7 @@ public class Reader extends AbstractEMFWorkflowComponent {
catch (final IOException e) {
throw new WorkflowInterruptedException("Couldn't find resource under " + uri + " : " + e.getMessage());
}
- final EList result = res.getContents();
+ final EList<EObject> result = res.getContents();
if (firstElementOnly) {
if (result.isEmpty())
return null;
diff --git a/plugins/org.eclipse.emf.mwe.utils/src/org/eclipse/emf/mwe/utils/StandaloneSetup.java b/plugins/org.eclipse.emf.mwe.utils/src/org/eclipse/emf/mwe/utils/StandaloneSetup.java
index b19def8..ee3f6ab 100644
--- a/plugins/org.eclipse.emf.mwe.utils/src/org/eclipse/emf/mwe/utils/StandaloneSetup.java
+++ b/plugins/org.eclipse.emf.mwe.utils/src/org/eclipse/emf/mwe/utils/StandaloneSetup.java
@@ -57,7 +57,6 @@ public class StandaloneSetup {
*
* @param pathToPlatform
*/
- @SuppressWarnings("unchecked")
public void setPlatformUri(String pathToPlatform) {
File f = new File(pathToPlatform);
if (!f.exists())
@@ -100,7 +99,6 @@ public class StandaloneSetup {
*
* @param uriMap
*/
- @SuppressWarnings("unchecked")
public void addUriMap(final Mapping uriMap) {
log.info("Adding URI mapping from '" + uriMap.getFrom() + "' to '" + uriMap.getTo() + "'");
final URI baseUri = URI.createURI(uriMap.getFrom());
@@ -157,7 +155,7 @@ public class StandaloneSetup {
}
public void addRegisterGeneratedEPackage(String interfacename) {
- Class clazz = ResourceLoaderFactory.createResourceLoader().loadClass(interfacename);
+ Class<?> clazz = ResourceLoaderFactory.createResourceLoader().loadClass(interfacename);
if (clazz == null)
throw new ConfigurationException("Couldn't find an interface " + interfacename);
try {
diff --git a/plugins/org.eclipse.emf.mwe.utils/src/org/eclipse/emf/mwe/utils/Writer.java b/plugins/org.eclipse.emf.mwe.utils/src/org/eclipse/emf/mwe/utils/Writer.java
index 7eebadc..1b18191 100644
--- a/plugins/org.eclipse.emf.mwe.utils/src/org/eclipse/emf/mwe/utils/Writer.java
+++ b/plugins/org.eclipse.emf.mwe.utils/src/org/eclipse/emf/mwe/utils/Writer.java
@@ -57,6 +57,7 @@ public class Writer extends AbstractEMFWorkflowComponent {
OPTION_SCHEMA_LOCATION_IMPLEMENTATION = option_schema_location_implementation;
}
+ @SuppressWarnings("unchecked")
@Override
public void invokeInternal(final WorkflowContext ctx, final ProgressMonitor monitor, final Issues issues) {
Object slotContent = ctx.get(getModelSlot());
@@ -106,7 +107,7 @@ public class Writer extends AbstractEMFWorkflowComponent {
}
else {
if (slotContent instanceof Collection<?>) {
- final Collection coll = (Collection) slotContent;
+ final Collection<?> coll = (Collection<?>) slotContent;
final Collection<Resource> resources = new ArrayList<Resource>();
for (final Object object : coll) {
final EObject eo = (EObject) object;
diff --git a/tests/org.eclipse.emf.mwe.tests/src/org/eclipse/emf/mwe/tests/ast/util/VisitorInitializerTest.java b/tests/org.eclipse.emf.mwe.tests/src/org/eclipse/emf/mwe/tests/ast/util/VisitorInitializerTest.java
index 7dc7b1e..579901b 100644
--- a/tests/org.eclipse.emf.mwe.tests/src/org/eclipse/emf/mwe/tests/ast/util/VisitorInitializerTest.java
+++ b/tests/org.eclipse.emf.mwe.tests/src/org/eclipse/emf/mwe/tests/ast/util/VisitorInitializerTest.java
@@ -24,6 +24,7 @@ import org.eclipse.emf.mwe.internal.core.ast.util.VisitorInitializer;
/**
* @author Peter Friese - Initial contribution and API
*/
+@SuppressWarnings("unchecked")
public class VisitorInitializerTest extends TestCase {
private static String invokePrivateMethod(Class targetClass, Object targetInstance, String methodName, Class[] argClasses, Object[] argObjects)
diff --git a/tests/org.eclipse.emf.mwe.tests/src/org/eclipse/emf/mwe/tests/util/WriterTest.java b/tests/org.eclipse.emf.mwe.tests/src/org/eclipse/emf/mwe/tests/util/WriterTest.java
index 964647b..3ee4950 100644
--- a/tests/org.eclipse.emf.mwe.tests/src/org/eclipse/emf/mwe/tests/util/WriterTest.java
+++ b/tests/org.eclipse.emf.mwe.tests/src/org/eclipse/emf/mwe/tests/util/WriterTest.java
@@ -24,7 +24,6 @@ public class WriterTest extends TestCase {
- @SuppressWarnings("unchecked")
public void testLoadSimpleModel() throws Exception {
ResourceSet rs = new ResourceSetImpl();
Writer writer = new Writer();