Skip to content

Commit

Permalink
switch to new Spring API after update
Browse files Browse the repository at this point in the history
  • Loading branch information
derkoe committed Sep 9, 2024
1 parent 5b32813 commit e8efacb
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
12 changes: 11 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,16 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres
to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.9.0] - (https://github.com/porscheinformatik/weblate-spring/compare/v0.8.0...v0.9.0) - unreleased

### BREAKING CHANGES

- Java 17 and Spring Boot 3.x is now required

### Dependencies

- Spring Boot 3 (#82)

## [0.8.0] - (https://github.com/porscheinformatik/weblate-spring/compare/v0.7.1...v0.8.0) - 2023-01-14

### BREAKING CHANGES
Expand Down Expand Up @@ -72,7 +82,7 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

- Spring Boot 2.6.5

## [0.3.1](https://github.com/porscheinformatik/weblate-spring/compare/v0.3.0...v0.3.1) - 2021-11-29
## [0.3.1](https://github.com/porscheinformatik/weblate-spring/compare/v0.3.0...v0.3.1) - 2021-11-29

### Bug Fixes

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ private void loadTranslation(String code, Properties properties, long timestamp)

ResponseEntity<UnitsResponse> response = restTemplate.exchange(request, UnitsResponse.class);
UnitsResponse body = response.getBody();
if (response.getStatusCodeValue() < 200 || response.getStatusCodeValue() >= 300 || body == null) {
if (response.getStatusCode().is2xxSuccessful() || body == null) {
logger.warn(String.format("Got empty or non-200 response (status=%s, body=%s)", response.getStatusCode(),
response.getBody()));
break;
Expand Down Expand Up @@ -447,7 +447,7 @@ private Map<Locale, String> loadCodes() {

ResponseEntity<List<Map<String, Object>>> response = restTemplate.exchange(request, LIST_MAP_STRING_OBJECT);
List<Map<String, Object>> body = response.getBody();
if (response.getStatusCodeValue() >= 200 && response.getStatusCodeValue() < 300 && body != null) {
if (response.getStatusCode().is2xxSuccessful() && body != null) {
existingLocales = body.stream()
.filter(this::containsTranslations)
.map(this::extractCode)
Expand Down

0 comments on commit e8efacb

Please sign in to comment.