diff --git a/api-openbis-java/source/java/ch/ethz/sis/openbis/generic/asapi/v3/dto/dataset/DataSet.java b/api-openbis-java/source/java/ch/ethz/sis/openbis/generic/asapi/v3/dto/dataset/DataSet.java index c4e0fabfe70b1d87337f563accc2e8bdea8dcfd0..5596ba677d94d593c8f17e0af960c46c8711cdcf 100644 --- a/api-openbis-java/source/java/ch/ethz/sis/openbis/generic/asapi/v3/dto/dataset/DataSet.java +++ b/api-openbis-java/source/java/ch/ethz/sis/openbis/generic/asapi/v3/dto/dataset/DataSet.java @@ -974,7 +974,7 @@ public class DataSet implements Serializable, ICodeHolder, IEntityTypeHolder, IE public Long getIntegerProperty(String propertyName) { String propertyValue = getProperty(propertyName); - return (propertyValue == null || propertyValue.isBlank()) ? null : Long.parseLong(propertyValue); + return (propertyValue == null || propertyValue.trim().isEmpty()) ? null : Long.parseLong(propertyValue); } @Override @@ -1011,7 +1011,7 @@ public class DataSet implements Serializable, ICodeHolder, IEntityTypeHolder, IE public Double getRealProperty(String propertyName) { String propertyValue = getProperty(propertyName); - return (propertyValue == null || propertyValue.isBlank()) ? null : Double.parseDouble(propertyValue); + return (propertyValue == null || propertyValue.trim().isEmpty()) ? null : Double.parseDouble(propertyValue); } @Override @@ -1038,7 +1038,7 @@ public class DataSet implements Serializable, ICodeHolder, IEntityTypeHolder, IE public Boolean getBooleanProperty(String propertyName) { String propertyValue = getProperty(propertyName); - return (propertyValue == null || propertyValue.isBlank()) ? null : Boolean.parseBoolean(propertyValue); + return (propertyValue == null || propertyValue.trim().isEmpty()) ? null : Boolean.parseBoolean(propertyValue); } @Override @@ -1087,7 +1087,7 @@ public class DataSet implements Serializable, ICodeHolder, IEntityTypeHolder, IE public SamplePermId getSampleProperty(String propertyName) { String propertyValue = getProperty(propertyName); - return (propertyValue == null || propertyValue.isBlank()) ? null : new SamplePermId(propertyValue); + return (propertyValue == null || propertyValue.trim().isEmpty()) ? null : new SamplePermId(propertyValue); } @Override @@ -1100,7 +1100,7 @@ public class DataSet implements Serializable, ICodeHolder, IEntityTypeHolder, IE public Long[] getIntegerArrayProperty(String propertyName) { String propertyValue = getProperty(propertyName); - return (propertyValue == null || propertyValue.isBlank()) ? null : Arrays.stream(propertyValue.split(",")).map(String::trim).map(Long::parseLong).toArray(Long[]::new); + return (propertyValue == null || propertyValue.trim().isEmpty()) ? null : Arrays.stream(propertyValue.split(",")).map(String::trim).map(Long::parseLong).toArray(Long[]::new); } @Override @@ -1113,7 +1113,7 @@ public class DataSet implements Serializable, ICodeHolder, IEntityTypeHolder, IE public Double[] getRealArrayProperty(String propertyName) { String propertyValue = getProperty(propertyName); - return (propertyValue == null || propertyValue.isBlank()) ? null : Arrays.stream(propertyValue.split(",")).map(String::trim).map(Double::parseDouble).toArray(Double[]::new); + return (propertyValue == null || propertyValue.trim().isEmpty()) ? null : Arrays.stream(propertyValue.split(",")).map(String::trim).map(Double::parseDouble).toArray(Double[]::new); } @Override @@ -1126,7 +1126,7 @@ public class DataSet implements Serializable, ICodeHolder, IEntityTypeHolder, IE public String[] getStringArrayProperty(String propertyName) { String propertyValue = getProperty(propertyName); - return (propertyValue == null || propertyValue.isBlank()) ? null : Arrays.stream(propertyValue.split(",")).map(String::trim).toArray(String[]::new); + return (propertyValue == null || propertyValue.trim().isEmpty()) ? null : Arrays.stream(propertyValue.split(",")).map(String::trim).toArray(String[]::new); } @Override diff --git a/api-openbis-java/source/java/ch/ethz/sis/openbis/generic/asapi/v3/dto/dataset/create/DataSetCreation.java b/api-openbis-java/source/java/ch/ethz/sis/openbis/generic/asapi/v3/dto/dataset/create/DataSetCreation.java index 484761aac7280276aaf5ac2ee4feba05e96fcbca..b28ed7571f3c814c2ed7f1c74c6efd5b2c488d7b 100644 --- a/api-openbis-java/source/java/ch/ethz/sis/openbis/generic/asapi/v3/dto/dataset/create/DataSetCreation.java +++ b/api-openbis-java/source/java/ch/ethz/sis/openbis/generic/asapi/v3/dto/dataset/create/DataSetCreation.java @@ -306,7 +306,7 @@ public class DataSetCreation implements ICreation, ICreationIdHolder, IObjectCre public Long getIntegerProperty(String propertyName) { String propertyValue = getProperty(propertyName); - return (propertyValue == null || propertyValue.isBlank()) ? null : Long.parseLong(propertyValue); + return (propertyValue == null || propertyValue.trim().isEmpty()) ? null : Long.parseLong(propertyValue); } @Override @@ -343,7 +343,7 @@ public class DataSetCreation implements ICreation, ICreationIdHolder, IObjectCre public Double getRealProperty(String propertyName) { String propertyValue = getProperty(propertyName); - return (propertyValue == null || propertyValue.isBlank()) ? null : Double.parseDouble(propertyValue); + return (propertyValue == null || propertyValue.trim().isEmpty()) ? null : Double.parseDouble(propertyValue); } @Override @@ -370,7 +370,7 @@ public class DataSetCreation implements ICreation, ICreationIdHolder, IObjectCre public Boolean getBooleanProperty(String propertyName) { String propertyValue = getProperty(propertyName); - return (propertyValue == null || propertyValue.isBlank()) ? null : Boolean.parseBoolean(propertyValue); + return (propertyValue == null || propertyValue.trim().isEmpty()) ? null : Boolean.parseBoolean(propertyValue); } @Override @@ -419,7 +419,7 @@ public class DataSetCreation implements ICreation, ICreationIdHolder, IObjectCre public SamplePermId getSampleProperty(String propertyName) { String propertyValue = getProperty(propertyName); - return (propertyValue == null || propertyValue.isBlank()) ? null : new SamplePermId(propertyValue); + return (propertyValue == null || propertyValue.trim().isEmpty()) ? null : new SamplePermId(propertyValue); } @Override @@ -432,7 +432,7 @@ public class DataSetCreation implements ICreation, ICreationIdHolder, IObjectCre public Long[] getIntegerArrayProperty(String propertyName) { String propertyValue = getProperty(propertyName); - return (propertyValue == null || propertyValue.isBlank()) ? null : Arrays.stream(propertyValue.split(",")).map(String::trim).map(Long::parseLong).toArray(Long[]::new); + return (propertyValue == null || propertyValue.trim().isEmpty()) ? null : Arrays.stream(propertyValue.split(",")).map(String::trim).map(Long::parseLong).toArray(Long[]::new); } @Override @@ -445,7 +445,7 @@ public class DataSetCreation implements ICreation, ICreationIdHolder, IObjectCre public Double[] getRealArrayProperty(String propertyName) { String propertyValue = getProperty(propertyName); - return (propertyValue == null || propertyValue.isBlank()) ? null : Arrays.stream(propertyValue.split(",")).map(String::trim).map(Double::parseDouble).toArray(Double[]::new); + return (propertyValue == null || propertyValue.trim().isEmpty()) ? null : Arrays.stream(propertyValue.split(",")).map(String::trim).map(Double::parseDouble).toArray(Double[]::new); } @Override @@ -458,7 +458,7 @@ public class DataSetCreation implements ICreation, ICreationIdHolder, IObjectCre public String[] getStringArrayProperty(String propertyName) { String propertyValue = getProperty(propertyName); - return (propertyValue == null || propertyValue.isBlank()) ? null : Arrays.stream(propertyValue.split(",")).map(String::trim).toArray(String[]::new); + return (propertyValue == null || propertyValue.trim().isEmpty()) ? null : Arrays.stream(propertyValue.split(",")).map(String::trim).toArray(String[]::new); } @Override diff --git a/api-openbis-java/source/java/ch/ethz/sis/openbis/generic/asapi/v3/dto/dataset/update/DataSetUpdate.java b/api-openbis-java/source/java/ch/ethz/sis/openbis/generic/asapi/v3/dto/dataset/update/DataSetUpdate.java index 854151d77d55ee2bbf0017ede7e502b7c623f0c0..a3ace513f77dd5ab591dc848d027d5f047788049 100644 --- a/api-openbis-java/source/java/ch/ethz/sis/openbis/generic/asapi/v3/dto/dataset/update/DataSetUpdate.java +++ b/api-openbis-java/source/java/ch/ethz/sis/openbis/generic/asapi/v3/dto/dataset/update/DataSetUpdate.java @@ -314,7 +314,7 @@ public class DataSetUpdate implements IUpdate, IObjectUpdate<IDataSetId>, IPrope public Long getIntegerProperty(String propertyName) { String propertyValue = getProperty(propertyName); - return (propertyValue == null || propertyValue.isBlank()) ? null : Long.parseLong(propertyValue); + return (propertyValue == null || propertyValue.trim().isEmpty()) ? null : Long.parseLong(propertyValue); } @Override @@ -351,7 +351,7 @@ public class DataSetUpdate implements IUpdate, IObjectUpdate<IDataSetId>, IPrope public Double getRealProperty(String propertyName) { String propertyValue = getProperty(propertyName); - return (propertyValue == null || propertyValue.isBlank()) ? null : Double.parseDouble(propertyValue); + return (propertyValue == null || propertyValue.trim().isEmpty()) ? null : Double.parseDouble(propertyValue); } @Override @@ -378,7 +378,7 @@ public class DataSetUpdate implements IUpdate, IObjectUpdate<IDataSetId>, IPrope public Boolean getBooleanProperty(String propertyName) { String propertyValue = getProperty(propertyName); - return (propertyValue == null || propertyValue.isBlank()) ? null : Boolean.parseBoolean(propertyValue); + return (propertyValue == null || propertyValue.trim().isEmpty()) ? null : Boolean.parseBoolean(propertyValue); } @Override @@ -427,7 +427,7 @@ public class DataSetUpdate implements IUpdate, IObjectUpdate<IDataSetId>, IPrope public SamplePermId getSampleProperty(String propertyName) { String propertyValue = getProperty(propertyName); - return (propertyValue == null || propertyValue.isBlank()) ? null : new SamplePermId(propertyValue); + return (propertyValue == null || propertyValue.trim().isEmpty()) ? null : new SamplePermId(propertyValue); } @Override @@ -440,7 +440,7 @@ public class DataSetUpdate implements IUpdate, IObjectUpdate<IDataSetId>, IPrope public Long[] getIntegerArrayProperty(String propertyName) { String propertyValue = getProperty(propertyName); - return (propertyValue == null || propertyValue.isBlank()) ? null : Arrays.stream(propertyValue.split(",")).map(String::trim).map(Long::parseLong).toArray(Long[]::new); + return (propertyValue == null || propertyValue.trim().isEmpty()) ? null : Arrays.stream(propertyValue.split(",")).map(String::trim).map(Long::parseLong).toArray(Long[]::new); } @Override @@ -453,7 +453,7 @@ public class DataSetUpdate implements IUpdate, IObjectUpdate<IDataSetId>, IPrope public Double[] getRealArrayProperty(String propertyName) { String propertyValue = getProperty(propertyName); - return (propertyValue == null || propertyValue.isBlank()) ? null : Arrays.stream(propertyValue.split(",")).map(String::trim).map(Double::parseDouble).toArray(Double[]::new); + return (propertyValue == null || propertyValue.trim().isEmpty()) ? null : Arrays.stream(propertyValue.split(",")).map(String::trim).map(Double::parseDouble).toArray(Double[]::new); } @Override @@ -466,7 +466,7 @@ public class DataSetUpdate implements IUpdate, IObjectUpdate<IDataSetId>, IPrope public String[] getStringArrayProperty(String propertyName) { String propertyValue = getProperty(propertyName); - return (propertyValue == null || propertyValue.isBlank()) ? null : Arrays.stream(propertyValue.split(",")).map(String::trim).toArray(String[]::new); + return (propertyValue == null || propertyValue.trim().isEmpty()) ? null : Arrays.stream(propertyValue.split(",")).map(String::trim).toArray(String[]::new); } @Override diff --git a/api-openbis-java/source/java/ch/ethz/sis/openbis/generic/asapi/v3/dto/experiment/Experiment.java b/api-openbis-java/source/java/ch/ethz/sis/openbis/generic/asapi/v3/dto/experiment/Experiment.java index 46a4389f362e7d15d6ba63f358dba4c53963b9d4..fb39da239ecccedca5c2d0a09b185dd223d81fec 100644 --- a/api-openbis-java/source/java/ch/ethz/sis/openbis/generic/asapi/v3/dto/experiment/Experiment.java +++ b/api-openbis-java/source/java/ch/ethz/sis/openbis/generic/asapi/v3/dto/experiment/Experiment.java @@ -664,7 +664,7 @@ public class Experiment implements Serializable, IAttachmentsHolder, ICodeHolder public Long getIntegerProperty(String propertyName) { String propertyValue = getProperty(propertyName); - return (propertyValue == null || propertyValue.isBlank()) ? null : Long.parseLong(propertyValue); + return (propertyValue == null || propertyValue.trim().isEmpty()) ? null : Long.parseLong(propertyValue); } @Override @@ -701,7 +701,7 @@ public class Experiment implements Serializable, IAttachmentsHolder, ICodeHolder public Double getRealProperty(String propertyName) { String propertyValue = getProperty(propertyName); - return (propertyValue == null || propertyValue.isBlank()) ? null : Double.parseDouble(propertyValue); + return (propertyValue == null || propertyValue.trim().isEmpty()) ? null : Double.parseDouble(propertyValue); } @Override @@ -728,7 +728,7 @@ public class Experiment implements Serializable, IAttachmentsHolder, ICodeHolder public Boolean getBooleanProperty(String propertyName) { String propertyValue = getProperty(propertyName); - return (propertyValue == null || propertyValue.isBlank()) ? null : Boolean.parseBoolean(propertyValue); + return (propertyValue == null || propertyValue.trim().isEmpty()) ? null : Boolean.parseBoolean(propertyValue); } @Override @@ -777,7 +777,7 @@ public class Experiment implements Serializable, IAttachmentsHolder, ICodeHolder public SamplePermId getSampleProperty(String propertyName) { String propertyValue = getProperty(propertyName); - return (propertyValue == null || propertyValue.isBlank()) ? null : new SamplePermId(propertyValue); + return (propertyValue == null || propertyValue.trim().isEmpty()) ? null : new SamplePermId(propertyValue); } @Override @@ -790,7 +790,7 @@ public class Experiment implements Serializable, IAttachmentsHolder, ICodeHolder public Long[] getIntegerArrayProperty(String propertyName) { String propertyValue = getProperty(propertyName); - return (propertyValue == null || propertyValue.isBlank()) ? null : Arrays.stream(propertyValue.split(",")).map(String::trim).map(Long::parseLong).toArray(Long[]::new); + return (propertyValue == null || propertyValue.trim().isEmpty()) ? null : Arrays.stream(propertyValue.split(",")).map(String::trim).map(Long::parseLong).toArray(Long[]::new); } @Override @@ -803,7 +803,7 @@ public class Experiment implements Serializable, IAttachmentsHolder, ICodeHolder public Double[] getRealArrayProperty(String propertyName) { String propertyValue = getProperty(propertyName); - return (propertyValue == null || propertyValue.isBlank()) ? null : Arrays.stream(propertyValue.split(",")).map(String::trim).map(Double::parseDouble).toArray(Double[]::new); + return (propertyValue == null || propertyValue.trim().isEmpty()) ? null : Arrays.stream(propertyValue.split(",")).map(String::trim).map(Double::parseDouble).toArray(Double[]::new); } @Override @@ -816,7 +816,7 @@ public class Experiment implements Serializable, IAttachmentsHolder, ICodeHolder public String[] getStringArrayProperty(String propertyName) { String propertyValue = getProperty(propertyName); - return (propertyValue == null || propertyValue.isBlank()) ? null : Arrays.stream(propertyValue.split(",")).map(String::trim).toArray(String[]::new); + return (propertyValue == null || propertyValue.trim().isEmpty()) ? null : Arrays.stream(propertyValue.split(",")).map(String::trim).toArray(String[]::new); } @Override diff --git a/api-openbis-java/source/java/ch/ethz/sis/openbis/generic/asapi/v3/dto/experiment/create/ExperimentCreation.java b/api-openbis-java/source/java/ch/ethz/sis/openbis/generic/asapi/v3/dto/experiment/create/ExperimentCreation.java index b2f23c5bd311331c7a8c2f8a4b6d5b60c72f9e39..e08d0062834de4631fa540d08be08601dc5e34c2 100644 --- a/api-openbis-java/source/java/ch/ethz/sis/openbis/generic/asapi/v3/dto/experiment/create/ExperimentCreation.java +++ b/api-openbis-java/source/java/ch/ethz/sis/openbis/generic/asapi/v3/dto/experiment/create/ExperimentCreation.java @@ -159,7 +159,7 @@ public class ExperimentCreation implements ICreation, IObjectCreation, ICreation public Long getIntegerProperty(String propertyName) { String propertyValue = getProperty(propertyName); - return (propertyValue == null || propertyValue.isBlank()) ? null : Long.parseLong(propertyValue); + return (propertyValue == null || propertyValue.trim().isEmpty()) ? null : Long.parseLong(propertyValue); } @Override @@ -196,7 +196,7 @@ public class ExperimentCreation implements ICreation, IObjectCreation, ICreation public Double getRealProperty(String propertyName) { String propertyValue = getProperty(propertyName); - return (propertyValue == null || propertyValue.isBlank()) ? null : Double.parseDouble(propertyValue); + return (propertyValue == null || propertyValue.trim().isEmpty()) ? null : Double.parseDouble(propertyValue); } @Override @@ -223,7 +223,7 @@ public class ExperimentCreation implements ICreation, IObjectCreation, ICreation public Boolean getBooleanProperty(String propertyName) { String propertyValue = getProperty(propertyName); - return (propertyValue == null || propertyValue.isBlank()) ? null : Boolean.parseBoolean(propertyValue); + return (propertyValue == null || propertyValue.trim().isEmpty()) ? null : Boolean.parseBoolean(propertyValue); } @Override @@ -272,7 +272,7 @@ public class ExperimentCreation implements ICreation, IObjectCreation, ICreation public SamplePermId getSampleProperty(String propertyName) { String propertyValue = getProperty(propertyName); - return (propertyValue == null || propertyValue.isBlank()) ? null : new SamplePermId(propertyValue); + return (propertyValue == null || propertyValue.trim().isEmpty()) ? null : new SamplePermId(propertyValue); } @Override @@ -285,7 +285,7 @@ public class ExperimentCreation implements ICreation, IObjectCreation, ICreation public Long[] getIntegerArrayProperty(String propertyName) { String propertyValue = getProperty(propertyName); - return (propertyValue == null || propertyValue.isBlank()) ? null : Arrays.stream(propertyValue.split(",")).map(String::trim).map(Long::parseLong).toArray(Long[]::new); + return (propertyValue == null || propertyValue.trim().isEmpty()) ? null : Arrays.stream(propertyValue.split(",")).map(String::trim).map(Long::parseLong).toArray(Long[]::new); } @Override @@ -298,7 +298,7 @@ public class ExperimentCreation implements ICreation, IObjectCreation, ICreation public Double[] getRealArrayProperty(String propertyName) { String propertyValue = getProperty(propertyName); - return (propertyValue == null || propertyValue.isBlank()) ? null : Arrays.stream(propertyValue.split(",")).map(String::trim).map(Double::parseDouble).toArray(Double[]::new); + return (propertyValue == null || propertyValue.trim().isEmpty()) ? null : Arrays.stream(propertyValue.split(",")).map(String::trim).map(Double::parseDouble).toArray(Double[]::new); } @Override @@ -311,7 +311,7 @@ public class ExperimentCreation implements ICreation, IObjectCreation, ICreation public String[] getStringArrayProperty(String propertyName) { String propertyValue = getProperty(propertyName); - return (propertyValue == null || propertyValue.isBlank()) ? null : Arrays.stream(propertyValue.split(",")).map(String::trim).toArray(String[]::new); + return (propertyValue == null || propertyValue.trim().isEmpty()) ? null : Arrays.stream(propertyValue.split(",")).map(String::trim).toArray(String[]::new); } @Override diff --git a/api-openbis-java/source/java/ch/ethz/sis/openbis/generic/asapi/v3/dto/experiment/update/ExperimentUpdate.java b/api-openbis-java/source/java/ch/ethz/sis/openbis/generic/asapi/v3/dto/experiment/update/ExperimentUpdate.java index 3b9819fde9f2dcc2ed5418c30b26434a294bdd9e..45bf57e3cff5753ec4e1fa5eac6906ccbca32af5 100644 --- a/api-openbis-java/source/java/ch/ethz/sis/openbis/generic/asapi/v3/dto/experiment/update/ExperimentUpdate.java +++ b/api-openbis-java/source/java/ch/ethz/sis/openbis/generic/asapi/v3/dto/experiment/update/ExperimentUpdate.java @@ -191,7 +191,7 @@ public class ExperimentUpdate implements IUpdate, IObjectUpdate<IExperimentId>, public Long getIntegerProperty(String propertyName) { String propertyValue = getProperty(propertyName); - return (propertyValue == null || propertyValue.isBlank()) ? null : Long.parseLong(propertyValue); + return (propertyValue == null || propertyValue.trim().isEmpty()) ? null : Long.parseLong(propertyValue); } @Override @@ -228,7 +228,7 @@ public class ExperimentUpdate implements IUpdate, IObjectUpdate<IExperimentId>, public Double getRealProperty(String propertyName) { String propertyValue = getProperty(propertyName); - return (propertyValue == null || propertyValue.isBlank()) ? null : Double.parseDouble(propertyValue); + return (propertyValue == null || propertyValue.trim().isEmpty()) ? null : Double.parseDouble(propertyValue); } @Override @@ -255,7 +255,7 @@ public class ExperimentUpdate implements IUpdate, IObjectUpdate<IExperimentId>, public Boolean getBooleanProperty(String propertyName) { String propertyValue = getProperty(propertyName); - return (propertyValue == null || propertyValue.isBlank()) ? null : Boolean.parseBoolean(propertyValue); + return (propertyValue == null || propertyValue.trim().isEmpty()) ? null : Boolean.parseBoolean(propertyValue); } @Override @@ -304,7 +304,7 @@ public class ExperimentUpdate implements IUpdate, IObjectUpdate<IExperimentId>, public SamplePermId getSampleProperty(String propertyName) { String propertyValue = getProperty(propertyName); - return (propertyValue == null || propertyValue.isBlank()) ? null : new SamplePermId(propertyValue); + return (propertyValue == null || propertyValue.trim().isEmpty()) ? null : new SamplePermId(propertyValue); } @Override @@ -317,7 +317,7 @@ public class ExperimentUpdate implements IUpdate, IObjectUpdate<IExperimentId>, public Long[] getIntegerArrayProperty(String propertyName) { String propertyValue = getProperty(propertyName); - return (propertyValue == null || propertyValue.isBlank()) ? null : Arrays.stream(propertyValue.split(",")).map(String::trim).map(Long::parseLong).toArray(Long[]::new); + return (propertyValue == null || propertyValue.trim().isEmpty()) ? null : Arrays.stream(propertyValue.split(",")).map(String::trim).map(Long::parseLong).toArray(Long[]::new); } @Override @@ -330,7 +330,7 @@ public class ExperimentUpdate implements IUpdate, IObjectUpdate<IExperimentId>, public Double[] getRealArrayProperty(String propertyName) { String propertyValue = getProperty(propertyName); - return (propertyValue == null || propertyValue.isBlank()) ? null : Arrays.stream(propertyValue.split(",")).map(String::trim).map(Double::parseDouble).toArray(Double[]::new); + return (propertyValue == null || propertyValue.trim().isEmpty()) ? null : Arrays.stream(propertyValue.split(",")).map(String::trim).map(Double::parseDouble).toArray(Double[]::new); } @Override @@ -343,7 +343,7 @@ public class ExperimentUpdate implements IUpdate, IObjectUpdate<IExperimentId>, public String[] getStringArrayProperty(String propertyName) { String propertyValue = getProperty(propertyName); - return (propertyValue == null || propertyValue.isBlank()) ? null : Arrays.stream(propertyValue.split(",")).map(String::trim).toArray(String[]::new); + return (propertyValue == null || propertyValue.trim().isEmpty()) ? null : Arrays.stream(propertyValue.split(",")).map(String::trim).toArray(String[]::new); } @Override diff --git a/api-openbis-java/source/java/ch/ethz/sis/openbis/generic/asapi/v3/dto/material/Material.java b/api-openbis-java/source/java/ch/ethz/sis/openbis/generic/asapi/v3/dto/material/Material.java index 78306cc86dce27bfc7ce24901891cf04793addc5..aec4c5169ebfdf4b5df82457ee62239ccf887ec7 100644 --- a/api-openbis-java/source/java/ch/ethz/sis/openbis/generic/asapi/v3/dto/material/Material.java +++ b/api-openbis-java/source/java/ch/ethz/sis/openbis/generic/asapi/v3/dto/material/Material.java @@ -322,7 +322,7 @@ public class Material implements Serializable, ICodeHolder, IEntityTypeHolder, I public Long getIntegerProperty(String propertyName) { String propertyValue = getProperty(propertyName); - return (propertyValue == null || propertyValue.isBlank()) ? null : Long.parseLong(propertyValue); + return (propertyValue == null || propertyValue.trim().isEmpty()) ? null : Long.parseLong(propertyValue); } @Override @@ -359,7 +359,7 @@ public class Material implements Serializable, ICodeHolder, IEntityTypeHolder, I public Double getRealProperty(String propertyName) { String propertyValue = getProperty(propertyName); - return (propertyValue == null || propertyValue.isBlank()) ? null : Double.parseDouble(propertyValue); + return (propertyValue == null || propertyValue.trim().isEmpty()) ? null : Double.parseDouble(propertyValue); } @Override @@ -386,7 +386,7 @@ public class Material implements Serializable, ICodeHolder, IEntityTypeHolder, I public Boolean getBooleanProperty(String propertyName) { String propertyValue = getProperty(propertyName); - return (propertyValue == null || propertyValue.isBlank()) ? null : Boolean.parseBoolean(propertyValue); + return (propertyValue == null || propertyValue.trim().isEmpty()) ? null : Boolean.parseBoolean(propertyValue); } @Override @@ -435,7 +435,7 @@ public class Material implements Serializable, ICodeHolder, IEntityTypeHolder, I public SamplePermId getSampleProperty(String propertyName) { String propertyValue = getProperty(propertyName); - return (propertyValue == null || propertyValue.isBlank()) ? null : new SamplePermId(propertyValue); + return (propertyValue == null || propertyValue.trim().isEmpty()) ? null : new SamplePermId(propertyValue); } @Override @@ -448,7 +448,7 @@ public class Material implements Serializable, ICodeHolder, IEntityTypeHolder, I public Long[] getIntegerArrayProperty(String propertyName) { String propertyValue = getProperty(propertyName); - return (propertyValue == null || propertyValue.isBlank()) ? null : Arrays.stream(propertyValue.split(",")).map(String::trim).map(Long::parseLong).toArray(Long[]::new); + return (propertyValue == null || propertyValue.trim().isEmpty()) ? null : Arrays.stream(propertyValue.split(",")).map(String::trim).map(Long::parseLong).toArray(Long[]::new); } @Override @@ -461,7 +461,7 @@ public class Material implements Serializable, ICodeHolder, IEntityTypeHolder, I public Double[] getRealArrayProperty(String propertyName) { String propertyValue = getProperty(propertyName); - return (propertyValue == null || propertyValue.isBlank()) ? null : Arrays.stream(propertyValue.split(",")).map(String::trim).map(Double::parseDouble).toArray(Double[]::new); + return (propertyValue == null || propertyValue.trim().isEmpty()) ? null : Arrays.stream(propertyValue.split(",")).map(String::trim).map(Double::parseDouble).toArray(Double[]::new); } @Override @@ -474,7 +474,7 @@ public class Material implements Serializable, ICodeHolder, IEntityTypeHolder, I public String[] getStringArrayProperty(String propertyName) { String propertyValue = getProperty(propertyName); - return (propertyValue == null || propertyValue.isBlank()) ? null : Arrays.stream(propertyValue.split(",")).map(String::trim).toArray(String[]::new); + return (propertyValue == null || propertyValue.trim().isEmpty()) ? null : Arrays.stream(propertyValue.split(",")).map(String::trim).toArray(String[]::new); } @Override diff --git a/api-openbis-java/source/java/ch/ethz/sis/openbis/generic/asapi/v3/dto/material/create/MaterialCreation.java b/api-openbis-java/source/java/ch/ethz/sis/openbis/generic/asapi/v3/dto/material/create/MaterialCreation.java index 9d3349c44a6c296adb7af42758e5ebaac19e69f5..9a71e049081625ffa1f4c7e55449f3bb73e49212 100644 --- a/api-openbis-java/source/java/ch/ethz/sis/openbis/generic/asapi/v3/dto/material/create/MaterialCreation.java +++ b/api-openbis-java/source/java/ch/ethz/sis/openbis/generic/asapi/v3/dto/material/create/MaterialCreation.java @@ -133,7 +133,7 @@ public class MaterialCreation implements ICreation, IObjectCreation, ICreationId public Long getIntegerProperty(String propertyName) { String propertyValue = getProperty(propertyName); - return (propertyValue == null || propertyValue.isBlank()) ? null : Long.parseLong(propertyValue); + return (propertyValue == null || propertyValue.trim().isEmpty()) ? null : Long.parseLong(propertyValue); } @Override @@ -170,7 +170,7 @@ public class MaterialCreation implements ICreation, IObjectCreation, ICreationId public Double getRealProperty(String propertyName) { String propertyValue = getProperty(propertyName); - return (propertyValue == null || propertyValue.isBlank()) ? null : Double.parseDouble(propertyValue); + return (propertyValue == null || propertyValue.trim().isEmpty()) ? null : Double.parseDouble(propertyValue); } @Override @@ -197,7 +197,7 @@ public class MaterialCreation implements ICreation, IObjectCreation, ICreationId public Boolean getBooleanProperty(String propertyName) { String propertyValue = getProperty(propertyName); - return (propertyValue == null || propertyValue.isBlank()) ? null : Boolean.parseBoolean(propertyValue); + return (propertyValue == null || propertyValue.trim().isEmpty()) ? null : Boolean.parseBoolean(propertyValue); } @Override @@ -246,7 +246,7 @@ public class MaterialCreation implements ICreation, IObjectCreation, ICreationId public SamplePermId getSampleProperty(String propertyName) { String propertyValue = getProperty(propertyName); - return (propertyValue == null || propertyValue.isBlank()) ? null : new SamplePermId(propertyValue); + return (propertyValue == null || propertyValue.trim().isEmpty()) ? null : new SamplePermId(propertyValue); } @Override @@ -259,7 +259,7 @@ public class MaterialCreation implements ICreation, IObjectCreation, ICreationId public Long[] getIntegerArrayProperty(String propertyName) { String propertyValue = getProperty(propertyName); - return (propertyValue == null || propertyValue.isBlank()) ? null : Arrays.stream(propertyValue.split(",")).map(String::trim).map(Long::parseLong).toArray(Long[]::new); + return (propertyValue == null || propertyValue.trim().isEmpty()) ? null : Arrays.stream(propertyValue.split(",")).map(String::trim).map(Long::parseLong).toArray(Long[]::new); } @Override @@ -272,7 +272,7 @@ public class MaterialCreation implements ICreation, IObjectCreation, ICreationId public Double[] getRealArrayProperty(String propertyName) { String propertyValue = getProperty(propertyName); - return (propertyValue == null || propertyValue.isBlank()) ? null : Arrays.stream(propertyValue.split(",")).map(String::trim).map(Double::parseDouble).toArray(Double[]::new); + return (propertyValue == null || propertyValue.trim().isEmpty()) ? null : Arrays.stream(propertyValue.split(",")).map(String::trim).map(Double::parseDouble).toArray(Double[]::new); } @Override @@ -285,7 +285,7 @@ public class MaterialCreation implements ICreation, IObjectCreation, ICreationId public String[] getStringArrayProperty(String propertyName) { String propertyValue = getProperty(propertyName); - return (propertyValue == null || propertyValue.isBlank()) ? null : Arrays.stream(propertyValue.split(",")).map(String::trim).toArray(String[]::new); + return (propertyValue == null || propertyValue.trim().isEmpty()) ? null : Arrays.stream(propertyValue.split(",")).map(String::trim).toArray(String[]::new); } @Override diff --git a/api-openbis-java/source/java/ch/ethz/sis/openbis/generic/asapi/v3/dto/material/update/MaterialUpdate.java b/api-openbis-java/source/java/ch/ethz/sis/openbis/generic/asapi/v3/dto/material/update/MaterialUpdate.java index 4fd7aca3897255fe9181d9d8b402579b71fbe364..711d6e131897ed1aa55fec68453f1f34ec39754a 100644 --- a/api-openbis-java/source/java/ch/ethz/sis/openbis/generic/asapi/v3/dto/material/update/MaterialUpdate.java +++ b/api-openbis-java/source/java/ch/ethz/sis/openbis/generic/asapi/v3/dto/material/update/MaterialUpdate.java @@ -117,7 +117,7 @@ public class MaterialUpdate implements IUpdate, IObjectUpdate<IMaterialId>, IPro public Long getIntegerProperty(String propertyName) { String propertyValue = getProperty(propertyName); - return (propertyValue == null || propertyValue.isBlank()) ? null : Long.parseLong(propertyValue); + return (propertyValue == null || propertyValue.trim().isEmpty()) ? null : Long.parseLong(propertyValue); } @Override @@ -154,7 +154,7 @@ public class MaterialUpdate implements IUpdate, IObjectUpdate<IMaterialId>, IPro public Double getRealProperty(String propertyName) { String propertyValue = getProperty(propertyName); - return (propertyValue == null || propertyValue.isBlank()) ? null : Double.parseDouble(propertyValue); + return (propertyValue == null || propertyValue.trim().isEmpty()) ? null : Double.parseDouble(propertyValue); } @Override @@ -181,7 +181,7 @@ public class MaterialUpdate implements IUpdate, IObjectUpdate<IMaterialId>, IPro public Boolean getBooleanProperty(String propertyName) { String propertyValue = getProperty(propertyName); - return (propertyValue == null || propertyValue.isBlank()) ? null : Boolean.parseBoolean(propertyValue); + return (propertyValue == null || propertyValue.trim().isEmpty()) ? null : Boolean.parseBoolean(propertyValue); } @Override @@ -230,7 +230,7 @@ public class MaterialUpdate implements IUpdate, IObjectUpdate<IMaterialId>, IPro public SamplePermId getSampleProperty(String propertyName) { String propertyValue = getProperty(propertyName); - return (propertyValue == null || propertyValue.isBlank()) ? null : new SamplePermId(propertyValue); + return (propertyValue == null || propertyValue.trim().isEmpty()) ? null : new SamplePermId(propertyValue); } @Override @@ -243,7 +243,7 @@ public class MaterialUpdate implements IUpdate, IObjectUpdate<IMaterialId>, IPro public Long[] getIntegerArrayProperty(String propertyName) { String propertyValue = getProperty(propertyName); - return (propertyValue == null || propertyValue.isBlank()) ? null : Arrays.stream(propertyValue.split(",")).map(String::trim).map(Long::parseLong).toArray(Long[]::new); + return (propertyValue == null || propertyValue.trim().isEmpty()) ? null : Arrays.stream(propertyValue.split(",")).map(String::trim).map(Long::parseLong).toArray(Long[]::new); } @Override @@ -256,7 +256,7 @@ public class MaterialUpdate implements IUpdate, IObjectUpdate<IMaterialId>, IPro public Double[] getRealArrayProperty(String propertyName) { String propertyValue = getProperty(propertyName); - return (propertyValue == null || propertyValue.isBlank()) ? null : Arrays.stream(propertyValue.split(",")).map(String::trim).map(Double::parseDouble).toArray(Double[]::new); + return (propertyValue == null || propertyValue.trim().isEmpty()) ? null : Arrays.stream(propertyValue.split(",")).map(String::trim).map(Double::parseDouble).toArray(Double[]::new); } @Override @@ -269,7 +269,7 @@ public class MaterialUpdate implements IUpdate, IObjectUpdate<IMaterialId>, IPro public String[] getStringArrayProperty(String propertyName) { String propertyValue = getProperty(propertyName); - return (propertyValue == null || propertyValue.isBlank()) ? null : Arrays.stream(propertyValue.split(",")).map(String::trim).toArray(String[]::new); + return (propertyValue == null || propertyValue.trim().isEmpty()) ? null : Arrays.stream(propertyValue.split(",")).map(String::trim).toArray(String[]::new); } @Override diff --git a/api-openbis-java/source/java/ch/ethz/sis/openbis/generic/asapi/v3/dto/sample/Sample.java b/api-openbis-java/source/java/ch/ethz/sis/openbis/generic/asapi/v3/dto/sample/Sample.java index 72716279c09659bd012244ec08512421034ede95..f0ff0702ed71c31c19bbde738516799bb4d15e4b 100644 --- a/api-openbis-java/source/java/ch/ethz/sis/openbis/generic/asapi/v3/dto/sample/Sample.java +++ b/api-openbis-java/source/java/ch/ethz/sis/openbis/generic/asapi/v3/dto/sample/Sample.java @@ -975,7 +975,7 @@ public class Sample implements Serializable, IAttachmentsHolder, ICodeHolder, ID public Long getIntegerProperty(String propertyName) { String propertyValue = getProperty(propertyName); - return (propertyValue == null || propertyValue.isBlank()) ? null : Long.parseLong(propertyValue); + return (propertyValue == null || propertyValue.trim().isEmpty()) ? null : Long.parseLong(propertyValue); } @Override @@ -1012,7 +1012,7 @@ public class Sample implements Serializable, IAttachmentsHolder, ICodeHolder, ID public Double getRealProperty(String propertyName) { String propertyValue = getProperty(propertyName); - return (propertyValue == null || propertyValue.isBlank()) ? null : Double.parseDouble(propertyValue); + return (propertyValue == null || propertyValue.trim().isEmpty()) ? null : Double.parseDouble(propertyValue); } @Override @@ -1039,7 +1039,7 @@ public class Sample implements Serializable, IAttachmentsHolder, ICodeHolder, ID public Boolean getBooleanProperty(String propertyName) { String propertyValue = getProperty(propertyName); - return (propertyValue == null || propertyValue.isBlank()) ? null : Boolean.parseBoolean(propertyValue); + return (propertyValue == null || propertyValue.trim().isEmpty()) ? null : Boolean.parseBoolean(propertyValue); } @Override @@ -1088,7 +1088,7 @@ public class Sample implements Serializable, IAttachmentsHolder, ICodeHolder, ID public SamplePermId getSampleProperty(String propertyName) { String propertyValue = getProperty(propertyName); - return (propertyValue == null || propertyValue.isBlank()) ? null : new SamplePermId(propertyValue); + return (propertyValue == null || propertyValue.trim().isEmpty()) ? null : new SamplePermId(propertyValue); } @Override @@ -1101,7 +1101,7 @@ public class Sample implements Serializable, IAttachmentsHolder, ICodeHolder, ID public Long[] getIntegerArrayProperty(String propertyName) { String propertyValue = getProperty(propertyName); - return (propertyValue == null || propertyValue.isBlank()) ? null : Arrays.stream(propertyValue.split(",")).map(String::trim).map(Long::parseLong).toArray(Long[]::new); + return (propertyValue == null || propertyValue.trim().isEmpty()) ? null : Arrays.stream(propertyValue.split(",")).map(String::trim).map(Long::parseLong).toArray(Long[]::new); } @Override @@ -1114,7 +1114,7 @@ public class Sample implements Serializable, IAttachmentsHolder, ICodeHolder, ID public Double[] getRealArrayProperty(String propertyName) { String propertyValue = getProperty(propertyName); - return (propertyValue == null || propertyValue.isBlank()) ? null : Arrays.stream(propertyValue.split(",")).map(String::trim).map(Double::parseDouble).toArray(Double[]::new); + return (propertyValue == null || propertyValue.trim().isEmpty()) ? null : Arrays.stream(propertyValue.split(",")).map(String::trim).map(Double::parseDouble).toArray(Double[]::new); } @Override @@ -1127,7 +1127,7 @@ public class Sample implements Serializable, IAttachmentsHolder, ICodeHolder, ID public String[] getStringArrayProperty(String propertyName) { String propertyValue = getProperty(propertyName); - return (propertyValue == null || propertyValue.isBlank()) ? null : Arrays.stream(propertyValue.split(",")).map(String::trim).toArray(String[]::new); + return (propertyValue == null || propertyValue.trim().isEmpty()) ? null : Arrays.stream(propertyValue.split(",")).map(String::trim).toArray(String[]::new); } @Override diff --git a/api-openbis-java/source/java/ch/ethz/sis/openbis/generic/asapi/v3/dto/sample/create/SampleCreation.java b/api-openbis-java/source/java/ch/ethz/sis/openbis/generic/asapi/v3/dto/sample/create/SampleCreation.java index f3d93b0bccbcb0185f7fd01b8ce8dc57a27c6d40..8d22b21c7e6440b9d491c7f762a5a37462aba568 100644 --- a/api-openbis-java/source/java/ch/ethz/sis/openbis/generic/asapi/v3/dto/sample/create/SampleCreation.java +++ b/api-openbis-java/source/java/ch/ethz/sis/openbis/generic/asapi/v3/dto/sample/create/SampleCreation.java @@ -276,7 +276,7 @@ public class SampleCreation implements ICreation, ICreationIdHolder, IProperties public Long getIntegerProperty(String propertyName) { String propertyValue = getProperty(propertyName); - return (propertyValue == null || propertyValue.isBlank()) ? null : Long.parseLong(propertyValue); + return (propertyValue == null || propertyValue.trim().isEmpty()) ? null : Long.parseLong(propertyValue); } @Override @@ -313,7 +313,7 @@ public class SampleCreation implements ICreation, ICreationIdHolder, IProperties public Double getRealProperty(String propertyName) { String propertyValue = getProperty(propertyName); - return (propertyValue == null || propertyValue.isBlank()) ? null : Double.parseDouble(propertyValue); + return (propertyValue == null || propertyValue.trim().isEmpty()) ? null : Double.parseDouble(propertyValue); } @Override @@ -340,7 +340,7 @@ public class SampleCreation implements ICreation, ICreationIdHolder, IProperties public Boolean getBooleanProperty(String propertyName) { String propertyValue = getProperty(propertyName); - return (propertyValue == null || propertyValue.isBlank()) ? null : Boolean.parseBoolean(propertyValue); + return (propertyValue == null || propertyValue.trim().isEmpty()) ? null : Boolean.parseBoolean(propertyValue); } @Override @@ -389,7 +389,7 @@ public class SampleCreation implements ICreation, ICreationIdHolder, IProperties public SamplePermId getSampleProperty(String propertyName) { String propertyValue = getProperty(propertyName); - return (propertyValue == null || propertyValue.isBlank()) ? null : new SamplePermId(propertyValue); + return (propertyValue == null || propertyValue.trim().isEmpty()) ? null : new SamplePermId(propertyValue); } @Override @@ -402,7 +402,7 @@ public class SampleCreation implements ICreation, ICreationIdHolder, IProperties public Long[] getIntegerArrayProperty(String propertyName) { String propertyValue = getProperty(propertyName); - return (propertyValue == null || propertyValue.isBlank()) ? null : Arrays.stream(propertyValue.split(",")).map(String::trim).map(Long::parseLong).toArray(Long[]::new); + return (propertyValue == null || propertyValue.trim().isEmpty()) ? null : Arrays.stream(propertyValue.split(",")).map(String::trim).map(Long::parseLong).toArray(Long[]::new); } @Override @@ -415,7 +415,7 @@ public class SampleCreation implements ICreation, ICreationIdHolder, IProperties public Double[] getRealArrayProperty(String propertyName) { String propertyValue = getProperty(propertyName); - return (propertyValue == null || propertyValue.isBlank()) ? null : Arrays.stream(propertyValue.split(",")).map(String::trim).map(Double::parseDouble).toArray(Double[]::new); + return (propertyValue == null || propertyValue.trim().isEmpty()) ? null : Arrays.stream(propertyValue.split(",")).map(String::trim).map(Double::parseDouble).toArray(Double[]::new); } @Override @@ -428,7 +428,7 @@ public class SampleCreation implements ICreation, ICreationIdHolder, IProperties public String[] getStringArrayProperty(String propertyName) { String propertyValue = getProperty(propertyName); - return (propertyValue == null || propertyValue.isBlank()) ? null : Arrays.stream(propertyValue.split(",")).map(String::trim).toArray(String[]::new); + return (propertyValue == null || propertyValue.trim().isEmpty()) ? null : Arrays.stream(propertyValue.split(",")).map(String::trim).toArray(String[]::new); } @Override diff --git a/api-openbis-java/source/java/ch/ethz/sis/openbis/generic/asapi/v3/dto/sample/update/SampleUpdate.java b/api-openbis-java/source/java/ch/ethz/sis/openbis/generic/asapi/v3/dto/sample/update/SampleUpdate.java index cb19ecf34f69189443ed6379a4351b432e157a26..60b6b33e984586e474a152e8a3ed45ae918001a9 100644 --- a/api-openbis-java/source/java/ch/ethz/sis/openbis/generic/asapi/v3/dto/sample/update/SampleUpdate.java +++ b/api-openbis-java/source/java/ch/ethz/sis/openbis/generic/asapi/v3/dto/sample/update/SampleUpdate.java @@ -346,7 +346,7 @@ public class SampleUpdate implements IUpdate, IPropertiesHolder, IObjectUpdate<I public Long getIntegerProperty(String propertyName) { String propertyValue = getProperty(propertyName); - return (propertyValue == null || propertyValue.isBlank()) ? + return (propertyValue == null || propertyValue.trim().isEmpty()) ? null : Long.parseLong(propertyValue); } @@ -385,7 +385,7 @@ public class SampleUpdate implements IUpdate, IPropertiesHolder, IObjectUpdate<I public Double getRealProperty(String propertyName) { String propertyValue = getProperty(propertyName); - return (propertyValue == null || propertyValue.isBlank()) ? + return (propertyValue == null || propertyValue.trim().isEmpty()) ? null : Double.parseDouble(propertyValue); } @@ -416,7 +416,7 @@ public class SampleUpdate implements IUpdate, IPropertiesHolder, IObjectUpdate<I public Boolean getBooleanProperty(String propertyName) { String propertyValue = getProperty(propertyName); - return (propertyValue == null || propertyValue.isBlank()) ? + return (propertyValue == null || propertyValue.trim().isEmpty()) ? null : Boolean.parseBoolean(propertyValue); } @@ -467,7 +467,7 @@ public class SampleUpdate implements IUpdate, IPropertiesHolder, IObjectUpdate<I public SamplePermId getSampleProperty(String propertyName) { String propertyValue = getProperty(propertyName); - return (propertyValue == null || propertyValue.isBlank()) ? + return (propertyValue == null || propertyValue.trim().isEmpty()) ? null : new SamplePermId(propertyValue); } @@ -482,7 +482,7 @@ public class SampleUpdate implements IUpdate, IPropertiesHolder, IObjectUpdate<I public Long[] getIntegerArrayProperty(String propertyName) { String propertyValue = getProperty(propertyName); - return (propertyValue == null || propertyValue.isBlank()) ? + return (propertyValue == null || propertyValue.trim().isEmpty()) ? null : Arrays.stream(propertyValue.split(",")).map(String::trim).map(Long::parseLong) .toArray(Long[]::new); @@ -501,7 +501,7 @@ public class SampleUpdate implements IUpdate, IPropertiesHolder, IObjectUpdate<I public Double[] getRealArrayProperty(String propertyName) { String propertyValue = getProperty(propertyName); - return (propertyValue == null || propertyValue.isBlank()) ? + return (propertyValue == null || propertyValue.trim().isEmpty()) ? null : Arrays.stream(propertyValue.split(",")).map(String::trim).map(Double::parseDouble) .toArray(Double[]::new); @@ -520,7 +520,7 @@ public class SampleUpdate implements IUpdate, IPropertiesHolder, IObjectUpdate<I public String[] getStringArrayProperty(String propertyName) { String propertyValue = getProperty(propertyName); - return (propertyValue == null || propertyValue.isBlank()) ? + return (propertyValue == null || propertyValue.trim().isEmpty()) ? null : Arrays.stream(propertyValue.split(",")).map(String::trim).toArray(String[]::new); } diff --git a/server-application-server/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/helper/generators/AbstractGenerator.java b/server-application-server/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/helper/generators/AbstractGenerator.java index 82e63079ccd850ef395b1388253faa225436cfd6..790fc4715b045e5008a390b3d00892290b984728 100644 --- a/server-application-server/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/helper/generators/AbstractGenerator.java +++ b/server-application-server/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/helper/generators/AbstractGenerator.java @@ -265,7 +265,7 @@ public class AbstractGenerator + " public SamplePermId getSampleProperty(String propertyName)\n" + " {\n" + " String propertyValue = getProperty(propertyName);\n" - + " return (propertyValue == null || propertyValue.isBlank()) ? null : new SamplePermId(propertyValue);\n" + + " return (propertyValue == null || propertyValue.trim().isEmpty()) ? null : new SamplePermId(propertyValue);\n" + " }"); gen.addAdditionalMethod("@Override\n" @@ -367,7 +367,7 @@ public class AbstractGenerator + " public " + type + " " + methodName + "(String propertyName)" + throwsOptional + "\n" + " {\n" + " String propertyValue = getProperty(propertyName);\n" - + " return (propertyValue == null || propertyValue.isBlank()) ? null : " + translationFunction + ";\n" + + " return (propertyValue == null || propertyValue.trim().isEmpty()) ? null : " + translationFunction + ";\n" + " }"; } diff --git a/server-application-server/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/EntityPropertiesConverter.java b/server-application-server/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/EntityPropertiesConverter.java index ec185b0ef49a64f374d992439f58c8f8873e230f..a08157c3f3cef259e152933e20030194e0191307 100644 --- a/server-application-server/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/EntityPropertiesConverter.java +++ b/server-application-server/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/EntityPropertiesConverter.java @@ -913,7 +913,7 @@ public final class EntityPropertiesConverter implements IEntityPropertiesConvert { return null; } - if (value == null || value.isBlank()) + if (value == null || value.trim().isEmpty()) { return null; } @@ -929,7 +929,7 @@ public final class EntityPropertiesConverter implements IEntityPropertiesConvert { return null; } - if (value == null || value.isBlank()) + if (value == null || value.trim().isEmpty()) { return null; } @@ -945,7 +945,7 @@ public final class EntityPropertiesConverter implements IEntityPropertiesConvert { return null; } - if (value == null || value.isBlank()) + if (value == null || value.trim().isEmpty()) { return null; }