directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r581857 - /directory/shared/branches/bigbang/asn1/src/main/java/org/apache/directory/shared/asn1/primitives/OID.java
Date Thu, 04 Oct 2007 11:42:32 GMT
Author: elecharny
Date: Thu Oct  4 04:42:32 2007
New Revision: 581857

URL: http://svn.apache.org/viewvc?rev=581857&view=rev
Log:
Added a new constructor which takes an argument to avoid the constructor to throw an exception.
This will help us using OID for initializing constants

Modified:
    directory/shared/branches/bigbang/asn1/src/main/java/org/apache/directory/shared/asn1/primitives/OID.java

Modified: directory/shared/branches/bigbang/asn1/src/main/java/org/apache/directory/shared/asn1/primitives/OID.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/asn1/src/main/java/org/apache/directory/shared/asn1/primitives/OID.java?rev=581857&r1=581856&r2=581857&view=diff
==============================================================================
--- directory/shared/branches/bigbang/asn1/src/main/java/org/apache/directory/shared/asn1/primitives/OID.java
(original)
+++ directory/shared/branches/bigbang/asn1/src/main/java/org/apache/directory/shared/asn1/primitives/OID.java
Thu Oct  4 04:42:32 2007
@@ -111,6 +111,25 @@
     }
 
 
+    /**
+     * Create a new OID object from a String
+     * 
+     * @param oid The String which is supposed to be an OID
+     */
+    public OID( String oid, boolean safe )
+    {
+        try
+        {
+            setOID( oid );
+            hash = computeHashCode();
+        }
+        catch ( DecoderException de )
+        {
+            // do nothing
+        }
+    }
+
+
     // ~ Methods
     // ------------------------------------------------------------------------------------
     /**



Mime
View raw message