1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91
|
Description: cast List<Object> to List<String>
Author: أحمد المحمودي (Ahmed El-Mahmoudy) <aelmahmoudy@sabily.org>
Bug-Debian: https://bugs.debian.org/722201
--- a/src/net/sf/zekr/common/config/ApplicationConfig.java
+++ b/src/net/sf/zekr/common/config/ApplicationConfig.java
@@ -253,9 +253,9 @@
searchInfo = new SearchInfo();
Configuration stopWordConf = searchProps.subset("search.stopword");
- List<String> defaultStopWord = searchProps.getList("search.stopword");
+ List<String> defaultStopWord = (List<String>)(List<?>) searchProps.getList("search.stopword");
Configuration replacePatternConf = searchProps.subset("search.pattern.replace");
- List<String> defaultReplacePattern = searchProps.getList("search.pattern.replace");
+ List<String> defaultReplacePattern = (List<String>)(List<?>) searchProps.getList("search.pattern.replace");
Configuration punctuationConf = searchProps.subset("search.pattern.punct");
String defaultPunctuation = searchProps.getString("search.pattern.punct");
Configuration diacriticsConf = searchProps.subset("search.pattern.diacr");
@@ -269,7 +269,7 @@
continue;
}
logger.debug("\tAdd stop words for: " + langCode);
- searchInfo.addStopWord(langCode, stopWordConf.getList(langCode));
+ searchInfo.addStopWord(langCode, (List<String>)(List<?>) stopWordConf.getList(langCode));
}
searchInfo.setDefaultReplacePattern(defaultReplacePattern);
@@ -279,7 +279,7 @@
continue;
}
logger.debug("\tAdd replace patterns for: " + langCode);
- searchInfo.addReplacePattern(langCode, replacePatternConf.getList(langCode));
+ searchInfo.addReplacePattern(langCode, (List<String>)(List<?>) replacePatternConf.getList(langCode));
}
if (defaultPunctuation != null) {
@@ -725,7 +725,7 @@
// load custom translation list
logger.info("Load custom translation list.");
List<TranslationData> customList = translation.getCustomGroup();
- List<String> customs = props.getList("trans.custom");
+ List<String> customs = (List<String>)(List<?>) props.getList("trans.custom");
for (int i = 0; i < customs.size(); i++) {
String tid = customs.get(i);
if (tid == null || "".equals(tid.trim())) {
@@ -891,7 +891,7 @@
@SuppressWarnings("unchecked")
private void extractAudioProps() {
String def = props.getString("audio.default");
- List<String> selectedList = props.getList("audio.default");
+ List<String> selectedList = (List<String>)(List<?>) props.getList("audio.default");
if (org.apache.commons.collections.CollectionUtils.isNotEmpty(selectedList) && selectedList.size() > 1) {
def = selectedList.get(0);
}
--- a/src/net/sf/zekr/ui/QuranForm.java
+++ b/src/net/sf/zekr/ui/QuranForm.java
@@ -590,7 +590,7 @@
if (isSashed) {
if (config.getProps().getProperty("view.quranForm.paneSashWeight") != null) {
- List<String> weights = config.getProps().getList("view.quranForm.paneSashWeight");
+ List<String> weights = (List<String>)(List<?>) config.getProps().getList("view.quranForm.paneSashWeight");
navSashForm.setWeights(new int[] { Integer.parseInt(weights.get(0).toString()),
Integer.parseInt(weights.get(1).toString()) });
} else {
@@ -1971,7 +1971,7 @@
sashForm.setWeights(new int[] { 1, 1 });
}
if (viewLayout == 0) { // Application just started up
- List<String> weights = config.getProps().getList("view.quranForm.layoutSashWeight");
+ List<String> weights = (List<String>)(List<?>) config.getProps().getList("view.quranForm.layoutSashWeight");
if (weights.size() != 0) {
sashForm.setWeights(new int[] { Integer.parseInt(weights.get(0).toString()),
Integer.parseInt(weights.get(1).toString()) });
@@ -2182,7 +2182,7 @@
Set<SearchScope> searchScopeSet = new LinkedHashSet<SearchScope>();
while (keys.hasNext()) {
String key = keys.next();
- SearchScope ss = SearchScope.parse(config.getProps().getList(key));
+ SearchScope ss = SearchScope.parse((List<String>)(List<?>) config.getProps().getList(key));
if (ss != null) {
searchScopeSet.add(ss);
}
@@ -2191,7 +2191,7 @@
String v = config.getProps().getString("view.search.scope", null);
if (StringUtils.isNotEmpty(v)) {
- List<String> scope = config.getProps().getList("view.search.scope");
+ List<String> scope = (List<String>)(List<?>) config.getProps().getList("view.search.scope");
if (CollectionUtils.isNotEmpty(scope)) {
setSearchScope(SearchScope.parse(scope));
}
|