mirror of
https://github.com/itplr-kosit/validator.git
synced 2026-05-26 01:05:38 +00:00
https://github.com/itplr-kosit/validator/issues/56 trim namespaces and other strings when reading the scenarios
This commit is contained in:
parent
9838508f41
commit
ef1ce56f2a
4 changed files with 42 additions and 5 deletions
|
|
@ -0,0 +1,29 @@
|
|||
package de.kosit.validationtool.impl.xml;
|
||||
|
||||
import javax.xml.bind.annotation.adapters.XmlAdapter;
|
||||
|
||||
public class StringTrimAdapter extends XmlAdapter<String, String> {
|
||||
|
||||
@Override
|
||||
public String unmarshal(final String v) {
|
||||
if (v == null) {
|
||||
return null;
|
||||
}
|
||||
return v.trim();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String marshal(final String v) {
|
||||
if (v == null) {
|
||||
return null;
|
||||
}
|
||||
return v.trim();
|
||||
}
|
||||
|
||||
public static String trim(final String v) {
|
||||
if (v == null) {
|
||||
return null;
|
||||
}
|
||||
return v.trim();
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue