db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject svn commit: r659195 - /db/derby/code/trunk/java/engine/org/apache/derby/iapi/util/IdUtil.java
Date Thu, 22 May 2008 18:34:07 GMT
Author: dag
Date: Thu May 22 11:34:06 2008
New Revision: 659195

URL: http://svn.apache.org/viewvc?rev=659195&view=rev
Log:
DERBY-3673 Add checks that a new role isn't already a user authorization id

Patch derby-3673-4. Removes some redundant code.

Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/util/IdUtil.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/util/IdUtil.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/util/IdUtil.java?rev=659195&r1=659194&r2=659195&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/util/IdUtil.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/util/IdUtil.java Thu May 22 11:34:06
2008
@@ -266,17 +266,7 @@
 		if (!needsQuote) {
 			result = authid.toLowerCase();
 		} else {
-			StringBuffer b = new StringBuffer();
-			b.append("\"");
-			for (int i=0; i < authid.length(); i++) {
-				char c = authid.charAt(i);
-				if (c == '"') {
-					b.append('"'); // " must be escaped as two quotes ("")
-				}
-				b.append(c);
-			}
-			b.append("\"");
-			result = b.toString();
+			result = normalToDelimited(authid);
 		}
 
 		return result;



Mime
View raw message