diff --git a/scr/src/main/java/org/apache/felix/scr/impl/Activator.java b/scr/src/main/java/org/apache/felix/scr/impl/Activator.java
index 5b4961a..33b3a66 100644
--- a/scr/src/main/java/org/apache/felix/scr/impl/Activator.java
+++ b/scr/src/main/java/org/apache/felix/scr/impl/Activator.java
@@ -69,10 +69,6 @@
     //  thread acting upon configurations
     private ComponentActorThread m_componentActor;
 
-    // whether to support two workarounds to run the OSGi R 4.2 CT
-    // See hasCtWorkaround()
-    private static boolean m_ctWorkaround;
-
     /**
      * Registers this instance as a (synchronous) bundle listener and loads the
      * components of already registered bundles.
@@ -99,9 +95,6 @@
         log( LogService.LOG_INFO, context.getBundle(), " Version = "
             + context.getBundle().getHeaders().get( Constants.BUNDLE_VERSION ), null );
 
-        // check whether we workaround OSGi CT issues
-        m_ctWorkaround = ScrConfiguration.hasCtWorkaround( context );
-
         // create and start the component actor
         m_componentActor = new ComponentActorThread();
         Thread t = new Thread(m_componentActor, "SCR Component Actor");
@@ -455,33 +448,4 @@
 
         return m_packageAdmin.getService();
     }
-
-
-    /**
-     * Returns <code>true</code> if the <code>ds.ctworkaround</code> framework
-     * property has been set to <code>true</code>. Otherwise <code>false</code>
-     * is returned.
-     * <p>
-     * If this method returns <code>true</code>, two workarounds for the OSGi
-     * Compendium R 4.2 CT for Declarative Services are active:
-     * <ul>
-     * <li>The <code>ComponentContext.getProperties()</code> implementation
-     * always returns the same writeable <code>Dictionary</code> instead of
-     * a read-only dictionary</li>
-     * <li>Location binding of <code>Configuration</code> objects supplied to
-     * components is ignored.</li>
-     * </ul>
-     * <p>
-     * Setting the <code>ds.ctworkaround</code> framework property is required
-     * to pass the CT but setting the property in a productive environment
-     * is strongly discouraged.
-     *
-     * @return <code>true</code> if the <code>ds.ctworkaround</code> framework
-     *      property is set to <code>true</code>.
-     * @see <a href="https://issues.apache.org/jira/browse/FELIX-2526">FELIX-2526</a>
-     */
-    public static boolean hasCtWorkaround()
-    {
-        return m_ctWorkaround;
-    }
 }
\ No newline at end of file
diff --git a/scr/src/main/java/org/apache/felix/scr/impl/ScrCommand.java b/scr/src/main/java/org/apache/felix/scr/impl/ScrCommand.java
index 645164c..03acf07 100644
--- a/scr/src/main/java/org/apache/felix/scr/impl/ScrCommand.java
+++ b/scr/src/main/java/org/apache/felix/scr/impl/ScrCommand.java
@@ -358,11 +358,6 @@
         out.println(scrConfiguration.getLogLevel());
         out.print("Component Factory with Factory Configuration: ");
         out.println(scrConfiguration.isFactoryEnabled() ? "Supported" : "Unsupported");
-
-        if (ScrConfiguration.hasCtWorkaround(bundleContext))
-        {
-            out.println("CT Issue workaround enabled");
-        }
     }
 
     private String pad(String value, int size)
diff --git a/scr/src/main/java/org/apache/felix/scr/impl/config/ConfigurationSupport.java b/scr/src/main/java/org/apache/felix/scr/impl/config/ConfigurationSupport.java
index d46c565..4d07515 100644
--- a/scr/src/main/java/org/apache/felix/scr/impl/config/ConfigurationSupport.java
+++ b/scr/src/main/java/org/apache/felix/scr/impl/config/ConfigurationSupport.java
@@ -256,7 +256,7 @@
         try
         {
             final Configuration cfg = ca.getConfiguration(pid);
-            if (bundleLocation.equals(cfg.getBundleLocation()) || Activator.hasCtWorkaround())
+            if (bundleLocation.equals(cfg.getBundleLocation()))
             {
                 return cfg.getProperties();
             }
diff --git a/scr/src/main/java/org/apache/felix/scr/impl/config/ScrConfiguration.java b/scr/src/main/java/org/apache/felix/scr/impl/config/ScrConfiguration.java
index 018cc7f..8a67c01 100644
--- a/scr/src/main/java/org/apache/felix/scr/impl/config/ScrConfiguration.java
+++ b/scr/src/main/java/org/apache/felix/scr/impl/config/ScrConfiguration.java
@@ -22,7 +22,6 @@
 import java.util.Dictionary;
 import java.util.Hashtable;
 
-import org.apache.felix.scr.impl.Activator;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.Constants;
 import org.osgi.framework.ServiceRegistration;
@@ -64,9 +63,6 @@
 
     public static final String PROP_LOGLEVEL = "ds.loglevel";
 
-    // framework property to enable the CT workarounds (see FELIX-2526)
-    private static final String PROP_CT_WORKAROUND = "ds.ctworkaround";
-
     private static final String LOG_LEVEL_DEBUG = "debug";
 
     private static final String LOG_LEVEL_INFO = "info";
@@ -167,28 +163,6 @@
     }
 
 
-    public static boolean hasCtWorkaround( final BundleContext bundleContext )
-    {
-        boolean ctWorkaround = VALUE_TRUE.equals( bundleContext.getProperty( PROP_CT_WORKAROUND ) );
-        if ( ctWorkaround )
-        {
-            Activator
-                .log(
-                    LogService.LOG_WARNING,
-                    bundleContext.getBundle(),
-                    "OSGi CT Workaround enabled. This Declarative Services instance is not operating specification compliant:",
-                    null );
-            Activator.log( LogService.LOG_WARNING, bundleContext.getBundle(),
-                " - Dictionary returned from ComponentContext.getProperties() is writeable", null );
-            Activator.log( LogService.LOG_WARNING, bundleContext.getBundle(),
-                " - Location Binding of Configuration is ignored", null );
-            Activator.log( LogService.LOG_WARNING, bundleContext.getBundle(), "Remove " + PROP_CT_WORKAROUND
-                + " framework property to operate specification compliant", null );
-        }
-        return ctWorkaround;
-    }
-
-
     private boolean getDefaultFactoryEnabled()
     {
         return VALUE_TRUE.equals( bundleContext.getProperty( PROP_FACTORY_ENABLED ) );
diff --git a/scr/src/main/java/org/apache/felix/scr/impl/manager/ComponentContextImpl.java b/scr/src/main/java/org/apache/felix/scr/impl/manager/ComponentContextImpl.java
index 6fd2b45..9df5fb3 100644
--- a/scr/src/main/java/org/apache/felix/scr/impl/manager/ComponentContextImpl.java
+++ b/scr/src/main/java/org/apache/felix/scr/impl/manager/ComponentContextImpl.java
@@ -22,7 +22,6 @@
 import java.util.Dictionary;
 
 import org.apache.felix.scr.component.ExtComponentContext;
-import org.apache.felix.scr.impl.Activator;
 import org.apache.felix.scr.impl.helper.ReadOnlyDictionary;
 import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleContext;
@@ -54,11 +53,7 @@
     {
         // 112.12.3.5 The Dictionary is read-only and cannot be modified
         Dictionary ctxProperties = m_componentManager.getProperties();
-        if ( !Activator.hasCtWorkaround() )
-        {
-            ctxProperties = new ReadOnlyDictionary( ctxProperties );
-        }
-        return ctxProperties;
+        return new ReadOnlyDictionary( ctxProperties );
     }
 
 
