Replace calls to String.isEmpty by a .length() == 0, as the isEmpty method is only available in the JDK 7.
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1592835 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/ipojo/runtime/core/src/main/java/org/apache/felix/ipojo/configuration/Instance.java b/ipojo/runtime/core/src/main/java/org/apache/felix/ipojo/configuration/Instance.java
index 93f1f3d..3dd0794 100644
--- a/ipojo/runtime/core/src/main/java/org/apache/felix/ipojo/configuration/Instance.java
+++ b/ipojo/runtime/core/src/main/java/org/apache/felix/ipojo/configuration/Instance.java
@@ -86,7 +86,7 @@
}
public Instance named(String name) {
- if (name == null || name.isEmpty()) {
+ if (name == null || name.length() == 0) {
throw new IllegalArgumentException("The instance name cannot be null or empty");
}
this.name = name;
@@ -166,7 +166,7 @@
private T value;
Property(String name) {
- if (name == null || name.isEmpty()) {
+ if (name == null || name.length() == 0) {
throw new IllegalArgumentException("The property name cannot be null or empty");
}
this.name = name;
@@ -174,7 +174,7 @@
public Instance setto(T value) {
if ("instance.name".endsWith(name)) {
- if (value == null || value.toString().isEmpty()) {
+ if (value == null || value.toString().length() == 0) {
throw new IllegalArgumentException("The instance name cannot be null or empty");
}
}