-
Notifications
You must be signed in to change notification settings - Fork 38.7k
Closed
Closed
Copy link
Labels
in: coreIssues in core modules (aop, beans, core, context, expression)Issues in core modules (aop, beans, core, context, expression)in: dataIssues in data modules (jdbc, orm, oxm, tx)Issues in data modules (jdbc, orm, oxm, tx)type: enhancementA general enhancementA general enhancement
Milestone
Description
Yanming Zhou opened SPR-14948 and commented
Creating DefaultConversionService instance is not so cheap, it's thread-safe, so we can create a default instance.
class DefaultConversionService{
private static volatile ConversionService defaultConversionService;
public static DefaultConversionService getDefaultInstance(){
if (defaultConversionService == null) {
synchronized (DefaultConversionService.class) {
if (defaultConversionService == null) {
defaultConversionService = new DefaultConversionService();
}
}
}
return defaultConversionService;
}
}
It could be used by other class, for example BeanPropertyRowMapper
//private ConversionService conversionService = new DefaultConversionService();
private ConversionService conversionService = DefaultConversionService.getDefaultInstance();
Affects: 4.3.4
Issue Links:
- Ineffective synchronization in StandardTypeConverter constructor [SPR-14465] #19034 Ineffective synchronization in StandardTypeConverter constructor
- BeanPropertyRowMapper should use ConversionService for date-time support [SPR-13888] #18461 BeanPropertyRowMapper should use ConversionService for date-time support
- Update JdbcUtils to improve enum support [SPR-14990] #19556 Update JdbcUtils to improve enum support
Referenced from: commits spring-projects/spring-integration@d96b8e0
Metadata
Metadata
Assignees
Labels
in: coreIssues in core modules (aop, beans, core, context, expression)Issues in core modules (aop, beans, core, context, expression)in: dataIssues in data modules (jdbc, orm, oxm, tx)Issues in data modules (jdbc, orm, oxm, tx)type: enhancementA general enhancementA general enhancement