servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lh...@apache.org
Subject svn commit: r706018 - /servicemix/components/bindings/servicemix-snmp/trunk/src/main/java/org/apache/servicemix/snmp/util/OIDListEditor.java
Date Sun, 19 Oct 2008 14:10:55 GMT
Author: lhein
Date: Sun Oct 19 07:10:55 2008
New Revision: 706018

URL: http://svn.apache.org/viewvc?rev=706018&view=rev
Log:
fixed issue that property is invalid if only 1 oid is provided as string

Modified:
    servicemix/components/bindings/servicemix-snmp/trunk/src/main/java/org/apache/servicemix/snmp/util/OIDListEditor.java

Modified: servicemix/components/bindings/servicemix-snmp/trunk/src/main/java/org/apache/servicemix/snmp/util/OIDListEditor.java
URL: http://svn.apache.org/viewvc/servicemix/components/bindings/servicemix-snmp/trunk/src/main/java/org/apache/servicemix/snmp/util/OIDListEditor.java?rev=706018&r1=706017&r2=706018&view=diff
==============================================================================
--- servicemix/components/bindings/servicemix-snmp/trunk/src/main/java/org/apache/servicemix/snmp/util/OIDListEditor.java
(original)
+++ servicemix/components/bindings/servicemix-snmp/trunk/src/main/java/org/apache/servicemix/snmp/util/OIDListEditor.java
Sun Oct 19 07:10:55 2008
@@ -48,8 +48,8 @@
                     // empty token - skip
                 }
             }
-        } else {
-            // seems to be a file resource
+        } else if (text.indexOf(":") != -1) {
+        	// seems to be a file resource
             try {
                 DefaultResourceLoader loader = new DefaultResourceLoader();
                 Resource file = loader.getResource(text);
@@ -79,7 +79,10 @@
                 }
             } catch (Exception ex) {
                 throw new IllegalArgumentException(text + " is not a valid argument.", ex);
-            }
+            }        	
+        } else {
+            // maybe a single oid
+        	list.add(new OID(text.trim()));
         }
         setValue(list);
     }



Mime
View raw message