felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pa...@apache.org
Subject svn commit: r555536 - in /felix/trunk: framework/src/main/java/org/apache/felix/framework/util/ldap/ org.apache.felix.daemon/src/main/java/org/apache/felix/daemon/ tools/maven2/maven-felix-plugin/src/main/java/org/apache/felix/tools/maven/felix/plugin/
Date Thu, 12 Jul 2007 08:37:58 GMT
Author: pauls
Date: Thu Jul 12 01:37:56 2007
New Revision: 555536

URL: http://svn.apache.org/viewvc?view=rev&rev=555536
Log:
Adapt to framework api changes

Modified:
    felix/trunk/framework/src/main/java/org/apache/felix/framework/util/ldap/Parser.java
    felix/trunk/org.apache.felix.daemon/src/main/java/org/apache/felix/daemon/Service.java
    felix/trunk/tools/maven2/maven-felix-plugin/src/main/java/org/apache/felix/tools/maven/felix/plugin/FelixRunMojo.java

Modified: felix/trunk/framework/src/main/java/org/apache/felix/framework/util/ldap/Parser.java
URL: http://svn.apache.org/viewvc/felix/trunk/framework/src/main/java/org/apache/felix/framework/util/ldap/Parser.java?view=diff&rev=555536&r1=555535&r2=555536
==============================================================================
--- felix/trunk/framework/src/main/java/org/apache/felix/framework/util/ldap/Parser.java (original)
+++ felix/trunk/framework/src/main/java/org/apache/felix/framework/util/ldap/Parser.java Thu
Jul 12 01:37:56 2007
@@ -65,6 +65,8 @@
 
     // Flag indicating presense of BigDecimal.
     private static boolean m_hasBigDecimal = false;
+	
+	private static final Class[] STRING_CLASS = new Class[] { String.class };
 
     static 
     {
@@ -555,7 +557,7 @@
                     result = ((Boolean) operands.pop()).booleanValue();
                 }
             }
-            operands.push(new Boolean(result));
+            operands.push((result ? Boolean.TRUE : Boolean.FALSE));
         }
 
         public String toString()
@@ -620,7 +622,7 @@
                     result = ((Boolean) operands.pop()).booleanValue();
                 }
             }
-            operands.push(new Boolean(result));
+            operands.push((result ? Boolean.TRUE : Boolean.FALSE));
         }
 
         public String toString()
@@ -666,7 +668,7 @@
                 fewOperands("NOT");
             }
             boolean result = !((Boolean) operands.pop()).booleanValue();
-            operands.push(new Boolean(result));
+            operands.push((result ? Boolean.TRUE : Boolean.FALSE));
         }
 
         public String toString()
@@ -717,7 +719,7 @@
 
             Object lhs = operands.pop();
 
-            operands.push(new Boolean(compare(lhs, rhs, EQUAL)));
+            operands.push((compare(lhs, rhs, EQUAL) ? Boolean.TRUE : Boolean.FALSE));
         }
 
         public String toString()
@@ -775,7 +777,7 @@
             }
             Object lhs = operands.pop();
 
-            operands.push(new Boolean(compare(lhs, rhs, GREATER_EQUAL)));
+            operands.push((compare(lhs, rhs, GREATER_EQUAL) ? Boolean.TRUE : Boolean.FALSE));
         }
 
         public String toString()
@@ -831,7 +833,7 @@
                 fewOperands("<=");
             }
             Object lhs = (Object) operands.pop();
-            operands.push(new Boolean(compare(lhs, rhs, LESS_EQUAL)));
+            operands.push((compare(lhs, rhs, LESS_EQUAL) ? Boolean.TRUE : Boolean.FALSE));
         }
 
         public String toString()
@@ -887,7 +889,7 @@
                 fewOperands("~=");
             }
             Object lhs = operands.pop();
-            operands.push(new Boolean(compare(lhs, rhs, APPROX)));
+            operands.push((compare(lhs, rhs, APPROX) ? Boolean.TRUE : Boolean.FALSE));
         }
 
         public String toString()
@@ -935,7 +937,7 @@
             throws EvaluationException
         {
             Object value = mapper.lookup(attribute);
-            operands.push(new Boolean(value != null));
+            operands.push((value != null) ? Boolean.TRUE : Boolean.FALSE);
         }
 
         public String toString()
@@ -1258,7 +1260,7 @@
                 else
                 {
                     rhsComparable = (Comparable) lhs.getClass()
-                        .getConstructor(new Class[] { String.class })
+                        .getConstructor(STRING_CLASS)
                             .newInstance(new Object[] { rhs });
                 }
             }
@@ -1382,7 +1384,7 @@
             array = new Boolean[src.length];
             for (int i = 0; i < src.length; i++)
             {
-                ((Object[]) array)[i] = new Boolean(src[i]);
+                ((Object[]) array)[i] = (src[i] ? Boolean.TRUE : Boolean.FALSE);
             }
         }
         else if (clazz == Character.TYPE)

Modified: felix/trunk/org.apache.felix.daemon/src/main/java/org/apache/felix/daemon/Service.java
URL: http://svn.apache.org/viewvc/felix/trunk/org.apache.felix.daemon/src/main/java/org/apache/felix/daemon/Service.java?view=diff&rev=555536&r1=555535&r2=555536
==============================================================================
--- felix/trunk/org.apache.felix.daemon/src/main/java/org/apache/felix/daemon/Service.java
(original)
+++ felix/trunk/org.apache.felix.daemon/src/main/java/org/apache/felix/daemon/Service.java
Thu Jul 12 01:37:56 2007
@@ -30,7 +30,6 @@
 
 import org.apache.felix.framework.Felix;
 import org.apache.felix.framework.cache.BundleCache;
-import org.apache.felix.framework.util.MutablePropertyResolverImpl;
 import org.apache.felix.framework.util.StringMap;
 
 
@@ -76,7 +75,7 @@
         }
         
         configationProperties = readConfigProperties();
-        instance = new Felix(new MutablePropertyResolverImpl( new StringMap( configationProperties,
false ) ), null );
+        instance = new Felix(new StringMap(configationProperties, false ), null );
     }
 
 

Modified: felix/trunk/tools/maven2/maven-felix-plugin/src/main/java/org/apache/felix/tools/maven/felix/plugin/FelixRunMojo.java
URL: http://svn.apache.org/viewvc/felix/trunk/tools/maven2/maven-felix-plugin/src/main/java/org/apache/felix/tools/maven/felix/plugin/FelixRunMojo.java?view=diff&rev=555536&r1=555535&r2=555536
==============================================================================
--- felix/trunk/tools/maven2/maven-felix-plugin/src/main/java/org/apache/felix/tools/maven/felix/plugin/FelixRunMojo.java
(original)
+++ felix/trunk/tools/maven2/maven-felix-plugin/src/main/java/org/apache/felix/tools/maven/felix/plugin/FelixRunMojo.java
Thu Jul 12 01:37:56 2007
@@ -27,8 +27,7 @@
 import java.util.Properties;
 
 import org.apache.felix.framework.Felix;
-import org.apache.felix.framework.util.MutablePropertyResolver;
-import org.apache.felix.framework.util.MutablePropertyResolverImpl;
+import org.apache.felix.framework.util.StringMap;
 import org.apache.maven.artifact.Artifact;
 import org.apache.maven.plugin.AbstractMojo;
 import org.apache.maven.plugin.MojoExecutionException;
@@ -661,8 +660,7 @@
         // Start up Felix with resolver and shut it down
         // -------------------------------------------------------------------
 
-        MutablePropertyResolver resolver = new MutablePropertyResolverImpl(props);
-        felixContainer = new Felix(resolver, null);
+        felixContainer = new Felix(new StringMap(props, false), null);
         try
         {
 			felixContainer.start();



Mime
View raw message