Bug 1258789 - Add plus operator to WhitespaceAround and fix. r=grisha

MozReview-Commit-ID: 419NkkMHWCG

--HG--
extra : rebase_source : da4ccbacf82ac546cbcd79f0ad26a26f0305f230
This commit is contained in:
Michael Comella 2016-04-12 18:42:40 -07:00
parent 70af5a5d77
commit 3f8a975e44
14 changed files with 16 additions and 15 deletions

View File

@ -60,7 +60,8 @@
<property name="allowEmptyLoops" value="true"/>
<property name="tokens" value="ASSIGN, BAND, BAND_ASSIGN, BOR, BOR_ASSIGN, BSR, BSR_ASSIGN, BXOR, BXOR_ASSIGN,
LITERAL_CATCH, LITERAL_DO, LITERAL_ELSE, LITERAL_FINALLY, LITERAL_FOR, LITERAL_IF, LITERAL_RETURN, LITERAL_SWITCH, LITERAL_SYNCHRONIZED, LITERAL_TRY, LITERAL_WHILE,
LOR, LT, NOT_EQUAL, QUESTION, SL, SL_ASSIGN, SR, SR_ASSIGN, STAR, STAR_ASSIGN,"/>
LOR, LT, NOT_EQUAL, QUESTION, SL, SL_ASSIGN, SR, SR_ASSIGN, STAR, STAR_ASSIGN, LITERAL_ASSERT, TYPE_EXTENSION_AND,
PLUS, PLUS_ASSIGN"/>
</module>
</module>

View File

@ -319,7 +319,7 @@ public final class ANRReporter extends BroadcastReceiver
"\"OS\":" + JSONObject.quote(SysInfo.getName()) + "," +
"\"version\":\"" + String.valueOf(SysInfo.getVersion()) + "\"," +
"\"appID\":" + JSONObject.quote(AppConstants.MOZ_APP_ID) + "," +
"\"appVersion\":" + JSONObject.quote(AppConstants.MOZ_APP_VERSION)+ "," +
"\"appVersion\":" + JSONObject.quote(AppConstants.MOZ_APP_VERSION) + "," +
"\"appName\":" + JSONObject.quote(AppConstants.MOZ_APP_BASENAME) + "," +
"\"appBuildID\":" + JSONObject.quote(AppConstants.MOZ_APP_BUILDID) + "," +
"\"appUpdateChannel\":" + JSONObject.quote(AppConstants.MOZ_UPDATE_CHANNEL) + "," +

View File

@ -142,7 +142,7 @@ public class DownloadsIntegration implements NativeEventListener
if (TextUtils.isEmpty(mimeType)) {
final int extPosition = aFile.lastIndexOf(".");
if (extPosition > 0 && extPosition < aFile.length() - 1) {
mimeType = GeckoAppShell.getMimeTypeFromExtension(aFile.substring(extPosition+1));
mimeType = GeckoAppShell.getMimeTypeFromExtension(aFile.substring(extPosition + 1));
}
}

View File

@ -936,7 +936,7 @@ public abstract class GeckoApp
try {
if (isDataURI) {
int dataStart = aSrc.indexOf(",");
byte[] buf = Base64.decode(aSrc.substring(dataStart+1), Base64.DEFAULT);
byte[] buf = Base64.decode(aSrc.substring(dataStart + 1), Base64.DEFAULT);
image = BitmapUtils.decodeByteArray(buf);
} else {
int byteRead;

View File

@ -102,7 +102,7 @@ public class GeckoJavaSampler {
if (!mPauseSampler) {
StackTraceElement[] bt = sMainThread.getStackTrace();
mSamples.get(0)[mSamplePos] = new Sample(bt);
mSamplePos = (mSamplePos+1) % mSamples.get(0).length;
mSamplePos = (mSamplePos + 1) % mSamples.get(0).length;
}
if (mStopSampler) {
break;

View File

@ -917,7 +917,7 @@ public final class GeckoProfile {
try {
int sectionNumber = Integer.parseInt(section.getName().substring("Profile".length()));
String curSection = "Profile" + sectionNumber;
String nextSection = "Profile" + (sectionNumber+1);
String nextSection = "Profile" + (sectionNumber + 1);
sections.remove(curSection);
@ -926,7 +926,7 @@ public final class GeckoProfile {
sectionNumber++;
curSection = nextSection;
nextSection = "Profile" + (sectionNumber+1);
nextSection = "Profile" + (sectionNumber + 1);
}
} catch (NumberFormatException nex) {
// uhm, malformed Profile thing; we can't do much.

View File

@ -100,7 +100,7 @@ public abstract class SessionParser {
totalCount++;
boolean selected = false;
if (optSelected == i+1) {
if (optSelected == i + 1) {
selected = true;
selectedIndex = totalCount;
}

View File

@ -310,7 +310,7 @@ public class BrowserProvider extends SharedBrowserDatabaseProvider {
final String sql;
if (keepAfter > 0) {
sql = "DELETE FROM " + TABLE_HISTORY + " " +
"WHERE MAX(" + History.DATE_LAST_VISITED + ", " + History.DATE_MODIFIED +") < " + keepAfter + " " +
"WHERE MAX(" + History.DATE_LAST_VISITED + ", " + History.DATE_MODIFIED + ") < " + keepAfter + " " +
" AND " + History._ID + " IN ( SELECT " +
History._ID + " FROM " + TABLE_HISTORY + " " +
"ORDER BY " + sortOrder + " LIMIT " + toRemove +

View File

@ -84,7 +84,7 @@ public class IconDirectoryEntry implements Comparable<IconDirectoryEntry> {
// Extract the image dimensions.
int imageWidth = buffer[entryOffset] & 0xFF;
int imageHeight = buffer[entryOffset+1] & 0xFF;
int imageHeight = buffer[entryOffset + 1] & 0xFF;
// Because Microsoft, a size value of zero represents an image size of 256.
if (imageWidth == 0) {

View File

@ -495,7 +495,7 @@ class GeckoLayerClient implements LayerView.Listener, PanZoomTarget
!FloatUtils.fuzzyEquals(x + width, mProgressiveUpdateDisplayPort.getRight()) ||
!FloatUtils.fuzzyEquals(y + height, mProgressiveUpdateDisplayPort.getBottom())) {
mProgressiveUpdateDisplayPort =
new DisplayPortMetrics(x, y, x+width, y+height, resolution);
new DisplayPortMetrics(x, y, x + width, y + height, resolution);
}
}

View File

@ -990,7 +990,7 @@ public class BrowserSearch extends HomeFragment
// search term can occur if the user has previously searched for the same thing.
final int maxSavedSuggestions = NETWORK_SUGGESTION_MAX + 1 + getContext().getResources().getInteger(R.integer.max_saved_suggestions);
final String sortOrderAndLimit = BrowserContract.SearchHistory.DATE +" DESC LIMIT " + maxSavedSuggestions;
final String sortOrderAndLimit = BrowserContract.SearchHistory.DATE + " DESC LIMIT " + maxSavedSuggestions;
final Cursor result = cr.query(BrowserContract.SearchHistory.CONTENT_URI, columns, actualQuery, queryArgs, sortOrderAndLimit);
if (result == null) {

View File

@ -71,7 +71,7 @@ public final class GeckoLoader {
pluginSearchPath.append(pluginDirs[i]);
pluginSearchPath.append(":");
}
putenv("MOZ_PLUGIN_PATH="+pluginSearchPath);
putenv("MOZ_PLUGIN_PATH=" + pluginSearchPath);
File pluginDataDir = context.getDir("plugins", 0);
putenv("ANDROID_PLUGIN_DATADIR=" + pluginDataDir.getPath());

View File

@ -238,7 +238,7 @@ public final class GeckoJarReader {
if (url.startsWith("jar:")) {
int jarEnd = url.lastIndexOf("!");
String subStr = url.substring(4, jarEnd);
results.push(url.substring(jarEnd+2)); // remove the !/ characters
results.push(url.substring(jarEnd + 2)); // remove the !/ characters
return parseUrl(subStr, results);
} else {
results.push(url);

View File

@ -149,7 +149,7 @@ public class DateTimePicker extends FrameLayout {
mTempDate.set(Calendar.DAY_OF_MONTH, newVal);
} else if (picker == mMonthSpinner && mMonthEnabled){
mTempDate.set(Calendar.MONTH, newVal);
if (mTempDate.get(Calendar.MONTH) == newVal+1){
if (mTempDate.get(Calendar.MONTH) == newVal + 1){
mTempDate.set(Calendar.MONTH, newVal);
mTempDate.set(Calendar.DAY_OF_MONTH,
mTempDate.getActualMaximum(Calendar.DAY_OF_MONTH));