Author: vgritsenko
Date: Mon Mar 12 19:22:33 2007
New Revision: 517498
URL: http://svn.apache.org/viewvc?view=rev&rev=517498
Log:
nits
Modified:
jakarta/regexp/trunk/src/java/org/apache/regexp/RE.java
Modified: jakarta/regexp/trunk/src/java/org/apache/regexp/RE.java
URL:
http://svn.apache.org/viewvc/jakarta/regexp/trunk/src/java/org/apache/regexp/RE.java?view=diff&rev=517498&r1=517497&r2=517498
==============================================================================
--- jakarta/regexp/trunk/src/java/org/apache/regexp/RE.java (original)
+++ jakarta/regexp/trunk/src/java/org/apache/regexp/RE.java Mon Mar 12 19:22:33
2007
@@ -436,8 +436,7 @@
*/
public RE(String pattern, int matchFlags) throws RESyntaxException
{
- this(new RECompiler().compile(pattern));
- setMatchFlags(matchFlags);
+ this(new RECompiler().compile(pattern), matchFlags);
}
/**
@@ -777,7 +776,7 @@
/**
* Performs lazy allocation of subexpression arrays
*/
- private final void allocParens()
+ private void allocParens()
{
// Allocate arrays for subexpressions
startn = new int[maxParen];
@@ -904,7 +903,7 @@
case OP_OPEN_CLUSTER:
case OP_CLOSE_CLUSTER:
// starting or ending the matching of a subexpression
which has no backref.
- return matchNodes( next, maxNode, idx );
+ return matchNodes(next, maxNode, idx);
case OP_BACKREF:
{
@@ -1661,7 +1660,7 @@
char c = substitution.charAt(lCurrentPosition + 1);
if (c >= '0' && c <= '9')
{
- if (bAddedPrefix == false)
+ if (!bAddedPrefix)
{
// Append everything between the beginning of
the
// substitution string and the current $ sign
@@ -1764,13 +1763,8 @@
{
char nextChar = search.charAt(i);
- if (nextChar == '\n' || nextChar == '\r' || nextChar == '\u0085'
- || nextChar == '\u2028' || nextChar == '\u2029')
- {
- return true;
- }
-
- return false;
+ return nextChar == '\n' || nextChar == '\r' || nextChar == '\u0085' ||
+ nextChar == '\u2028' || nextChar == '\u2029';
}
/**
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]