mirror of
https://github.com/geometer/FBReaderJ.git
synced 2025-10-03 17:59:33 +02:00
formatting
Conflicts: src/org/geometerplus/fbreader/network/opds/OPDSFeedHandler.java
This commit is contained in:
parent
cf76b17a70
commit
30f1d65b89
7 changed files with 24 additions and 24 deletions
|
@ -135,7 +135,7 @@ public class OPDSCustomNetworkLink extends OPDSNetworkLink implements ICustomNet
|
|||
|
||||
if (!opensearchDescriptionURLs.isEmpty()) {
|
||||
LinkedList<ZLNetworkRequest> requests = new LinkedList<ZLNetworkRequest>();
|
||||
for (String url: opensearchDescriptionURLs) {
|
||||
for (String url : opensearchDescriptionURLs) {
|
||||
requests.add(new ZLNetworkRequest(url, quietly) {
|
||||
@Override
|
||||
public void handleStream(InputStream inputStream, int length) throws IOException, ZLNetworkException {
|
||||
|
|
|
@ -167,7 +167,7 @@ class OPDSFeedHandler extends AbstractOPDSFeedHandler implements OPDSConstants {
|
|||
|
||||
final OPDSNetworkLink opdsLink = (OPDSNetworkLink)myData.Link;
|
||||
boolean hasBookLink = false;
|
||||
for (ATOMLink link: entry.Links) {
|
||||
for (ATOMLink link : entry.Links) {
|
||||
final MimeType mime = MimeType.get(link.getType());
|
||||
final String rel = opdsLink.relation(link.getRel(), mime);
|
||||
if (rel == null
|
||||
|
|
|
@ -160,7 +160,7 @@ public abstract class OPDSNetworkLink extends AbstractNetworkLink {
|
|||
public String rewriteUrl(String url, boolean isUrlExternal) {
|
||||
final int apply = isUrlExternal
|
||||
? URLRewritingRule.APPLY_EXTERNAL : URLRewritingRule.APPLY_INTERNAL;
|
||||
for (URLRewritingRule rule: myUrlRewritingRules) {
|
||||
for (URLRewritingRule rule : myUrlRewritingRules) {
|
||||
if ((rule.whereToApply() & apply) != 0) {
|
||||
url = rule.apply(url);
|
||||
}
|
||||
|
|
|
@ -90,7 +90,7 @@ public class OPDSXMLReader extends ATOMXMLReader<OPDSFeedMetadata,OPDSEntry> {
|
|||
myState = OPENSEARCH_STARTINDEX;
|
||||
}
|
||||
return false;
|
||||
} else if (ns == XMLNamespaces.FBReaderCatalogMetadata){
|
||||
} else if (ns == XMLNamespaces.FBReaderCatalogMetadata) {
|
||||
if (tag == FBREADER_TAG_VIEW) {
|
||||
myState = FBREADER_VIEW;
|
||||
}
|
||||
|
@ -123,7 +123,7 @@ public class OPDSXMLReader extends ATOMXMLReader<OPDSFeedMetadata,OPDSEntry> {
|
|||
myPriceCurrency = attributes.getValue("currencycode");
|
||||
myState = FEL_PRICE;
|
||||
return false;
|
||||
} if (ns == XMLNamespaces.DublinCoreTerms && tag == DC_TAG_FORMAT) {
|
||||
} else if (ns == XMLNamespaces.DublinCoreTerms && tag == DC_TAG_FORMAT) {
|
||||
myState = FEL_FORMAT;
|
||||
return false;
|
||||
} else {
|
||||
|
|
|
@ -410,7 +410,7 @@ public class ZLNetworkManager {
|
|||
}
|
||||
HashSet<String> errors = new HashSet<String>();
|
||||
// TODO: implement concurrent execution !!!
|
||||
for (ZLNetworkRequest r: requests) {
|
||||
for (ZLNetworkRequest r : requests) {
|
||||
try {
|
||||
perform(r);
|
||||
} catch (ZLNetworkException e) {
|
||||
|
|
|
@ -52,7 +52,7 @@ public abstract class MiscUtil {
|
|||
|| !map1.keySet().containsAll(map2.keySet())) {
|
||||
return false;
|
||||
}
|
||||
for (KeyT key: map1.keySet()) {
|
||||
for (KeyT key : map1.keySet()) {
|
||||
final ValueT value1 = map1.get(key);
|
||||
final ValueT value2 = map2.get(key);
|
||||
if (!equals(value1, value2)) {
|
||||
|
|
|
@ -436,27 +436,27 @@ mainSwitchLabel:
|
|||
case WS_AFTER_START_TAG_NAME:
|
||||
switch (buffer[++i]) {
|
||||
case '>':
|
||||
{
|
||||
String stringTagName = convertToString(strings, tagName);
|
||||
if (tagStackSize == tagStack.length) {
|
||||
tagStack = ZLArrayUtils.createCopy(tagStack, tagStackSize, tagStackSize << 1);
|
||||
}
|
||||
tagStack[tagStackSize++] = stringTagName;
|
||||
if (processNamespaces) {
|
||||
if (currentNamespaceMap != null) {
|
||||
oldNamespaceMap = currentNamespaceMap;
|
||||
}
|
||||
namespaceMapStack.add(currentNamespaceMap);
|
||||
}
|
||||
if (processStartTag(xmlReader, stringTagName, attributes, currentNamespaceMap)) {
|
||||
streamReader.close();
|
||||
return;
|
||||
}
|
||||
currentNamespaceMap = null;
|
||||
{
|
||||
String stringTagName = convertToString(strings, tagName);
|
||||
if (tagStackSize == tagStack.length) {
|
||||
tagStack = ZLArrayUtils.createCopy(tagStack, tagStackSize, tagStackSize << 1);
|
||||
}
|
||||
tagStack[tagStackSize++] = stringTagName;
|
||||
if (processNamespaces) {
|
||||
if (currentNamespaceMap != null) {
|
||||
oldNamespaceMap = currentNamespaceMap;
|
||||
}
|
||||
namespaceMapStack.add(currentNamespaceMap);
|
||||
}
|
||||
if (processStartTag(xmlReader, stringTagName, attributes, currentNamespaceMap)) {
|
||||
streamReader.close();
|
||||
return;
|
||||
}
|
||||
currentNamespaceMap = null;
|
||||
state = TEXT;
|
||||
startPosition = i + 1;
|
||||
break;
|
||||
}
|
||||
case '/':
|
||||
state = SLASH;
|
||||
if (processFullTag(xmlReader, convertToString(strings, tagName), attributes)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue