Fix window state comparison in DAHandlerMapping

This commit is contained in:
Juergen Hoeller 2012-05-28 00:12:47 +02:00 committed by Chris Beams
parent 08784f3ba9
commit 9b10d38e41
1 changed files with 3 additions and 3 deletions

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2002-2011 the original author or authors. * Copyright 2002-2012 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -411,8 +411,8 @@ public class DefaultAnnotationHandlerMapping extends AbstractMapBasedHandlerMapp
} }
else if (other instanceof RenderMappingPredicate) { else if (other instanceof RenderMappingPredicate) {
RenderMappingPredicate otherRender = (RenderMappingPredicate) other; RenderMappingPredicate otherRender = (RenderMappingPredicate) other;
boolean hasWindowState = "".equals(this.windowState); boolean hasWindowState = (this.windowState != null);
boolean otherHasWindowState = "".equals(otherRender.windowState); boolean otherHasWindowState = (otherRender.windowState != null);
if (hasWindowState != otherHasWindowState) { if (hasWindowState != otherHasWindowState) {
return (hasWindowState ? -1 : 1); return (hasWindowState ? -1 : 1);
} }