directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1671759 - in /directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model: OlcConfig.java OlcDbSocketConfig.java OlcSchemaConfig.java
Date Tue, 07 Apr 2015 08:26:50 GMT
Author: elecharny
Date: Tue Apr  7 08:26:50 2015
New Revision: 1671759

URL: http://svn.apache.org/r1671759
Log:
Used the copyListString method to avoid a modification by the caller

Modified:
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcConfig.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcDbSocketConfig.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcSchemaConfig.java

Modified: directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcConfig.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcConfig.java?rev=1671759&r1=1671758&r2=1671759&view=diff
==============================================================================
--- directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcConfig.java
(original)
+++ directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcConfig.java
Tue Apr  7 08:26:50 2015
@@ -59,7 +59,10 @@ public class OlcConfig
      */
     public List<AuxiliaryObjectClass> getAuxiliaryObjectClasses()
     {
-        return auxiliaryObjectClasses;
+        List<AuxiliaryObjectClass> copy = new ArrayList<AuxiliaryObjectClass>(
auxiliaryObjectClasses.size() );
+        copy.addAll( auxiliaryObjectClasses );
+
+        return copy;
     }
 
 

Modified: directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcDbSocketConfig.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcDbSocketConfig.java?rev=1671759&r1=1671758&r2=1671759&view=diff
==============================================================================
--- directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcDbSocketConfig.java
(original)
+++ directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcDbSocketConfig.java
Tue Apr  7 08:26:50 2015
@@ -67,7 +67,7 @@ public class OlcDbSocketConfig extends O
      */
     public List<String> getOlcDbSocketExtensions()
     {
-        return olcDbSocketExtensions;
+        return copyListString( olcDbSocketExtensions );
     }
 
 
@@ -85,7 +85,7 @@ public class OlcDbSocketConfig extends O
      */
     public void setOlcDbSocketExtensions( List<String> olcDbSocketExtensions )
     {
-        this.olcDbSocketExtensions = olcDbSocketExtensions;
+        this.olcDbSocketExtensions = copyListString( olcDbSocketExtensions );
     }
 
 

Modified: directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcSchemaConfig.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcSchemaConfig.java?rev=1671759&r1=1671758&r2=1671759&view=diff
==============================================================================
--- directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcSchemaConfig.java
(original)
+++ directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcSchemaConfig.java
Tue Apr  7 08:26:50 2015
@@ -181,7 +181,7 @@ public class OlcSchemaConfig extends Olc
      */
     public List<String> getCn()
     {
-        return cn;
+        return copyListString( cn );
     }
 
 
@@ -190,7 +190,7 @@ public class OlcSchemaConfig extends Olc
      */
     public List<String> getOlcAttributeTypes()
     {
-        return olcAttributeTypes;
+        return copyListString( olcAttributeTypes );
     }
 
 
@@ -199,7 +199,7 @@ public class OlcSchemaConfig extends Olc
      */
     public List<String> getOlcDitContentRules()
     {
-        return olcDitContentRules;
+        return copyListString( olcDitContentRules );
     }
 
 
@@ -208,7 +208,7 @@ public class OlcSchemaConfig extends Olc
      */
     public List<String> getOlcLdapSyntaxes()
     {
-        return olcLdapSyntaxes;
+        return copyListString( olcLdapSyntaxes );
     }
 
 
@@ -217,7 +217,7 @@ public class OlcSchemaConfig extends Olc
      */
     public List<String> getOlcObjectClasses()
     {
-        return olcObjectClasses;
+        return copyListString( olcObjectClasses );
     }
 
 
@@ -226,7 +226,7 @@ public class OlcSchemaConfig extends Olc
      */
     public List<String> getOlcObjectIdentifier()
     {
-        return olcObjectIdentifier;
+        return copyListString( olcObjectIdentifier );
     }
 
 
@@ -235,7 +235,7 @@ public class OlcSchemaConfig extends Olc
      */
     public void setCn( List<String> cn )
     {
-        this.cn = cn;
+        this.cn = copyListString( cn );
     }
 
 
@@ -244,7 +244,7 @@ public class OlcSchemaConfig extends Olc
      */
     public void setOlcAttributeTypes( List<String> olcAttributeTypes )
     {
-        this.olcAttributeTypes = olcAttributeTypes;
+        this.olcAttributeTypes = copyListString( olcAttributeTypes );
     }
 
 
@@ -253,7 +253,7 @@ public class OlcSchemaConfig extends Olc
      */
     public void setOlcDitContentRules( List<String> olcDitContentRules )
     {
-        this.olcDitContentRules = olcDitContentRules;
+        this.olcDitContentRules = copyListString( olcDitContentRules );
     }
 
 
@@ -262,7 +262,7 @@ public class OlcSchemaConfig extends Olc
      */
     public void setOlcLdapSyntaxes( List<String> olcLdapSyntaxes )
     {
-        this.olcLdapSyntaxes = olcLdapSyntaxes;
+        this.olcLdapSyntaxes = copyListString( olcLdapSyntaxes );
     }
 
 
@@ -271,7 +271,7 @@ public class OlcSchemaConfig extends Olc
      */
     public void setOlcObjectClasses( List<String> olcObjectClasses )
     {
-        this.olcObjectClasses = olcObjectClasses;
+        this.olcObjectClasses = copyListString( olcObjectClasses );
     }
 
 
@@ -280,6 +280,6 @@ public class OlcSchemaConfig extends Olc
      */
     public void setOlcObjectIdentifier( List<String> olcObjectIdentifier )
     {
-        this.olcObjectIdentifier = olcObjectIdentifier;
+        this.olcObjectIdentifier = copyListString( olcObjectIdentifier );
     }
 }



Mime
View raw message