directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r608667 - in /directory/studio/trunk: studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/ studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/ studio-connection-ui/src/main/...
Date Thu, 03 Jan 2008 22:58:05 GMT
Author: seelmann
Date: Thu Jan  3 14:58:01 2008
New Revision: 608667

URL: http://svn.apache.org/viewvc?rev=608667&view=rev
Log:
Fix for DIRSTUDIO-252 (Advanced value editors don't work in NewEntryWizard)

Modified:
    directory/studio/trunk/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/Connection.java
    directory/studio/trunk/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/ConnectionParameter.java
    directory/studio/trunk/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/JNDIConnectionWrapper.java
    directory/studio/trunk/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/NetworkParameterPage.java
    directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/AbstractAttributeModificationJob.java
    directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/AbstractEclipseJob.java
    directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/CreateValuesJob.java
    directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/DeleteAttributesValueJob.java
    directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ModifyValueJob.java
    directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/NewEntryTypeWizardPage.java
    directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/NewEntryWizard.java
    directory/studio/trunk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/dialogs/LdifEntryEditorDialog.java

Modified: directory/studio/trunk/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/Connection.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/Connection.java?rev=608667&r1=608666&r2=608667&view=diff
==============================================================================
--- directory/studio/trunk/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/Connection.java
(original)
+++ directory/studio/trunk/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/Connection.java
Thu Jan  3 14:58:01 2008
@@ -172,7 +172,6 @@
 
     private JNDIConnectionWrapper jndiConnectionWrapper;
 
-
     /**
      * Creates a new instance of Connection.
      *
@@ -190,7 +189,8 @@
     public Object clone()
     {
         ConnectionParameter cp = new ConnectionParameter( getName(), getHost(), getPort(),
getEncryptionMethod(),
-            getAuthMethod(), getBindPrincipal(), getBindPassword(), getSaslRealm(), getConnectionParameter().getExtendedProperties()
);
+            getAuthMethod(), getBindPrincipal(), getBindPassword(), getSaslRealm(), isReadOnly(),
+            getConnectionParameter().getExtendedProperties() );
 
         Connection clone = new Connection( cp );
 
@@ -334,6 +334,18 @@
     	return connectionParameter.getSaslRealm();
     }
 
+
+    /**
+     * Checks if this connection is read only.
+     * 
+     * @return true, if this connection is read only
+     */
+    public boolean isReadOnly()
+    {
+        return connectionParameter.isReadOnly();
+    }
+    
+    
     /**
      * Sets the auth method.
      * 
@@ -416,20 +428,32 @@
         connectionParameter.setPort( port );
         ConnectionEventRegistry.fireConnectionUpdated( this, this );
     }
-    
-    
+
+
     /**
      * Sets the SASL realm.
      * 
      * @param realm the new SASL realm
      */
-    public void setSaslRealm (String realm)
+    public void setSaslRealm( String realm )
     {
-    	connectionParameter.setSaslRealm(realm);
-    	ConnectionEventRegistry.fireConnectionUpdated(this, this);
+        connectionParameter.setSaslRealm( realm );
+        ConnectionEventRegistry.fireConnectionUpdated( this, this );
     }
-    
-    
+
+
+    /**
+     * Sets the read only flag.
+     * 
+     * @param isReadOnly the new read only flag
+     */
+    public void setReadOnly( boolean isReadOnly )
+    {
+        connectionParameter.setReadOnly( isReadOnly );
+        ConnectionEventRegistry.fireConnectionUpdated( this, this );
+    }
+
+
     /**
      * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
      */

Modified: directory/studio/trunk/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/ConnectionParameter.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/ConnectionParameter.java?rev=608667&r1=608666&r2=608667&view=diff
==============================================================================
--- directory/studio/trunk/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/ConnectionParameter.java
(original)
+++ directory/studio/trunk/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/ConnectionParameter.java
Thu Jan  3 14:58:01 2008
@@ -104,15 +104,17 @@
 
     /** The bind password. */
     private String bindPassword;
-    
+
     /** The SASL realm. */
     private String saslRealm;
 
+    /** The read only flag. */
+    private boolean isReadOnly;
+    
     /** The extended properties. */
     private Map<String, String> extendedProperties;
 
 
-
     /**
      * Creates a new instance of ConnectionParameter.
      */
@@ -133,11 +135,12 @@
      * @param bindPrincipal the bind principal
      * @param bindPassword the bind password
      * @param saslRealm the SASL realm
+     * @param isReadOnly the read only flag
      * @param extendedProperties the extended properties
      */
     public ConnectionParameter( String name, String host, int port, EncryptionMethod encryptionMethod,
         AuthenticationMethod authMethod, String bindPrincipal, String bindPassword, String
saslRealm,
-        Map<String, String> extendedProperties )
+        boolean isReadOnly, Map<String, String> extendedProperties )
     {
         this.id = createId();
         this.name = name;
@@ -148,6 +151,7 @@
         this.bindPrincipal = bindPrincipal;
         this.bindPassword = bindPassword;
         this.saslRealm = saslRealm;
+        this.isReadOnly = isReadOnly;
         this.extendedProperties = new HashMap<String, String>();
         if ( extendedProperties != null )
         {
@@ -198,25 +202,49 @@
     {
         this.bindPassword = bindPassword;
     }
-    
-    
+
+
     /**
      * Gets the SASL realm
      * 
      * @return the SASL realm
      */
-    public String getSaslRealm (){
-    	return saslRealm;
+    public String getSaslRealm()
+    {
+        return saslRealm;
     }
-    
-    
+
+
     /**
      * Sets the SASL realm
      * 
      * @param saslRealm the SASL realm
      */
-    public void setSaslRealm (String saslRealm){
-    	this.saslRealm = saslRealm;
+    public void setSaslRealm( String saslRealm )
+    {
+        this.saslRealm = saslRealm;
+    }
+
+
+    /**
+     * Checks if this connection is read only.
+     * 
+     * @return true, if this connection is read only
+     */
+    public boolean isReadOnly()
+    {
+        return isReadOnly;
+    }
+
+
+    /**
+     * Sets the read only flag.
+     * 
+     * @param isReadOnly the new read only flag
+     */
+    public void setReadOnly( boolean isReadOnly )
+    {
+        this.isReadOnly = isReadOnly;
     }
 
 

Modified: directory/studio/trunk/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/JNDIConnectionWrapper.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/JNDIConnectionWrapper.java?rev=608667&r1=608666&r2=608667&view=diff
==============================================================================
--- directory/studio/trunk/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/JNDIConnectionWrapper.java
(original)
+++ directory/studio/trunk/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/JNDIConnectionWrapper.java
Thu Jan  3 14:58:01 2008
@@ -374,6 +374,12 @@
         final ReferralHandlingMethod referralsHandlingMethod, final Control[] controls,
         final StudioProgressMonitor monitor, final ReferralsInfo referralsInfo )
     {
+        if( connection.isReadOnly() )
+        {
+            monitor.reportError( "Connection '" + connection.getName() + "' is read only."
);
+            return;
+        }
+
         InnerRunnable runnable = new InnerRunnable()
         {
             public void run()
@@ -459,6 +465,12 @@
         final ReferralHandlingMethod referralsHandlingMethod, final Control[] controls,
         final StudioProgressMonitor monitor, final ReferralsInfo referralsInfo )
     {
+        if( connection.isReadOnly() )
+        {
+            monitor.reportError( "Connection '" + connection.getName() + "' is read only."
);
+            return;
+        }
+
         InnerRunnable runnable = new InnerRunnable()
         {
             public void run()
@@ -553,6 +565,12 @@
         final ReferralHandlingMethod referralsHandlingMethod, final Control[] controls,
         final StudioProgressMonitor monitor, final ReferralsInfo referralsInfo )
     {
+        if( connection.isReadOnly() )
+        {
+            monitor.reportError( "Connection '" + connection.getName() + "' is read only."
);
+            return;
+        }
+
         InnerRunnable runnable = new InnerRunnable()
         {
             public void run()
@@ -635,6 +653,12 @@
     public void deleteEntry( final String dn, final ReferralHandlingMethod referralsHandlingMethod,
         final Control[] controls, final StudioProgressMonitor monitor, final ReferralsInfo
referralsInfo )
     {
+        if( connection.isReadOnly() )
+        {
+            monitor.reportError( "Connection '" + connection.getName() + "' is read only."
);
+            return;
+        }
+
         InnerRunnable runnable = new InnerRunnable()
         {
             public void run()

Modified: directory/studio/trunk/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/NetworkParameterPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/NetworkParameterPage.java?rev=608667&r1=608666&r2=608667&view=diff
==============================================================================
--- directory/studio/trunk/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/NetworkParameterPage.java
(original)
+++ directory/studio/trunk/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/NetworkParameterPage.java
Thu Jan  3 14:58:01 2008
@@ -140,7 +140,7 @@
     private Connection getTestConnection()
     {
         ConnectionParameter cp = new ConnectionParameter( null, getHostName(), getPort(),
getEncyrptionMethod(),
-            ConnectionParameter.AuthenticationMethod.NONE, null, null, null, null );
+            ConnectionParameter.AuthenticationMethod.NONE, null, null, null, true, null );
         Connection conn = new Connection( cp );
         return conn;
     }

Modified: directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/AbstractAttributeModificationJob.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/AbstractAttributeModificationJob.java?rev=608667&r1=608666&r2=608667&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/AbstractAttributeModificationJob.java
(original)
+++ directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/AbstractAttributeModificationJob.java
Thu Jan  3 14:58:01 2008
@@ -47,9 +47,12 @@
         }
         finally
         {
-            // reload affected attributes
-            String[] attributeDescriptions = getAffectedAttributeDescriptions();
-            InitializeAttributesJob.initializeAttributes( getModifiedEntry(), attributeDescriptions,
monitor );
+            if( !getModifiedEntry().getBrowserConnection().getConnection().isReadOnly() )
+            {
+                // reload affected attributes
+                String[] attributeDescriptions = getAffectedAttributeDescriptions();
+                InitializeAttributesJob.initializeAttributes( getModifiedEntry(), attributeDescriptions,
monitor );
+            }
         }
     }
 

Modified: directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/AbstractEclipseJob.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/AbstractEclipseJob.java?rev=608667&r1=608666&r2=608667&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/AbstractEclipseJob.java
(original)
+++ directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/AbstractEclipseJob.java
Thu Jan  3 14:58:01 2008
@@ -159,7 +159,7 @@
 
     public boolean shouldSchedule()
     {
-
+        
         Object[] myLockedObjects = getLockedObjects();
         String[] myLockedObjectsIdentifiers = getLockIdentifiers( myLockedObjects );
 

Modified: directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/CreateValuesJob.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/CreateValuesJob.java?rev=608667&r1=608666&r2=608667&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/CreateValuesJob.java
(original)
+++ directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/CreateValuesJob.java
Thu Jan  3 14:58:01 2008
@@ -186,7 +186,7 @@
     static void createValues( IBrowserConnection browserConnection, IEntry entryToModify,
IValue[] valuesToCreate,
         StudioProgressMonitor monitor )
     {
-        if ( browserConnection.getConnection() != null )
+        if ( !browserConnection.getConnection().isReadOnly() )
         {
             // dn
             String dn = entryToModify.getDn().getUpName();

Modified: directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/DeleteAttributesValueJob.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/DeleteAttributesValueJob.java?rev=608667&r1=608666&r2=608667&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/DeleteAttributesValueJob.java
(original)
+++ directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/DeleteAttributesValueJob.java
Thu Jan  3 14:58:01 2008
@@ -218,7 +218,7 @@
     static void deleteAttributesAndValues( IBrowserConnection browserConnection, IEntry entry,
         IAttribute[] attributesToDelete, IValue[] valuesToDelete, StudioProgressMonitor monitor
)
     {
-        if ( browserConnection.getConnection() != null )
+        if ( !browserConnection.getConnection().isReadOnly() )
         {
             // dn
             String dn = entry.getDn().getUpName();

Modified: directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ModifyValueJob.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ModifyValueJob.java?rev=608667&r1=608666&r2=608667&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ModifyValueJob.java
(original)
+++ directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ModifyValueJob.java
Thu Jan  3 14:58:01 2008
@@ -156,7 +156,7 @@
     private void modifyValue( IBrowserConnection browserConnection, IEntry entry, IValue
oldValue, IValue newValue,
         StudioProgressMonitor monitor )
     {
-        if ( browserConnection.getConnection() != null )
+        if ( !browserConnection.getConnection().isReadOnly() )
         {
             // dn
             String dn = entry.getDn().getUpName();

Modified: directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/NewEntryTypeWizardPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/NewEntryTypeWizardPage.java?rev=608667&r1=608666&r2=608667&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/NewEntryTypeWizardPage.java
(original)
+++ directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/NewEntryTypeWizardPage.java
Thu Jan  3 14:58:01 2008
@@ -196,7 +196,7 @@
                 EventRegistry.suspendEventFireingInCurrentThread();
 
                 LdifContentRecord record = ModelConverter.entryToLdifContentRecord( templateEntries[0]
);
-                DummyEntry prototypeEntry = ModelConverter.ldifContentRecordToEntry( record,
new DummyConnection( browserConnection.getSchema() ) );
+                DummyEntry prototypeEntry = ModelConverter.ldifContentRecordToEntry( record,
browserConnection );
                 IAttribute[] attributes = prototypeEntry.getAttributes();
                 for ( int i = 0; i < attributes.length; i++ )
                 {
@@ -218,7 +218,7 @@
         }
         else
         {
-            wizard.setPrototypeEntry( new DummyEntry( new LdapDN(), new DummyConnection(
wizard.getSelectedConnection().getSchema() ) ) );
+            wizard.setPrototypeEntry( new DummyEntry( new LdapDN(), wizard.getSelectedConnection()
) );
         }
 
         return super.getNextPage();

Modified: directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/NewEntryWizard.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/NewEntryWizard.java?rev=608667&r1=608666&r2=608667&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/NewEntryWizard.java
(original)
+++ directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/NewEntryWizard.java
Thu Jan  3 14:58:01 2008
@@ -34,7 +34,6 @@
 import org.apache.directory.studio.ldapbrowser.core.model.ISearch;
 import org.apache.directory.studio.ldapbrowser.core.model.ISearchResult;
 import org.apache.directory.studio.ldapbrowser.core.model.IValue;
-import org.apache.directory.studio.ldapbrowser.core.model.impl.DummyConnection;
 import org.apache.directory.studio.ldapbrowser.core.model.impl.DummyEntry;
 import org.apache.directory.studio.ldapbrowser.ui.BrowserUIConstants;
 import org.apache.directory.studio.ldapbrowser.ui.BrowserUIPlugin;
@@ -79,6 +78,9 @@
     /** The selected connection. */
     private IBrowserConnection selectedConnection;
 
+    /** The read only flag of the selected connection. */
+    private boolean originalReadOnlyFlag;
+    
     /** The prototype entry. */
     private DummyEntry prototypeEntry;
 
@@ -169,8 +171,9 @@
 
         if ( selectedConnection != null )
         {
-            DummyConnection prototypeConnection = new DummyConnection( selectedConnection.getSchema()
); 
-            prototypeEntry = new DummyEntry( new LdapDN(), prototypeConnection );
+            originalReadOnlyFlag = selectedConnection.getConnection().isReadOnly();
+            selectedConnection.getConnection().setReadOnly( true );
+            prototypeEntry = new DummyEntry( new LdapDN(), selectedConnection );
         }
     }
 
@@ -266,12 +269,9 @@
      */
     public boolean performCancel()
     {
-        if ( selectedConnection != null )
+        if ( selectedConnection != null && selectedConnection.getConnection() !=
null )
         {
-//            EventRegistry.suspendEventFireingInCurrentThread();
-//            selectedConnection.reset();
-//            EventRegistry.resumeEventFireingInCurrentThread();
-//            selectedConnection.reset();
+            selectedConnection.getConnection().setReadOnly( originalReadOnlyFlag );
         }
 
         return true;
@@ -285,20 +285,20 @@
     {
         try
         {
-            if ( selectedConnection != null )
+            if ( selectedConnection != null && selectedConnection.getConnection()
!= null )
             {
+                selectedConnection.getConnection().setReadOnly( originalReadOnlyFlag );
+                
                 typePage.saveDialogSettings();
                 ocPage.saveDialogSettings();
                 dnPage.saveDialogSettings();
 
-//                getSelectedConnection().reset();
-                
                 CreateEntryJob job = new CreateEntryJob( prototypeEntry, selectedConnection
);
                 RunnableContextJobAdapter.execute( job, getContainer() );
 
                 if ( !job.getExternalResult().isOK() )
                 {
-//                    getSelectedConnection().suspend();
+                    selectedConnection.getConnection().setReadOnly( true );
                     return false;
                 }
                 else

Modified: directory/studio/trunk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/dialogs/LdifEntryEditorDialog.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/dialogs/LdifEntryEditorDialog.java?rev=608667&r1=608666&r2=608667&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/dialogs/LdifEntryEditorDialog.java
(original)
+++ directory/studio/trunk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/dialogs/LdifEntryEditorDialog.java
Thu Jan  3 14:58:01 2008
@@ -95,8 +95,7 @@
         setShellStyle( getShellStyle() | SWT.RESIZE );
         this.ldifRecord = ldifRecord;
 
-        this.connection = new DummyConnection( ( connection != null && connection.getSchema()
!= null ) ? connection
-            .getSchema() : Schema.DEFAULT_SCHEMA );
+        this.connection = connection != null ? connection : new DummyConnection( Schema.DEFAULT_SCHEMA
);
     }
 
 



Mime
View raw message