You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by cl...@apache.org on 2014/05/06 20:43:22 UTC
svn commit: r1592835 -
/felix/trunk/ipojo/runtime/core/src/main/java/org/apache/felix/ipojo/configuration/Instance.java
Author: clement
Date: Tue May 6 18:43:21 2014
New Revision: 1592835
URL: http://svn.apache.org/r1592835
Log:
Replace calls to String.isEmpty by a .length() == 0, as the isEmpty method is only available in the JDK 7.
Modified:
felix/trunk/ipojo/runtime/core/src/main/java/org/apache/felix/ipojo/configuration/Instance.java
Modified: felix/trunk/ipojo/runtime/core/src/main/java/org/apache/felix/ipojo/configuration/Instance.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/runtime/core/src/main/java/org/apache/felix/ipojo/configuration/Instance.java?rev=1592835&r1=1592834&r2=1592835&view=diff
==============================================================================
--- felix/trunk/ipojo/runtime/core/src/main/java/org/apache/felix/ipojo/configuration/Instance.java (original)
+++ felix/trunk/ipojo/runtime/core/src/main/java/org/apache/felix/ipojo/configuration/Instance.java Tue May 6 18:43:21 2014
@@ -86,7 +86,7 @@ public class Instance {
}
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 @@ public class Instance {
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 class Instance {
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");
}
}