Commit 09dde899 authored by Christian Schudt's avatar Christian Schudt

Prefer String.contains() over String.indexOf() != -1

parent cce0b3d0
......@@ -60,7 +60,7 @@ public class ResourceServlet extends HttpServlet {
if (!disableCompression) {
if (request.getHeader("accept-encoding") != null &&
request.getHeader("accept-encoding").indexOf("gzip") != -1) {
request.getHeader("accept-encoding").contains("gzip")) {
compress = true;
}
else if (request.getHeader("---------------") != null) {
......
......@@ -312,7 +312,7 @@ public class BrowserLauncher {
}
}
else if (osName.startsWith("Windows")) {
if (osName.indexOf("9") != -1) {
if (osName.contains("9")) {
jvm = WINDOWS_9x;
}
else {
......
......@@ -105,7 +105,7 @@ public class NodeAffiliate {
// Alternate solution needed when XEP-0163 version > 1.0 is released.
//
// If the node ID looks like a JID, replace it with the published item's node ID.
if (getNode().getNodeID().indexOf("@") >= 0) {
if (getNode().getNodeID().contains("@")) {
items.addAttribute("node", publishedItem.getNodeID());
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment