[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-1873?page=c...
]
Ben Groeneveld commented on HHH-1873:
-------------------------------------
Yes, understand the problem (the compiler is following the non-intuitive spec) and am
suggesting a permanent workaround. For example, I have come across this pattern as a
solution. Maybe it will work for you.
public static class StaticFinals {
public static String dynamic(String s) { return s; }
public static int dynamic(int i) { return i; }
// TODO implement methods for each primitive type
}
public static class ExampleProgram {
public static final String MY_STATIC_STRING = StaticFinals.dynamic("Might
change");
public static final int MY_STATIC_INT = StaticFinals.dynamic(42);
}
Query the hibernate version through the API
-------------------------------------------
Key: HHH-1873
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-1873
Project: Hibernate Core
Issue Type: New Feature
Components: core
Reporter: Mark Grand
Priority: Minor
Original Estimate: 2 hours
Remaining Estimate: 2 hours
I am building a tool that will work with hibernate. Though this tool will be used with
hibernate, I want it to work with whatever version of hibernate my users select. Making
this work with future versions of hibernate will be eaiser if there is something in the
API that says what the version of hibernate is.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira