1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-11-22 14:22:05 +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 @Override
public void run() { public void run() {
ItemsExtension items = (ItemsExtension) event.getExtensions().get(0); 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(); MoodElement mood = (MoodElement) payload.getPayload();
for (MoodListener listener : moodListeners) { for (MoodListener listener : moodListeners) {

View file

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

View file

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

View file

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