Author: nextgens
Date: 2007-04-22 11:53:57 +0000 (Sun, 22 Apr 2007)
New Revision: 12854

Modified:
   trunk/freenet/src/freenet/l10n/L10n.java
Log:
L10n : Enforce the class protection ... we return a copy of the object in 
public methods

Modified: trunk/freenet/src/freenet/l10n/L10n.java
===================================================================
--- trunk/freenet/src/freenet/l10n/L10n.java    2007-04-22 11:42:46 UTC (rev 
12853)
+++ trunk/freenet/src/freenet/l10n/L10n.java    2007-04-22 11:53:57 UTC (rev 
12854)
@@ -124,12 +124,22 @@
                }
        }

+       /**
+        * Return a new copy of the current translation file 
+        * 
+        * @return SimpleFieldSet
+        */
        public static SimpleFieldSet getCurrentLanguageTranslation() {
-               return currentTranslation;
+               return new SimpleFieldSet(currentTranslation);
        }

+       /**
+        * Return a copy of the current translation override if it exists or 
null
+        * 
+        * @return SimpleFieldSet or null
+        */
        public static SimpleFieldSet getOverrideForCurrentLanguageTranslation() 
{
-               return translationOverride;
+               return (translationOverride == null ? null : new 
SimpleFieldSet(translationOverride));
        }

        /**


Reply via email to