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

Remove usage of deprecated APIs #3838

Closed
16 tasks done
fmbenhassine opened this issue Jan 25, 2021 · 2 comments
Closed
16 tasks done

Remove usage of deprecated APIs #3838

fmbenhassine opened this issue Jan 25, 2021 · 2 comments

Comments

@fmbenhassine
Copy link
Contributor

fmbenhassine commented Jan 25, 2021

The following APIs are deprecated but are still used in production/test code. The usage of these APIs should be updated with the suggested replacements in preparation for v5:

Production code

  • org.springframework.beans.factory.config.PropertyPlaceholderConfigurer
  • org.springframework.beans.factory.config.InstantiationAwareBeanPostProcessorAdapter
  • org.springframework.transaction.interceptor.TransactionInterceptor
  • org.springframework.transaction.support.TransactionSynchronizationAdapter
  • org.springframework.core.GenericTypeResolver#resolveParameterType
  • org.springframework.jdbc.core.JdbcOperations#query(java.lang.String, java.lang.Object[], org.springframework.jdbc.core.RowCallbackHandler)
  • org.springframework.jdbc.core.JdbcOperations#queryForObject(java.lang.String, java.lang.Object[], org.springframework.jdbc.core.RowMapper<T>)
  • org.springframework.jdbc.core.JdbcTemplate#query(java.lang.String, java.lang.Object[], org.springframework.jdbc.core.RowMapper<T>)
  • org.hibernate.Query
  • org.springframework.jdbc.support.JdbcUtils#extractDatabaseMetaData(javax.sql.DataSource, java.lang.String)
  • org.springframework.util.StringUtils#isEmpty

Test code

  • org.junit.rules.ExpectedException#none
  • org.junit.Assert#assertThat(T, org.hamcrest.Matcher<? super T>)
  • org.mockito.MockitoAnnotations#initMocks
  • org.mockito.Mockito#verifyZeroInteractions
  • org.mockito.Matchers
@snate
Copy link

snate commented Jul 9, 2021

Hi @benas , I tried to implement some of the changes for the test code in a PR.
Could you please have a look? Would it be better to have all changes for the test code in that PR?

@fmbenhassine
Copy link
Contributor Author

Hi @snate , thank you for your PR! I will take a look asap. It's ok to have multiple PRs for this.

fmbenhassine pushed a commit that referenced this issue Aug 10, 2021
The following deprecated APIs are not in use anymore in the project's tests:
- `org.junit.rules.ExpectedException#none`
- `org.mockito.MockitoAnnotations#initMocks`
- `org.mockito.Mockito#verifyZeroInteractions`

Issue #3838
fmbenhassine added a commit that referenced this issue Aug 10, 2021
- Fix failing tests
- Update year in license headers

Related to #3838
fmbenhassine pushed a commit that referenced this issue Aug 11, 2021
Replaces the deprecated
- type InstantiationAwareBeanPostProcessorAdapter
- type GenericTypeResolver
- method StringUtils::isEmpty
- field BigDecimal::ROUND_HALF_UP

Issue #3838
fmbenhassine added a commit that referenced this issue Aug 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants