You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
in: coreIssues in core modules (aop, beans, core, context, expression)status: declinedA suggestion or change that we don't feel we should currently applytype: enhancementA general enhancement
I'm afraid this is far outside the support range. Spring Framework 2.5.6 got released in 2008, and it just about covers JDK 6 and - de facto - basic JDK 7 compatibility (even if JDK 7 got released as late as 2011). However, 2014's JDK 8 is six years apart - that's just not feasible anymore.
Please upgrade to at least Spring Framework 3.2.9 which does have basic JDK 8 support - and it contains pretty much all of 2.5.6's support classes still: some of them in deprecated form but still working, thus providing a straightforward upgrade path for 2.5.6 users. Have you tried it?
Note that our full JDK 8 story (including JSR-310 support, repeatable annotations, parameter name discovery) is only available in the Spring Framework 4.x line... 3.2.9 just provides basic compatibility with the JDK 8 bytecode level plus a few further runtime compatibility tweaks.
Thanks for your answer.
Our new applications will be developped with spring 4 or spring 4.1. Still we wanted to upgrade old ones to Jdk8 without migrating spring too.
Any specific reason why upgrading your older apps to Spring Framework 3.2.9 wouldn't work? Did you try a smoke test, simply bumping up the build dependency from 2.5.6 to 3.2.9?
FYI, we're doing a 3.2.9 service release in July. Let me know whether there's anything we can do for you there. There'll be a further 3.2.9 service release later this year, if needed.
You could also just overwrite this class.
That is what I did on two projects that are still using Spring 2.X.
After downloading the source add the following:
public static final int JAVA_18 = 5;
...
static{
javaVersion = System.getProperty("java.version");
// version String should look like "1.4.2_10"
if(javaVersion.contains("1.8.")){
majorJavaVersion = JAVA_18;
// System.out.println("JAVA_VERSION: " + javaVersion);
}else if(javaVersion.indexOf("1.7.") != -1){
majorJavaVersion = JAVA_17;
}else if(javaVersion.indexOf("1.6.") != -1){
majorJavaVersion = JAVA_16;
}else if(javaVersion.indexOf("1.5.") != -1){
majorJavaVersion = JAVA_15;
}else{
// else leave 1.4 as default (it's either 1.4 or unknown)
majorJavaVersion = JAVA_14;
}
}
in: coreIssues in core modules (aop, beans, core, context, expression)status: declinedA suggestion or change that we don't feel we should currently applytype: enhancementA general enhancement
Activity
spring-projects-issues commentedon Jun 23, 2014
Juergen Hoeller commented
I'm afraid this is far outside the support range. Spring Framework 2.5.6 got released in 2008, and it just about covers JDK 6 and - de facto - basic JDK 7 compatibility (even if JDK 7 got released as late as 2011). However, 2014's JDK 8 is six years apart - that's just not feasible anymore.
Please upgrade to at least Spring Framework 3.2.9 which does have basic JDK 8 support - and it contains pretty much all of 2.5.6's support classes still: some of them in deprecated form but still working, thus providing a straightforward upgrade path for 2.5.6 users. Have you tried it?
Note that our full JDK 8 story (including JSR-310 support, repeatable annotations, parameter name discovery) is only available in the Spring Framework 4.x line... 3.2.9 just provides basic compatibility with the JDK 8 bytecode level plus a few further runtime compatibility tweaks.
Juergen
spring-projects-issues commentedon Jun 23, 2014
Jocelyn Ntakpe commented
Thanks for your answer.
Our new applications will be developped with spring 4 or spring 4.1. Still we wanted to upgrade old ones to Jdk8 without migrating spring too.
spring-projects-issues commentedon Jun 23, 2014
Juergen Hoeller commented
Any specific reason why upgrading your older apps to Spring Framework 3.2.9 wouldn't work? Did you try a smoke test, simply bumping up the build dependency from 2.5.6 to 3.2.9?
FYI, we're doing a 3.2.9 service release in July. Let me know whether there's anything we can do for you there. There'll be a further 3.2.9 service release later this year, if needed.
Juergen
spring-projects-issues commentedon Jun 23, 2014
Jocelyn Ntakpe commented
Thanks for the advice. Indeed will try 3.2.9 migration.
spring-projects-issues commentedon Jun 8, 2017
C D commented
You could also just overwrite this class.
That is what I did on two projects that are still using Spring 2.X.
After downloading the source add the following:
public static final int JAVA_18 = 5;
...
static{
javaVersion = System.getProperty("java.version");
// version String should look like "1.4.2_10"
if(javaVersion.contains("1.8.")){
majorJavaVersion = JAVA_18;
// System.out.println("JAVA_VERSION: " + javaVersion);
}else if(javaVersion.indexOf("1.7.") != -1){
majorJavaVersion = JAVA_17;
}else if(javaVersion.indexOf("1.6.") != -1){
majorJavaVersion = JAVA_16;
}else if(javaVersion.indexOf("1.5.") != -1){
majorJavaVersion = JAVA_15;
}else{
// else leave 1.4 as default (it's either 1.4 or unknown)
majorJavaVersion = JAVA_14;
}
}