Validation clear

Bug #616702 reported by Alexander Strebkov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
play framework
Fix Committed
Undecided
Unassigned
Nominated for 1.1 by Alexander Strebkov

Bug Description

Validation.clear() produces stack overflow exception in both controllers and tests.

Tags: validation
Revision history for this message
Alexander Strebkov (alexanderstrebkov) wrote :
Revision history for this message
Alexander Strebkov (alexanderstrebkov) wrote :

I see you included part of the patch to fix stack overflow in 1.1-beta1. But I also encountered a problem with keys stored in validation plugin. After Validation.clear() few times in unit tests I eventually get failed tests due to validation keys like "user..name", after that "user...name" e.t.c. So with each test/cleanup a new point seems to be stuck somewhere in ValidationPlugin.keys. I don't know if it is a good solution to add

ValidationPlugin.keys.get().clear();

to the end of Validation.clear() but it fixes the problem.

Maybe it would be even better to auto-cleanup all previous validation errors/stuck_keys before performing validation.

Changed in play:
status: New → Fix Committed
milestone: none → 1.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.