File tree 1 file changed +7
-4
lines changed
modules/core/src/main/java/org/apache/synapse/unittest
1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -177,17 +177,20 @@ private String getAbsolutePathToRegistry(String key) {
177
177
public Properties getResourceProperties (String entryKey ) {
178
178
Properties propertySet = new Properties ();
179
179
180
- String filePathAsKey = entryKey .substring (0 , entryKey .length () - 1 ) + ".properties" ;
181
- String resourcePath = getAbsolutePathToRegistry (filePathAsKey );
180
+ String formattedEntryKey = entryKey ;
181
+ if (entryKey .endsWith (Constants .BACK_SLASH )) {
182
+ formattedEntryKey = entryKey .substring (0 , entryKey .length () - 1 );
183
+ }
184
+
185
+ String resourcePath = getAbsolutePathToRegistry (formattedEntryKey + ".properties" );
182
186
boolean isFoundPropertyFile = false ;
183
187
184
188
//check registry has .properties file for the properties with key
185
189
if (resourcePath != null && testMockRegistry .containsKey (resourcePath )) {
186
190
isFoundPropertyFile = true ;
187
191
} else {
188
192
//check registry has file for the properties with key
189
- filePathAsKey = entryKey .substring (0 , entryKey .length () - 1 );
190
- resourcePath = getAbsolutePathToRegistry (filePathAsKey );
193
+ resourcePath = getAbsolutePathToRegistry (formattedEntryKey );
191
194
192
195
if (resourcePath != null && testMockRegistry .containsKey (resourcePath )) {
193
196
isFoundPropertyFile = true ;
You can’t perform that action at this time.
0 commit comments