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 11/*
2- * Copyright 2002-2008 the original author or authors.
2+ * Copyright 2002-2009 the original author or authors.
33 *
44 * Licensed under the Apache License, Version 2.0 (the "License");
55 * you may not use this file except in compliance with the License.
2323import java .util .Map ;
2424import java .util .Set ;
2525
26+ import org .springframework .util .ObjectUtils ;
2627import org .springframework .web .servlet .ModelAndView ;
2728
2829/**
@@ -180,8 +181,8 @@ public static void assertSortAndCompareListModelAttribute(
180181 */
181182 public static void assertViewName (ModelAndView mav , String expectedName ) {
182183 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 () + "'" );
185186 }
186187
187188
You can’t perform that action at this time.
0 commit comments