Skip to content

Commit

Permalink
Merge pull request #110 from InseeFr/fix/addresse-whitespace-split-error
Browse files Browse the repository at this point in the history
prevent buggy splits on wrong addresses
  • Loading branch information
BettyB979 authored Oct 3, 2023
2 parents 2956a4b + 157d558 commit ac2ddaf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
17 changes: 7 additions & 10 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>fr.insee.pearljam</groupId>
<artifactId>pearljam-back-office</artifactId>
<version>4.0.8</version>
<version>4.0.9</version>

<packaging>war</packaging>
<name>Pearl-Jam-Back-Office</name>
<description>Back-office services for for PearlJam</description>
Expand All @@ -25,6 +26,7 @@
<log4j.version>2.17.1</log4j.version>
<maven.compiler.release>11</maven.compiler.release>
<testcontainers.version>1.15.2</testcontainers.version>
<keycloak.version>19.0.3</keycloak.version>
</properties>

<dependencyManagement>
Expand Down Expand Up @@ -245,20 +247,15 @@
</dependency>

<!-- Keycloak -->
<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-spring-boot-2-starter</artifactId>
<version>4.0.0.Final</version>
</dependency>
<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-spring-security-adapter</artifactId>
<version>7.0.0</version>
<version>${keycloak.version}</version>
</dependency>
<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-spring-boot-starter</artifactId>
<version>7.0.0</version>
<version>${keycloak.version}</version>
</dependency>

<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public SurveyUnitCampaignDto(SurveyUnit su) {
}
if(su.getAddress() instanceof InseeAddress
&& ((InseeAddress)su.getAddress()).getL6() != null
&& ((InseeAddress)su.getAddress()).getL6().contains(" ")) {
&& ((InseeAddress)su.getAddress()).getL6().trim().contains(" ")) {
String locationAndCity = ((InseeAddress)su.getAddress()).getL6();
String[] splittedCityName=locationAndCity.split(" ");
this.location = splittedCityName[0];
Expand Down

0 comments on commit ac2ddaf

Please sign in to comment.