Project
IntelliJ IDEA
Priority
Major
Type
Feature
Fix versions
10.5
State
Fixed
Assignee
Dmitry Avdeev
Subsystem
Spring
Affected versions
No Affected versions
Fixed in build
108.65  
  • Created by   Mark Vedder
    3 years ago (20 Sep 2008 04:02)
  • Updated by   Dmitry Avdeev
    12 months ago (28 Apr 2011 15:23)
  • Jira: IDEADEV-30456
    (history, comments)
 
IDEA-45786 Spring: flag use of deprecated class in beans configuration file
7
Issue is visible to: All Users
  The issue is visible to the selected user group only
It would be very useful if the deprecated classes, when used in the Spring beans configuration file, were flagged with a warning. Take the following for example:

<bean id="ourDataSource" class="oracle.jdbc.pool.OracleConnectionCacheImpl">
    <property name="URL" value="${dataSource.url}" />
    <property name="user" value="${dataSource.user}" />
    <property name="password" value="${dataSource.password}" />
</bean>

<bean id="simpleJdbcTemplate" class="org.springframework.jdbc.core.simple.SimpleJdbcTemplate">
    <constructor-arg index="0" ref="ourDataSource" />
</bean>


OracleConnectionCacheImpl is a deprecated class. But because the only place its appears – since the bean that uses it takes a DataSource – is in the beans configuration file, the developer is never alerted to using a deprecated class. And since it is not used until run time, he doesn't even get a compiler warning to alert him to the issue. So it would be useful for IDEA to flag this class entry with a warning like IDEA would in Java code:

class="oracle.jdbc.pool.-OracleConnectionCacheImpl-"
Comments (4)
 
History
 
Linked Issues (?)
 
Yann Cébron
  Yann Cébron
22 Sep 2008 12:16
3 years ago
for all DOM-files, not just Spring?
Dmitry Avdeev
  Dmitry Avdeev
22 Sep 2008 12:41
3 years ago
Yes, it seems to be a nice feature.
Bryan Young
  Bryan Young
26 Apr 2011 22:23
12 months ago
How is this not fixed? This isn't a grand fanciful feature that no one will ever use. People use both Spring and IDEA every day. Not having this makes deprecation effectively useless in Spring shops. No one else is frustrated by this?
Taras Tielkes
  Taras Tielkes
27 Apr 2011 02:26
12 months ago
Could be provided for individual properties as well