cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1301510 - /cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/osgi/HTTPTransportActivator.java
Date Fri, 16 Mar 2012 13:44:01 GMT
Author: dkulp
Date: Fri Mar 16 13:44:01 2012
New Revision: 1301510

URL: http://svn.apache.org/viewvc?rev=1301510&view=rev
Log:
Rename the priority field to "order" to make it clearer and easier to
explain

Modified:
    cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/osgi/HTTPTransportActivator.java

Modified: cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/osgi/HTTPTransportActivator.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/osgi/HTTPTransportActivator.java?rev=1301510&r1=1301509&r2=1301510&view=diff
==============================================================================
--- cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/osgi/HTTPTransportActivator.java
(original)
+++ cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/osgi/HTTPTransportActivator.java
Fri Mar 16 13:44:01 2012
@@ -64,6 +64,7 @@ import org.osgi.util.tracker.ServiceTrac
  * that has a list of properties like:
  * 
  * url: Regex url to match the configuration
+ * order: Integer order in which to apply the regex's when multiple regex's match.
  * client.*
  * tlsClientParameters.*
  * proxyAuthorization.*
@@ -89,12 +90,12 @@ public class HTTPTransportActivator 
     private static class PidInfo implements Comparable<PidInfo> {
         final Dictionary<String, String> props;
         final Matcher matcher;
-        final int priority;
+        final int order;
         
-        public PidInfo(Dictionary<String, String> p, Matcher m, int i) {
+        public PidInfo(Dictionary<String, String> p, Matcher m, int o) {
             matcher = m;
             props = p;
-            priority = i;
+            order = o;
         }
         public Dictionary<String, String> getProps() {
             return props;
@@ -104,9 +105,9 @@ public class HTTPTransportActivator 
         }
 
         public int compareTo(PidInfo o) {
-            if (priority < o.priority) {
+            if (order < o.order) {
                 return -1;
-            } else if (priority > o.priority) { 
+            } else if (order > o.order) { 
                 return 1;
             }
             // priorities are equal
@@ -161,13 +162,13 @@ public class HTTPTransportActivator 
         String url = (String)properties.get("url");
         String name = (String)properties.get("name");
         Matcher matcher = url == null ? null : Pattern.compile(url).matcher("");
-        String p = (String)properties.get("priority");
-        int priority = 50; 
+        String p = (String)properties.get("order");
+        int order = 50; 
         if (p != null) {
-            priority = Integer.valueOf(p);
+            order = Integer.valueOf(p);
         }
         
-        PidInfo info = new PidInfo(properties, matcher, priority);
+        PidInfo info = new PidInfo(properties, matcher, order);
         
         props.put(pid, info);
         if (url != null) {



Mime
View raw message