mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-29 07:22:07 +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
|
@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) {
|
||||||
|
|
|
@ -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 {
|
||||||
|
|
|
@ -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);
|
||||||
|
|
|
@ -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);
|
||||||
|
|
Loading…
Reference in a new issue