You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 26, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Feb 26, 2023. It is now read-only.
The problem is that I assumed that always it should have a "value" field, and this is not true. This is the code:
privateMap<String, String> extractMetaDataQualifiedNames(NodeListmetaDataNodes) {
Map<String, String> metaDataQualifiedNames = newHashMap<String, String>();
for (inti = 0; i < metaDataNodes.getLength(); i++) {
Nodenode = metaDataNodes.item(i);
NodenameAttribute = node.getAttributes().getNamedItem("android:name");
NodevalueAttribute = node.getAttributes().getNamedItem("android:value");
if (nameAttribute == null || valueAttribute == null) {
if (nameAttribute != null) {
LOGGER.warn("A malformed <meta-data> has been found in the manifest with name {}", nameAttribute.getNodeValue());
} else {
LOGGER.warn("A malformed <meta-data> has been found in the manifest");
}
} else {
metaDataQualifiedNames.put(nameAttribute.getNodeValue(), valueAttribute.getNodeValue());
}
}
returnmetaDataQualifiedNames;
}
I will try to make it generic.. Now following the correct syntax for the meta-data tag:
The method should be able to recollect not only the Value, but also the resource... But all these methods return a Map<String, String>.... so key-value...
Maybe it would be good to save a Map<String, MetaDataInfo> with MetaData info containing both Value and Resource.
Hi @dodgex , @WonderCsabo about this functionality, I would like to know if for you is ok to implemente it like I suggested, I was the one that implemente it only taking in Account the value (well to be honest, didn't need the resource in that specific moment).. but to make it more generic, and avoid this error that you are reporting, then a Structure should be used in the Map, I just would like to agree with you about if it is the correct way, and please if you could suggest me where to place this Structure (the class I called MetaDataInfo above).
Activity
dodgex commentedon Jan 4, 2017
also: the warning is ... bad :D a malformed WHAT has been found? :D
WonderCsabo commentedon Jan 4, 2017
It is okay, we print the name of the meta-data element (which is this weird thing in this case).
dodgex commentedon Jan 4, 2017
yeah but still i think the warning should contain the element type in some way.
WonderCsabo commentedon Jan 4, 2017
Oh, the message is correct, just Github removed
<meta-data>. :)This is the full message
dodgex commentedon Jan 4, 2017
Oh. Okay. :)
smaugho commentedon Jan 7, 2017
The problem is that I assumed that always it should have a "value" field, and this is not true. This is the code:
I will try to make it generic.. Now following the correct syntax for the meta-data tag:
The method should be able to recollect not only the Value, but also the resource... But all these methods return a Map<String, String>.... so key-value...
Maybe it would be good to save a Map<String, MetaDataInfo> with MetaData info containing both Value and Resource.
Any suggestion?
smaugho commentedon Jan 11, 2017
Hi @dodgex , @WonderCsabo about this functionality, I would like to know if for you is ok to implemente it like I suggested, I was the one that implemente it only taking in Account the value (well to be honest, didn't need the resource in that specific moment).. but to make it more generic, and avoid this error that you are reporting, then a Structure should be used in the Map, I just would like to agree with you about if it is the correct way, and please if you could suggest me where to place this Structure (the class I called MetaDataInfo above).
WonderCsabo commentedon Jan 13, 2017
@dodgex i think
MetadataInfois okay. Normally we should only break API in major version, but i think we can do it in this case in a minor version.dodgex commentedon Jan 13, 2017
@WonderCsabo Yeah. I think you are right.
@smaugho feel free to contribute a fix :)
dodgex commentedon Feb 20, 2017
implemented