Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 367007 - map values of javax.persistence.validation.mode are incorrectly throwing exception
Summary: map values of javax.persistence.validation.mode are incorrectly throwing exce...
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-17 09:22 EST by Bernd Müller CLA
Modified: 2022-06-09 10:23 EDT (History)
1 user (show)

See Also:


Attachments
Fix and testcase (4.64 KB, patch)
2012-01-03 14:17 EST, David Minsky CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Bernd Müller CLA 2011-12-17 09:22:12 EST
Build Identifier: eclipselink-2.3.1.v20111018-r10243

JPA 2.0 spec section 3.6.1.1 mention auto, callback, none as correct values
of map key javax.persistence.validation.mode.
But EclipseLink 2.3.1 and lower throws an
Internal Exception: java.lang.IllegalArgumentException: No enum const class javax.persistence.ValidationMode.none

Reproducible: Always

Steps to Reproduce:
run code like the following:
Map<String, String> props = new HashMap<String, String>();
props.put("javax.persistence.validation.mode", "none"); // works with 'NONE'
EntityManagerFactory emf = Persistence.createEntityManagerFactory("..", props);
Comment 1 David Minsky CLA 2011-12-22 13:58:42 EST
Reproduced issue in trunk.
Comment 2 David Minsky CLA 2012-01-03 14:17:14 EST
Created attachment 208956 [details]
Fix and testcase
Comment 3 David Minsky CLA 2012-01-04 13:21:06 EST
Checked into trunk (2.4) at revision: 10644
Comment 4 David Minsky CLA 2012-01-04 15:21:13 EST
Checked into 2.3 branch at revision: 10645
Comment 5 Eclipse Webmaster CLA 2022-06-09 10:23:25 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink