db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From krist...@apache.org
Subject svn commit: r1042048 - in /db/derby/code/trunk/java/engine/org/apache/derby: iapi/sql/dictionary/SPSDescriptor.java impl/sql/catalog/SYSSTATEMENTSRowFactory.java
Date Fri, 03 Dec 2010 23:14:32 GMT
Author: kristwaa
Date: Fri Dec  3 23:14:32 2010
New Revision: 1042048

URL: http://svn.apache.org/viewvc?rev=1042048&view=rev
Log:
DERBY-4918: Minor refactoring of SPSDescriptor

Removed method setUUID, made uuid final.

Patch file: derby-4918-2b-remove-setUUID.diff

Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/SPSDescriptor.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSSTATEMENTSRowFactory.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/SPSDescriptor.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/SPSDescriptor.java?rev=1042048&r1=1042047&r2=1042048&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/SPSDescriptor.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/SPSDescriptor.java
Fri Dec  3 23:14:32 2010
@@ -124,8 +124,8 @@ public class SPSDescriptor extends Tuple
     private final char type;
     private final String text;
     private final String usingText;
+    private final UUID uuid;
 
-	private UUID					uuid;
 	private	boolean					valid;
 	private	ExecPreparedStatement	preparedStatement;
 	private	DataTypeDescriptor		params[];
@@ -208,6 +208,10 @@ public class SPSDescriptor extends Tuple
 	{
 		super( dataDictionary );
 
+        // Added this check when setUUID was removed, see DERBY-4918.
+        if (uuid == null) {
+            throw new IllegalArgumentException("UUID is null");
+        }
 		this.name = name;
 		this.uuid = uuid; 
 		this.type = type;
@@ -536,22 +540,12 @@ public class SPSDescriptor extends Tuple
 		return usingText;
 	}
 
-	/**
-	 * Sets the UUID of the SPS.
-	 *
-	 * @param uuid	The UUID of the SPS to be set in the descriptor
-	 */
-	public final synchronized void setUUID(UUID uuid)
-	{
-		this.uuid = uuid;
-	}
-
-	/**
-	 * Gets the UUID of the SPS.
-	 *
-	 * @return	the uuid
-	 */
-    public final synchronized UUID getUUID() {
+    /**
+     * Gets the UUID of the SPS.
+     *
+     * @return The UUID.
+     */
+    public final UUID getUUID() {
 		return uuid;
 	}
 	

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSSTATEMENTSRowFactory.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSSTATEMENTSRowFactory.java?rev=1042048&r1=1042047&r2=1042048&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSSTATEMENTSRowFactory.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSSTATEMENTSRowFactory.java
Fri Dec  3 23:14:32 2010
@@ -176,11 +176,6 @@ public class SYSSTATEMENTSRowFactory ext
 		{
 			name = spsDescriptor.getName();
 			uuid = spsDescriptor.getUUID();
-			if ( uuid == null )
-		    {
-				uuid = getUUIDFactory().createUUID();
-				spsDescriptor.setUUID(uuid);
-			}
 			suuidStr = spsDescriptor.getSchemaDescriptor().getUUID().toString();
 			uuidStr = uuid.toString();
 			text = spsDescriptor.getText();			



Mime
View raw message