forked from Qortal/qortal
Replaced string.equals() with string.isEmpty()
This commit is contained in:
parent
d58fbab1b5
commit
806dc6d056
@ -82,7 +82,7 @@ public class HTMLParser {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isHtmlFile(String path) {
|
public static boolean isHtmlFile(String path) {
|
||||||
if (path.endsWith(".html") || path.endsWith(".htm") || path.equals("")) {
|
if (path.endsWith(".html") || path.endsWith(".htm") || path.isEmpty()) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
@ -80,7 +80,7 @@ public class GatewayResource {
|
|||||||
|
|
||||||
private HttpServletResponse parsePath(String inPath, String qdnContext, String secret58, boolean includeResourceIdInPrefix, boolean async) {
|
private HttpServletResponse parsePath(String inPath, String qdnContext, String secret58, boolean includeResourceIdInPrefix, boolean async) {
|
||||||
|
|
||||||
if (inPath == null || inPath.equals("")) {
|
if (inPath == null || inPath.isEmpty()) {
|
||||||
// Assume not a real file
|
// Assume not a real file
|
||||||
return ArbitraryDataRenderer.getResponse(response, 404, "Error 404: File Not Found");
|
return ArbitraryDataRenderer.getResponse(response, 404, "Error 404: File Not Found");
|
||||||
}
|
}
|
||||||
|
@ -491,7 +491,7 @@ public class ArbitraryResource {
|
|||||||
|
|
||||||
List<ArbitraryTransactionData> transactionDataList;
|
List<ArbitraryTransactionData> transactionDataList;
|
||||||
|
|
||||||
if (query == null || query.equals("")) {
|
if (query == null || query.isEmpty()) {
|
||||||
transactionDataList = ArbitraryDataStorageManager.getInstance().listAllHostedTransactions(repository, limit, offset);
|
transactionDataList = ArbitraryDataStorageManager.getInstance().listAllHostedTransactions(repository, limit, offset);
|
||||||
} else {
|
} else {
|
||||||
transactionDataList = ArbitraryDataStorageManager.getInstance().searchHostedTransactions(repository,query, limit, offset);
|
transactionDataList = ArbitraryDataStorageManager.getInstance().searchHostedTransactions(repository,query, limit, offset);
|
||||||
|
@ -73,7 +73,7 @@ public class ArbitraryDataReader {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// If identifier is a blank string, or reserved keyword "default", treat it as null
|
// If identifier is a blank string, or reserved keyword "default", treat it as null
|
||||||
if (identifier == null || identifier.equals("") || identifier.equals("default")) {
|
if (identifier == null || identifier.isEmpty() || identifier.equals("default")) {
|
||||||
identifier = null;
|
identifier = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -199,7 +199,7 @@ public class ArbitraryDataRenderer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private String getFilename(String directory, String userPath) {
|
private String getFilename(String directory, String userPath) {
|
||||||
if (userPath == null || userPath.endsWith("/") || userPath.equals("")) {
|
if (userPath == null || userPath.endsWith("/") || userPath.isEmpty()) {
|
||||||
// Locate index file
|
// Locate index file
|
||||||
List<String> indexFiles = ArbitraryDataRenderer.indexFiles();
|
List<String> indexFiles = ArbitraryDataRenderer.indexFiles();
|
||||||
for (String indexFile : indexFiles) {
|
for (String indexFile : indexFiles) {
|
||||||
|
@ -52,7 +52,7 @@ public class ArbitraryDataResource {
|
|||||||
this.service = service;
|
this.service = service;
|
||||||
|
|
||||||
// If identifier is a blank string, or reserved keyword "default", treat it as null
|
// If identifier is a blank string, or reserved keyword "default", treat it as null
|
||||||
if (identifier == null || identifier.equals("") || identifier.equals("default")) {
|
if (identifier == null || identifier.isEmpty() || identifier.equals("default")) {
|
||||||
identifier = null;
|
identifier = null;
|
||||||
}
|
}
|
||||||
this.identifier = identifier;
|
this.identifier = identifier;
|
||||||
|
@ -81,7 +81,7 @@ public class ArbitraryDataTransactionBuilder {
|
|||||||
this.service = service;
|
this.service = service;
|
||||||
|
|
||||||
// If identifier is a blank string, or reserved keyword "default", treat it as null
|
// If identifier is a blank string, or reserved keyword "default", treat it as null
|
||||||
if (identifier == null || identifier.equals("") || identifier.equals("default")) {
|
if (identifier == null || identifier.isEmpty() || identifier.equals("default")) {
|
||||||
identifier = null;
|
identifier = null;
|
||||||
}
|
}
|
||||||
this.identifier = identifier;
|
this.identifier = identifier;
|
||||||
|
@ -78,7 +78,7 @@ public class ArbitraryDataWriter {
|
|||||||
this.compression = compression;
|
this.compression = compression;
|
||||||
|
|
||||||
// If identifier is a blank string, or reserved keyword "default", treat it as null
|
// If identifier is a blank string, or reserved keyword "default", treat it as null
|
||||||
if (identifier == null || identifier.equals("") || identifier.equals("default")) {
|
if (identifier == null || identifier.isEmpty() || identifier.equals("default")) {
|
||||||
identifier = null;
|
identifier = null;
|
||||||
}
|
}
|
||||||
this.identifier = identifier;
|
this.identifier = identifier;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user