diff --git a/modules/core/src/main/java/org/apache/synapse/config/SynapseConfigUtils.java b/modules/core/src/main/java/org/apache/synapse/config/SynapseConfigUtils.java index 718634ef14..f1c9aaa59e 100644 --- a/modules/core/src/main/java/org/apache/synapse/config/SynapseConfigUtils.java +++ b/modules/core/src/main/java/org/apache/synapse/config/SynapseConfigUtils.java @@ -93,8 +93,6 @@ public class SynapseConfigUtils { private static final Log log = LogFactory.getLog(SynapseConfigUtils.class); - public static final String RESOURCES_IDENTIFIER = "resources:"; - public static final String CONVERTED_RESOURCES_IDENTIFIER = "gov:mi-resources/"; private static ConcurrentHashMap lastRegisteredSynapseConfigurationMap = new ConcurrentHashMap(); @@ -905,13 +903,5 @@ public static SynapseConfiguration getSynapseConfiguration(String tenantDomain){ public static void addSynapseConfiguration(String tenantDomain , SynapseConfiguration synapseConfiguration){ lastRegisteredSynapseConfigurationMap.put(tenantDomain,synapseConfiguration); } - - public static String transformFileKey(String fileKey) { - - if (fileKey.startsWith(RESOURCES_IDENTIFIER)) { - return CONVERTED_RESOURCES_IDENTIFIER + fileKey.substring(RESOURCES_IDENTIFIER.length()); - } - return fileKey; - } } diff --git a/modules/core/src/main/java/org/apache/synapse/config/SynapseConfiguration.java b/modules/core/src/main/java/org/apache/synapse/config/SynapseConfiguration.java index 01aec6f80e..aa072cb125 100644 --- a/modules/core/src/main/java/org/apache/synapse/config/SynapseConfiguration.java +++ b/modules/core/src/main/java/org/apache/synapse/config/SynapseConfiguration.java @@ -1018,7 +1018,6 @@ public Object getEntry(String key) { * @return its value */ public Entry getEntryDefinition(String key) { - String transformedKey = SynapseConfigUtils.transformFileKey(key); Object o = localRegistry.get(key); if (o == null || o instanceof Entry) { if (o == null) { @@ -1026,7 +1025,7 @@ public Entry getEntryDefinition(String key) { synchronized (this) { o = localRegistry.get(key); if (o == null) { - Entry entry = new Entry(transformedKey); + Entry entry = new Entry(key); entry.setType(Entry.REMOTE_ENTRY); addEntry(key, entry); return entry; diff --git a/modules/core/src/test/java/org/apache/synapse/config/SynapseConfigurationTest.java b/modules/core/src/test/java/org/apache/synapse/config/SynapseConfigurationTest.java index 016c8e8878..5b1f7dde1b 100644 --- a/modules/core/src/test/java/org/apache/synapse/config/SynapseConfigurationTest.java +++ b/modules/core/src/test/java/org/apache/synapse/config/SynapseConfigurationTest.java @@ -23,8 +23,6 @@ import junit.framework.TestCase; import org.apache.synapse.endpoints.HTTPEndpoint; -import org.apache.synapse.registry.url.SimpleURLRegistry; -import org.apache.synapse.registry.url.SimpleURLRegistryTest; public class SynapseConfigurationTest extends TestCase { @@ -122,12 +120,4 @@ public void run() { throw new RuntimeException(e); } } - - public void testGetEntryDefinition() throws Exception { - - String key = "resources:xslt/sample.xslt"; - SynapseConfiguration config = new SynapseConfiguration(); - Entry entry = config.getEntryDefinition(key); - assertEquals("Key of entry should be transformed.", "gov:mi-resources/xslt/sample.xslt", entry.getKey()); - } }