summary refs log tree commit diff
path: root/crypto/src/asn1/tsp/Accuracy.cs
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/src/asn1/tsp/Accuracy.cs')
-rw-r--r--crypto/src/asn1/tsp/Accuracy.cs26
1 files changed, 9 insertions, 17 deletions
diff --git a/crypto/src/asn1/tsp/Accuracy.cs b/crypto/src/asn1/tsp/Accuracy.cs
index 31289db99..0cbc731ac 100644
--- a/crypto/src/asn1/tsp/Accuracy.cs
+++ b/crypto/src/asn1/tsp/Accuracy.cs
@@ -75,24 +75,16 @@ namespace Org.BouncyCastle.Asn1.Tsp
 			}
 		}
 
-		public static Accuracy GetInstance(
-			object o)
-		{
-			if (o == null || o is Accuracy)
-			{
-				return (Accuracy) o;
-			}
-
-			if (o is Asn1Sequence)
-			{
-				return new Accuracy((Asn1Sequence) o);
-			}
-
-			throw new ArgumentException(
-				"Unknown object in 'Accuracy' factory: " + Platform.GetTypeName(o));
-		}
+        public static Accuracy GetInstance(object obj)
+        {
+            if (obj is Accuracy)
+                return (Accuracy)obj;
+            if (obj == null)
+                return null;
+            return new Accuracy(Asn1Sequence.GetInstance(obj));
+        }
 
-		public DerInteger Seconds
+        public DerInteger Seconds
 		{
 			get { return seconds; }
 		}