File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
org.springframework.test/src/main/java/org/springframework/test/web Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2002-2008 the original author or authors.
2
+ * Copyright 2002-2009 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
23
23
import java .util .Map ;
24
24
import java .util .Set ;
25
25
26
+ import org .springframework .util .ObjectUtils ;
26
27
import org .springframework .web .servlet .ModelAndView ;
27
28
28
29
/**
@@ -180,8 +181,8 @@ public static void assertSortAndCompareListModelAttribute(
180
181
*/
181
182
public static void assertViewName (ModelAndView mav , String expectedName ) {
182
183
assertCondition (mav != null , "ModelAndView is null" );
183
- assertCondition (expectedName . equals ( mav .getViewName ()), "View name is not equal to '" + expectedName +
184
- "' but was '" + mav .getViewName () + "'" );
184
+ assertCondition (ObjectUtils . nullSafeEquals ( expectedName , mav .getViewName ()),
185
+ "View name is not equal to '" + expectedName + " ' but was '" + mav .getViewName () + "'" );
185
186
}
186
187
187
188
You can’t perform that action at this time.
0 commit comments