Revision: 9475
http://languagetool.svn.sourceforge.net/languagetool/?rev=9475&view=rev
Author: dnaber
Date: 2013-02-23 21:23:29 +0000 (Sat, 23 Feb 2013)
Log Message:
-----------
small whitespace and indent cleanup only
Modified Paths:
--------------
trunk/languagetool/languagetool-core/src/main/java/org/languagetool/rules/GenericUnpairedBracketsRule.java
Modified:
trunk/languagetool/languagetool-core/src/main/java/org/languagetool/rules/GenericUnpairedBracketsRule.java
===================================================================
---
trunk/languagetool/languagetool-core/src/main/java/org/languagetool/rules/GenericUnpairedBracketsRule.java
2013-02-23 20:52:06 UTC (rev 9474)
+++
trunk/languagetool/languagetool-core/src/main/java/org/languagetool/rules/GenericUnpairedBracketsRule.java
2013-02-23 21:23:29 UTC (rev 9475)
@@ -134,29 +134,28 @@
if (startSymbols[j].equals(endSymbols[j])) {
precededByWhitespace = tokens[i - 1].isSentStart()
|| tokens[i].isWhitespaceBefore()
- || PUNCTUATION_NO_DOT.matcher(tokens[i - 1].getToken())
- .matches();
+ || PUNCTUATION_NO_DOT.matcher(tokens[i -
1].getToken()).matches();
}
boolean followedByWhitespace = true;
if (i < tokens.length - 1 && startSymbols[j].equals(endSymbols[j])) {
followedByWhitespace = tokens[i + 1].isWhitespaceBefore()
|| PUNCTUATION.matcher(tokens[i + 1].getToken()).matches();
- }
+ }
final boolean noException = isNoException(token, tokens, i, j,
- precededByWhitespace, followedByWhitespace);
+ precededByWhitespace, followedByWhitespace);
if (noException && precededByWhitespace
- && token.equals(startSymbols[j])) {
+ && token.equals(startSymbols[j])) {
symbolStack.push(new SymbolLocator(startSymbols[j], i));
break;
} else if (noException && followedByWhitespace
- && token.equals(endSymbols[j])) {
- if (i > 1 && endSymbols[j].equals(")")
- && (numerals.matcher(tokens[i - 1].getToken()).matches()
- && !(!symbolStack.empty()
- && "(".equals(symbolStack.peek().symbol)))) {
+ && token.equals(endSymbols[j])) {
+ if (i > 1 && endSymbols[j].equals(")")
+ && (numerals.matcher(tokens[i - 1].getToken()).matches()
+ && !(!symbolStack.empty()
+ && "(".equals(symbolStack.peek().symbol)))) {
} else {
if (symbolStack.empty()) {
symbolStack.push(new SymbolLocator(endSymbols[j], i));
@@ -171,8 +170,8 @@
break;
} else {
if (j == endSymbols.length - 1) {
- symbolStack.push(new SymbolLocator(endSymbols[j], i));
- break;
+ symbolStack.push(new SymbolLocator(endSymbols[j], i));
+ break;
}
}
}
@@ -183,8 +182,7 @@
}
}
for (final SymbolLocator sLoc : symbolStack) {
- final RuleMatch rMatch = createMatch(tokens[sLoc.index].getStartPos(),
- sLoc.symbol);
+ final RuleMatch rMatch = createMatch(tokens[sLoc.index].getStartPos(),
sLoc.symbol);
if (rMatch != null) {
ruleMatches.add(rMatch);
}
@@ -222,8 +220,7 @@
}
ruleMatchStack.push(new RuleMatchLocator(symbol, ruleMatchIndex,
ruleMatches.size()));
ruleMatchIndex++;
- return new RuleMatch(this, startPos, startPos + symbol.length(), messages
- .getString("unpaired_brackets"));
+ return new RuleMatch(this, startPos, startPos + symbol.length(),
messages.getString("unpaired_brackets"));
}
private int findSymbolNum(final String ch) {
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
Languagetool-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/languagetool-commits