You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-commits@db.apache.org by kr...@apache.org on 2009/12/15 09:47:37 UTC
svn commit: r890692 -
/db/derby/code/trunk/java/engine/org/apache/derby/impl/io/JarStorageFactory.java
Author: kristwaa
Date: Tue Dec 15 08:47:36 2009
New Revision: 890692
URL: http://svn.apache.org/viewvc?rev=890692&view=rev
Log:
DERBY-4472: [patch] non short circuit op, could cause eof problems
Replaced non-short-circuiting bitwise operator with short-circuiting boolean
operator (the right side might throw exception if evaluated when the left
side is false).
Patch contributed by Dave Brosius (dbrosius at mebigfatguy dot com).
Patch file: sc.diff
Modified:
db/derby/code/trunk/java/engine/org/apache/derby/impl/io/JarStorageFactory.java
Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/io/JarStorageFactory.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/io/JarStorageFactory.java?rev=890692&r1=890691&r2=890692&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/io/JarStorageFactory.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/io/JarStorageFactory.java Tue Dec 15 08:47:36 2009
@@ -84,7 +84,7 @@
return;
// Parse the dataDirectory name. It should be of the form "(jar-file)directory" or "jar-file"
int offset = 0;
- while( offset < dataDirectory.length() & Character.isSpaceChar( dataDirectory.charAt( offset)))
+ while( offset < dataDirectory.length() && Character.isSpaceChar( dataDirectory.charAt( offset)))
offset ++;
int leftParen = -1;
int rightParen = -1;
@@ -99,7 +99,7 @@
{
jarFile = getJarFile( dataDirectory.substring( leftParen + 1, rightParen));
offset = rightParen + 1;
- while( offset < dataDirectory.length() & Character.isSpaceChar( dataDirectory.charAt( offset)))
+ while( offset < dataDirectory.length() && Character.isSpaceChar( dataDirectory.charAt( offset)))
offset ++;
dataDirectory = dataDirectory.substring( offset, dataDirectory.length());
}