1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-25 21:42:07 +01:00

Cast with generic declared

This commit is contained in:
Florian Schmaus 2020-04-12 12:07:02 +02:00
parent 8c4513a618
commit e63ba07e5c
4 changed files with 4 additions and 4 deletions

View file

@ -91,7 +91,7 @@ public final class MoodManager extends Manager {
@Override
public void run() {
ItemsExtension items = (ItemsExtension) event.getExtensions().get(0);
PayloadItem<?> payload = (PayloadItem) items.getItems().get(0);
PayloadItem<?> payload = (PayloadItem<?>) items.getItems().get(0);
MoodElement mood = (MoodElement) payload.getPayload();
for (MoodListener listener : moodListeners) {

View file

@ -57,7 +57,7 @@ public class MoodProvider extends ExtensionElementProvider<MoodElement> {
if (!MoodElement.NAMESPACE.equals(namespace)) {
LOGGER.log(Level.FINE, "Foreign namespace " + namespace + " detected. Try to find suitable MoodConcretisationProvider.");
MoodConcretisationProvider<?> provider = (MoodConcretisationProvider) ProviderManager.getExtensionProvider(name, namespace);
MoodConcretisationProvider<?> provider = (MoodConcretisationProvider<?>) ProviderManager.getExtensionProvider(name, namespace);
if (provider != null) {
concretisation = provider.parse(parser);
} else {

View file

@ -512,7 +512,7 @@ public final class OpenPgpManager extends Manager {
@Override
public void run() {
ItemsExtension items = (ItemsExtension) event.getExtensions().get(0);
PayloadItem<?> payload = (PayloadItem) items.getItems().get(0);
PayloadItem<?> payload = (PayloadItem<?>) items.getItems().get(0);
PublicKeysListElement listElement = (PublicKeysListElement) payload.getPayload();
processPublicKeysListElement(from, listElement);

View file

@ -430,7 +430,7 @@ public class OpenPgpPubSubUtil {
// Get access to the PubSubManager's nodeMap
Field field = pubSubManager.getClass().getDeclaredField("nodeMap");
field.setAccessible(true);
Map<String, Node> nodeMap = (Map) field.get(pubSubManager);
Map<String, Node> nodeMap = (Map<String, Node>) field.get(pubSubManager);
// Check, if the node already exists
Node existingNode = nodeMap.get(nodeName);