Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spring-jdbc-3.2.6.RELEASE doesn't support JDK 5. [SPR-11313] #15937

Closed
spring-projects-issues opened this issue Jan 14, 2014 · 7 comments
Closed

spring-jdbc-3.2.6.RELEASE doesn't support JDK 5. [SPR-11313] #15937

spring-projects-issues opened this issue Jan 14, 2014 · 7 comments
Assignees
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

@spring-projects-issues spring-projects-issues commented Jan 14, 2014

Soungmin Joo opened SPR-11313 and commented

I'm not sure this is really a bug. I thought that spring-jdbc-3.2.6.RELEASE would support JDK 5 because spring-jdbc-3.2.5.RELEASE did so. \ But because StatementCreatorUtils has changed to use Collections.newSetFromMap() method (which is supported from JDK 6) \ when 3.2.5.RELEASE has transfered to 3.2.6.RELEASE, it seems that JdbcTemplate cannot be used with JDK 6 together on spring-jdbc-3.2.6.RELEASE. \Is this really what was supposed to be? \
\

// spring-jdbc-3.2.5.RELEASE.jar
public abstract class StatementCreatorUtils {
    private static final Log logger = LogFactory.getLog(StatementCreatorUtils.class);
    private static Map<Class, Integer> javaTypeToSqlTypeMap = new HashMap<Class, Integer>(32);

// spring-jdbc-3.2.5.RELEASE.jar
public abstract class StatementCreatorUtils {
    private static final Log logger = LogFactory.getLog(StatementCreatorUtils.class);
    static final Set<String> driversWithNoSupportForGetParameterType =
	Collections.newSetFromMap(new ConcurrentHashMap<String, Boolean>(1));

Affects: 3.2.6

Issue Links:

  • #15974 StatementCreatorUtils introduces java 1.6 dependency ("is duplicated by")
  • #15726 performancedrop due to repeated JDBC 3.0 getParameterType calls in setNull in StatementCreatorUtils
  • #15943 Downgrade accidental use of Java 1.7 APIs
  • #15945 Downgrade accidental use of Java 1.6 APIs

Referenced from: commits 62fd12c

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Jan 15, 2014

Stéphane Nicoll commented

See #439

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Jan 15, 2014

Juergen Hoeller commented

This seems like an accidental over-eager backport from the 4.0 branch: We did want to backport #15726 but not Java 6 related StatementCreatorUtils changes from 4.0 there. I'll fix this for 3.2.7.

Stephane, that newSetFromMap change is certainly the immediate cause. I'll double-check the actual backport commits for further accidental effects.

Juergen

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Jan 15, 2014

Juergen Hoeller commented

As of 3.2.7, StatementCreatorUtils uses a ConcurrentHashMap as a fake Set now (with Boolean values), like we do in other places in the 3.2.x codebase. So Java 5 compatibility is restored, preserving the performance characteristics.

Juergen

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Jan 15, 2014

Juergen Hoeller commented

Feel free to give this a try against the current 3.2.7 snapshot: See http://projects.spring.io/spring-framework/ for Maven coordinates. Would be great to know whether it works for you now...

Juergen

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Jan 15, 2014

Soungmin Joo commented

Thank you for the quick response. And I have tried '3.2.7.BUILD-SNAPSHOT' version and I found that it works as usual. \
And it would be great if I could know when the '3.2.7.RELEASE' version would be distributed. \
Thank you.

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Jan 16, 2014

Juergen Hoeller commented

You can always have a look at the specific release details page in JIRA, or at https://jira.springsource.org/browse/SPR#selectedTab=com.atlassian.jira.plugin.system.project%3Aroadmap-panel for an overview of planned dates. We usually list up-to-date targets there.

Anyway, for Spring Framework 3.2.7, it's January 23rd - next Thursday.

Juergen

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Jan 16, 2014

Soungmin Joo commented

Thanks again! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants