Commit 24d119ad authored by WojciechK's avatar WojciechK

Poprawka błędu w mapowaniu danych o posesji / lokalu

parent a8fe898a
......@@ -28,7 +28,7 @@
</scm>
<properties>
<axis2.version>1.7.4</axis2.version>
<java.version>17</java.version>
<java.version>21</java.version>
</properties>
<dependencies>
<dependency>
......
......@@ -121,7 +121,12 @@ public class CompanyInfo {
if (n.getNodeType() == Node.ELEMENT_NODE) {
String name = n.getNodeName();
if(field.equalsIgnoreCase(name)) {
return n.getTextContent();
if(n.getTextContent() != null) {
return n.getTextContent().trim();
}
else{
return "";
}
}
}
}
......@@ -149,9 +154,9 @@ public class CompanyInfo {
Element root = doc.getDocumentElement();
Node dane = root.getElementsByTagName("dane").item(0);
this.KRS = getField(dane, computeFieldName("numerWrejestrzeEwidencji"));
this.Posesja = getField(root, computeFieldName("adSiedzNumerNieruchomosci"));
this.Lokal = getField(root, computeFieldName("adSiedzNumerLokalu"));
this.organRejestrowy = getField(root, computeFieldName("organRejestrowy_Nazwa"));
this.Posesja = getField(dane, computeFieldName("adSiedzNumerNieruchomosci"));
this.Lokal = getField(dane, computeFieldName("adSiedzNumerLokalu"));
this.organRejestrowy = getField(dane, computeFieldName("organRejestrowy_Nazwa"));
}
catch(Exception e){
throw new RuntimeException(e);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment