avoid warnings on incomplete enum switch (recently enabled)
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/MessageSend.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/MessageSend.java
index 25d7364..ccc9923 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/MessageSend.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/MessageSend.java
@@ -346,6 +346,8 @@
mapType = this.actualReceiverType.findSuperTypeOriginatingFrom(TypeIds.T_JavaUtilMap, false);
if (mapType != null && mapType.isParameterizedType())
return new TypeBinding[] { ((ParameterizedTypeBinding)mapType).typeArguments()[1], mapType };
+ break;
+ default: // no other suspects are detected in java.util.Map
}
}
}
@@ -358,6 +360,8 @@
ReferenceBinding collectionType = this.actualReceiverType.findSuperTypeOriginatingFrom(TypeIds.T_JavaUtilCollection, false);
if (collectionType != null && collectionType.isParameterizedType())
return new TypeBinding[] { ((ParameterizedTypeBinding)collectionType).typeArguments()[0], collectionType };
+ break;
+ default: // no other suspects with Object-parameter are detected in java.util.Collection
}
} else if (paramTypeId == TypeIds.T_JavaUtilCollection) {
switch (suspect) {
@@ -368,6 +372,8 @@
ReferenceBinding collectionType = this.actualReceiverType.findSuperTypeOriginatingFrom(TypeIds.T_JavaUtilCollection, false);
if (collectionType != null)
return new TypeBinding[] { collectionType, collectionType };
+ break;
+ default: // no other suspects with Collection-parameter are detected in java.util.Collection
}
}
if (this.actualReceiverType.hasTypeBit(TypeIds.BitList)) {
@@ -379,6 +385,8 @@
ReferenceBinding listType = this.actualReceiverType.findSuperTypeOriginatingFrom(TypeIds.T_JavaUtilList, false);
if (listType != null && listType.isParameterizedType())
return new TypeBinding[] { ((ParameterizedTypeBinding)listType).typeArguments()[0], listType };
+ break;
+ default: // no other suspects are detected in java.util.List
}
}
}
diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/core/util/ExternalAnnotationUtil.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/core/util/ExternalAnnotationUtil.java
index f294b3e..a24a91a 100644
--- a/org.eclipse.jdt.core/model/org/eclipse/jdt/core/util/ExternalAnnotationUtil.java
+++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/core/util/ExternalAnnotationUtil.java
@@ -514,6 +514,9 @@
buf.append(oldAnn); // keep
}
}
+ break;
+ default:
+ throw new IllegalArgumentException("Unexpected merge strategy"); // REPLACE_SIGNATURE does not reach this point, see initial check in updateType() //$NON-NLS-1$
}
}