@@ -114,11 +114,16 @@ public void combineWithAsteriskWildCard() {
114
114
other .addAllowedHeader ("header1" );
115
115
other .addExposedHeader ("header2" );
116
116
other .addAllowedMethod (HttpMethod .PUT .name ());
117
- config = config .combine (other );
118
- assertEquals (Arrays .asList ("http://domain.com" ), config .getAllowedOrigins ());
119
- assertEquals (Arrays .asList ("header1" ), config .getAllowedHeaders ());
120
- assertEquals (Arrays .asList ("header2" ), config .getExposedHeaders ());
121
- assertEquals (Arrays .asList (HttpMethod .PUT .name ()), config .getAllowedMethods ());
117
+ CorsConfiguration combinedConfig = config .combine (other );
118
+ assertEquals (Arrays .asList ("http://domain.com" ), combinedConfig .getAllowedOrigins ());
119
+ assertEquals (Arrays .asList ("header1" ), combinedConfig .getAllowedHeaders ());
120
+ assertEquals (Arrays .asList ("header2" ), combinedConfig .getExposedHeaders ());
121
+ assertEquals (Arrays .asList (HttpMethod .PUT .name ()), combinedConfig .getAllowedMethods ());
122
+ combinedConfig = other .combine (config );
123
+ assertEquals (Arrays .asList ("http://domain.com" ), combinedConfig .getAllowedOrigins ());
124
+ assertEquals (Arrays .asList ("header1" ), combinedConfig .getAllowedHeaders ());
125
+ assertEquals (Arrays .asList ("header2" ), combinedConfig .getExposedHeaders ());
126
+ assertEquals (Arrays .asList (HttpMethod .PUT .name ()), combinedConfig .getAllowedMethods ());
122
127
}
123
128
124
129
@ Test
0 commit comments