Salome HOME
Modifications done to respect PMD rules. Versioning a document is fixed. Validation...
[tools/siman.git] / Workspace / Siman-Common / src / org / splat / service / ServiceLocatorImpl.java
index 5810b0ac0cdbc0ccb8af50f8acdaa2dd5499db63..966d8824fde831166831bdd5278848010453b053 100644 (file)
@@ -16,21 +16,18 @@ package org.splat.service;
  * @author <a href="mailto:roman.kozlov@opencascade.com">Roman Kozlov (RKV)</a>
  */
 @Deprecated
-public class ServiceLocatorImpl implements ServiceLocator {
+public final class ServiceLocatorImpl implements ServiceLocator {
 
        /**
         * The Locator instance.
         */
-       static ServiceLocator theInstance;
+       static private ServiceLocator theInstance = new ServiceLocatorImpl();
 
        /**
         * Get the locator instance.
         * @return the locator instance
         */
        public static ServiceLocator getInstance() {
-               if (theInstance == null) {
-                       theInstance = new ServiceLocatorImpl();
-               }
                return theInstance;
        }
        
@@ -61,7 +58,7 @@ public class ServiceLocatorImpl implements ServiceLocator {
         * Set the studyService.
         * @param studyService the studyService to set
         */
-       public void setStudyService(StudyService studyService) {
+       public void setStudyService(final StudyService studyService) {
                _studyService = studyService;
        }
 
@@ -77,7 +74,7 @@ public class ServiceLocatorImpl implements ServiceLocator {
         * Set the userService.
         * @param userService the userService to set
         */
-       public void setUserService(UserService userService) {
+       public void setUserService(final UserService userService) {
                _userService = userService;
        }
 }