Skip to content

Commit 8ee1c1d

Browse files
committed
Check UrlMapping equality by comparing the mappingId instead of the viewId
1 parent 84ce0b6 commit 8ee1c1d

2 files changed

Lines changed: 6 additions & 5 deletions

File tree

‎CHANGELOG.txt‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ Features & Enhancements:
1212
Bugfixes:
1313
* Fixed bug that caused path parameter validators to be ignored (#102)
1414
* Handle java.lang.ClassFormatError during initialization of bean name resolvers (#101)
15-
* Also check Weld 1.1.x specific servlet context attribute while search for BeanManager
15+
* Also check Weld 1.1.x specific servlet context attribute while search for BeanManager
16+
* Mapping inheritance now working correctly for mappings using the same viewId
1617

1718
------------------------------------
1819
VERSION 3.2.1

‎core/src/main/java/com/ocpsoft/pretty/faces/config/mapping/UrlMapping.java‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ public int hashCode()
174174
{
175175
final int prime = 31;
176176
int result = 1;
177-
result = prime * result + (viewId == null ? 0 : viewId.hashCode());
177+
result = prime * result + (id == null ? 0 : id.hashCode());
178178
return result;
179179
}
180180

@@ -194,14 +194,14 @@ public boolean equals(final Object obj)
194194
return false;
195195
}
196196
UrlMapping other = (UrlMapping) obj;
197-
if (viewId == null)
197+
if (id == null)
198198
{
199-
if (other.viewId != null)
199+
if (other.id != null)
200200
{
201201
return false;
202202
}
203203
}
204-
else if (!viewId.equals(other.viewId))
204+
else if (!id.equals(other.id))
205205
{
206206
return false;
207207
}

0 commit comments

Comments
 (0)