mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-30 13:12:25 -05:00
Basic code style cleanups suggested by IntelliJ
This commit is contained in:
parent
54c7d93f78
commit
5b1c5b2289
@ -541,14 +541,14 @@ public class Accounts extends K9ListActivity implements OnItemClickListener, OnC
|
|||||||
{
|
{
|
||||||
String appName = getString(R.string.app_name);
|
String appName = getString(R.string.app_name);
|
||||||
WebView wv = new WebView(this);
|
WebView wv = new WebView(this);
|
||||||
String html = "<h1>" + String.format(getString(R.string.about_title_fmt).toString(),
|
String html = "<h1>" + String.format(getString(R.string.about_title_fmt),
|
||||||
"<a href=\"" + getString(R.string.app_webpage_url) + "\">" + appName + "</a>") + "</h1>" +
|
"<a href=\"" + getString(R.string.app_webpage_url) + "\">" + appName + "</a>") + "</h1>" +
|
||||||
"<p>" + appName + " " +
|
"<p>" + appName + " " +
|
||||||
String.format(getString(R.string.debug_version_fmt).toString(),
|
String.format(getString(R.string.debug_version_fmt),
|
||||||
getVersionNumber()) + "</p>" +
|
getVersionNumber()) + "</p>" +
|
||||||
"<p>" + String.format(getString(R.string.app_authors_fmt).toString(),
|
"<p>" + String.format(getString(R.string.app_authors_fmt),
|
||||||
getString(R.string.app_authors)) + "</p>" +
|
getString(R.string.app_authors)) + "</p>" +
|
||||||
"<p>" + String.format(getString(R.string.app_revision_fmt).toString(),
|
"<p>" + String.format(getString(R.string.app_revision_fmt),
|
||||||
"<a href=\"" + getString(R.string.app_revision_url) + "\">" +
|
"<a href=\"" + getString(R.string.app_revision_url) + "\">" +
|
||||||
getString(R.string.app_revision_url) + "</a></p>");
|
getString(R.string.app_revision_url) + "</a></p>");
|
||||||
wv.loadData(html, "text/html", "utf-8");
|
wv.loadData(html, "text/html", "utf-8");
|
||||||
|
@ -1859,7 +1859,7 @@ public class MessageList
|
|||||||
{
|
{
|
||||||
if (mCurrentFolder.lastCheckFailed == false)
|
if (mCurrentFolder.lastCheckFailed == false)
|
||||||
{
|
{
|
||||||
holder.main.setText(String.format(getString(R.string.load_more_messages_fmt).toString(), mAccount.getDisplayCount()));
|
holder.main.setText(String.format(getString(R.string.load_more_messages_fmt), mAccount.getDisplayCount()));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -610,8 +610,8 @@ public class WebDavStore extends Store
|
|||||||
String password = this.mPassword;
|
String password = this.mPassword;
|
||||||
String[] urlParts = url.split("/");
|
String[] urlParts = url.split("/");
|
||||||
String finalUrl = "";
|
String finalUrl = "";
|
||||||
String loginUrl = new String();
|
String loginUrl = "";
|
||||||
String destinationUrl = new String();
|
String destinationUrl = "";
|
||||||
|
|
||||||
if (this.mAuthPath != null &&
|
if (this.mAuthPath != null &&
|
||||||
!this.mAuthPath.equals("") &&
|
!this.mAuthPath.equals("") &&
|
||||||
@ -673,7 +673,7 @@ public class WebDavStore extends Store
|
|||||||
if (istream != null)
|
if (istream != null)
|
||||||
{
|
{
|
||||||
BufferedReader reader = new BufferedReader(new InputStreamReader(istream), 4096);
|
BufferedReader reader = new BufferedReader(new InputStreamReader(istream), 4096);
|
||||||
String tempText = new String();
|
String tempText = "";
|
||||||
boolean matched = false;
|
boolean matched = false;
|
||||||
|
|
||||||
while ((tempText = reader.readLine()) != null &&
|
while ((tempText = reader.readLine()) != null &&
|
||||||
@ -1161,7 +1161,7 @@ public class WebDavStore extends Store
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
String encodedName = new String();
|
String encodedName = "";
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
String[] urlParts = name.split("/");
|
String[] urlParts = name.split("/");
|
||||||
@ -1249,7 +1249,7 @@ public class WebDavStore extends Store
|
|||||||
{
|
{
|
||||||
uids[i] = messages[i].getUid();
|
uids[i] = messages[i].getUid();
|
||||||
}
|
}
|
||||||
String messageBody = new String();
|
String messageBody = "";
|
||||||
HashMap<String, String> headers = new HashMap<String, String>();
|
HashMap<String, String> headers = new HashMap<String, String>();
|
||||||
HashMap<String, String> uidToUrl = getMessageUrls(uids);
|
HashMap<String, String> uidToUrl = getMessageUrls(uids);
|
||||||
String[] urls = new String[uids.length];
|
String[] urls = new String[uids.length];
|
||||||
@ -1286,11 +1286,11 @@ public class WebDavStore extends Store
|
|||||||
|
|
||||||
if (read)
|
if (read)
|
||||||
{
|
{
|
||||||
isRead = new String("True");
|
isRead = "True";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
isRead = new String("False");
|
isRead = "False";
|
||||||
}
|
}
|
||||||
|
|
||||||
messageBody = getMessageCountXml(isRead);
|
messageBody = getMessageCountXml(isRead);
|
||||||
@ -1619,8 +1619,8 @@ public class WebDavStore extends Store
|
|||||||
{
|
{
|
||||||
InputStream istream = null;
|
InputStream istream = null;
|
||||||
StringBuffer buffer = new StringBuffer();
|
StringBuffer buffer = new StringBuffer();
|
||||||
String tempText = new String();
|
String tempText = "";
|
||||||
String resultText = new String();
|
String resultText = "";
|
||||||
BufferedReader reader;
|
BufferedReader reader;
|
||||||
int currentLines = 0;
|
int currentLines = 0;
|
||||||
|
|
||||||
@ -1679,7 +1679,7 @@ public class WebDavStore extends Store
|
|||||||
HashMap<String, Boolean> uidToReadStatus = new HashMap<String, Boolean>();
|
HashMap<String, Boolean> uidToReadStatus = new HashMap<String, Boolean>();
|
||||||
HashMap<String, String> headers = new HashMap<String, String>();
|
HashMap<String, String> headers = new HashMap<String, String>();
|
||||||
DataSet dataset = new DataSet();
|
DataSet dataset = new DataSet();
|
||||||
String messageBody = new String();
|
String messageBody = "";
|
||||||
Message[] messages = new Message[20];
|
Message[] messages = new Message[20];
|
||||||
String[] uids;
|
String[] uids;
|
||||||
|
|
||||||
@ -1763,7 +1763,7 @@ public class WebDavStore extends Store
|
|||||||
HashMap<String, ParsedMessageEnvelope> envelopes = new HashMap<String, ParsedMessageEnvelope>();
|
HashMap<String, ParsedMessageEnvelope> envelopes = new HashMap<String, ParsedMessageEnvelope>();
|
||||||
HashMap<String, String> headers = new HashMap<String, String>();
|
HashMap<String, String> headers = new HashMap<String, String>();
|
||||||
DataSet dataset = new DataSet();
|
DataSet dataset = new DataSet();
|
||||||
String messageBody = new String();
|
String messageBody = "";
|
||||||
String[] uids;
|
String[] uids;
|
||||||
Message[] messages = new Message[10];
|
Message[] messages = new Message[10];
|
||||||
|
|
||||||
@ -1866,7 +1866,7 @@ public class WebDavStore extends Store
|
|||||||
|
|
||||||
private void markServerMessagesRead(String[] uids, boolean read) throws MessagingException
|
private void markServerMessagesRead(String[] uids, boolean read) throws MessagingException
|
||||||
{
|
{
|
||||||
String messageBody = new String();
|
String messageBody = "";
|
||||||
HashMap<String, String> headers = new HashMap<String, String>();
|
HashMap<String, String> headers = new HashMap<String, String>();
|
||||||
HashMap<String, String> uidToUrl = getMessageUrls(uids);
|
HashMap<String, String> uidToUrl = getMessageUrls(uids);
|
||||||
DataSet dataset = new DataSet();
|
DataSet dataset = new DataSet();
|
||||||
@ -2051,7 +2051,7 @@ public class WebDavStore extends Store
|
|||||||
*/
|
*/
|
||||||
class WebDavMessage extends MimeMessage
|
class WebDavMessage extends MimeMessage
|
||||||
{
|
{
|
||||||
private String mUrl = new String();
|
private String mUrl = "";
|
||||||
|
|
||||||
|
|
||||||
WebDavMessage(String uid, Folder folder) throws MessagingException
|
WebDavMessage(String uid, Folder folder) throws MessagingException
|
||||||
@ -2077,8 +2077,8 @@ public class WebDavStore extends Store
|
|||||||
int length = urlParts.length;
|
int length = urlParts.length;
|
||||||
String end = urlParts[length - 1];
|
String end = urlParts[length - 1];
|
||||||
|
|
||||||
this.mUrl = new String();
|
this.mUrl = "";
|
||||||
url = new String();
|
url = "";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* We have to decode, then encode the URL because Exchange likes to
|
* We have to decode, then encode the URL because Exchange likes to
|
||||||
@ -2146,7 +2146,7 @@ public class WebDavStore extends Store
|
|||||||
String headerValue = messageHeaders.get(headers[i]);
|
String headerValue = messageHeaders.get(headers[i]);
|
||||||
if (headers[i].equals("Content-Length"))
|
if (headers[i].equals("Content-Length"))
|
||||||
{
|
{
|
||||||
int size = new Integer(messageHeaders.get(headers[i])).intValue();
|
int size = Integer.parseInt(messageHeaders.get(headers[i]));
|
||||||
this.setSize(size);
|
this.setSize(size);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2258,7 +2258,7 @@ public class WebDavStore extends Store
|
|||||||
};
|
};
|
||||||
|
|
||||||
private boolean mReadStatus = false;
|
private boolean mReadStatus = false;
|
||||||
private String mUid = new String();
|
private String mUid = "";
|
||||||
private HashMap<String, String> mMessageHeaders = new HashMap<String, String>();
|
private HashMap<String, String> mMessageHeaders = new HashMap<String, String>();
|
||||||
private ArrayList<String> mHeaders = new ArrayList<String>();
|
private ArrayList<String> mHeaders = new ArrayList<String>();
|
||||||
|
|
||||||
@ -2316,7 +2316,7 @@ public class WebDavStore extends Store
|
|||||||
{
|
{
|
||||||
private HashMap<String, HashMap> mData = new HashMap<String, HashMap>();
|
private HashMap<String, HashMap> mData = new HashMap<String, HashMap>();
|
||||||
private HashMap<String, String> mLostData = new HashMap<String, String>();
|
private HashMap<String, String> mLostData = new HashMap<String, String>();
|
||||||
private String mUid = new String();
|
private String mUid = "";
|
||||||
private HashMap<String, String> mTempData = new HashMap<String, String>();
|
private HashMap<String, String> mTempData = new HashMap<String, String>();
|
||||||
|
|
||||||
public void addValue(String value, String tagName)
|
public void addValue(String value, String tagName)
|
||||||
@ -2352,7 +2352,7 @@ public class WebDavStore extends Store
|
|||||||
String visibleCount = mLostData.get("visiblecount");
|
String visibleCount = mLostData.get("visiblecount");
|
||||||
}
|
}
|
||||||
|
|
||||||
mUid = new String();
|
mUid = "";
|
||||||
mTempData = new HashMap<String, String>();
|
mTempData = new HashMap<String, String>();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2446,7 +2446,7 @@ public class WebDavStore extends Store
|
|||||||
if (count != null &&
|
if (count != null &&
|
||||||
!count.equals(""))
|
!count.equals(""))
|
||||||
{
|
{
|
||||||
messageCount = new Integer(count).intValue();
|
messageCount = Integer.parseInt(count);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -2552,7 +2552,7 @@ public class WebDavStore extends Store
|
|||||||
String[] urlParts = uri.split("/");
|
String[] urlParts = uri.split("/");
|
||||||
int length = urlParts.length;
|
int length = urlParts.length;
|
||||||
String end = urlParts[length - 1];
|
String end = urlParts[length - 1];
|
||||||
String url = new String();
|
String url = "";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* We have to decode, then encode the URL because Exchange likes to
|
* We have to decode, then encode the URL because Exchange likes to
|
||||||
|
Loading…
Reference in New Issue
Block a user