mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-22 06:12:05 +01:00
Cast with generic declared
This commit is contained in:
parent
8c4513a618
commit
e63ba07e5c
4 changed files with 4 additions and 4 deletions
|
@ -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) {
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue