summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMario Torre <neugens@limasoftware.net>2006-07-13 23:29:27 +0000
committerMario Torre <neugens@limasoftware.net>2006-07-13 23:29:27 +0000
commit07569d0886636e31e7bdcf0528f2318ca9a2ae24 (patch)
tree09cf6d0750553966adb1daa99ce9d836dbb754b9
parent4dd6d88c74e453f33ef8ed37492533ebeddf664f (diff)
downloadclasspath-07569d0886636e31e7bdcf0528f2318ca9a2ae24.tar.gz
2006-07-14 Mario Torre <neugens@limasoftware.net>
* gnu/java/security/OID.java (OID): Private Constructor removed as it is not needed anymore. (clone): Fixed. Now uses super.clone instead of the private constructor as per specification of clone method. (serialVersionUID): added new field to allow serialization.
-rw-r--r--ChangeLog8
-rw-r--r--gnu/java/security/OID.java24
2 files changed, 21 insertions, 11 deletions
diff --git a/ChangeLog b/ChangeLog
index abca7b9b4..da168f900 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2006-07-14 Mario Torre <neugens@limasoftware.net>
+
+ * gnu/java/security/OID.java (OID): Private Constructor removed as
+ it is not needed anymore.
+ (clone): Fixed. Now uses super.clone instead of the private
+ constructor as per specification of clone method.
+ (serialVersionUID): added new field to allow serialization.
+
2006-07-13 Sven de Marothy <sven@physto.se>
* gnu/javax/imageio/gif/GIFImageReader.java
diff --git a/gnu/java/security/OID.java b/gnu/java/security/OID.java
index 822ca3427..f61cf0fc3 100644
--- a/gnu/java/security/OID.java
+++ b/gnu/java/security/OID.java
@@ -71,6 +71,9 @@ public class OID implements Cloneable, Comparable, java.io.Serializable
// Fields.
// ------------------------------------------------------------------------
+ /* Serial version id for serialization. */
+ static final long serialVersionUID = 5722492029044597779L;
+
/**
* The numeric ID structure.
*/
@@ -229,13 +232,6 @@ public class OID implements Cloneable, Comparable, java.io.Serializable
}
}
- /**
- * Our private constructor.
- */
- private OID()
- {
- }
-
// Instance methods.
// ------------------------------------------------------------------------
@@ -325,10 +321,16 @@ public class OID implements Cloneable, Comparable, java.io.Serializable
*/
public Object clone()
{
- OID oid = new OID();
- oid.components = this.components;
- oid.strRep = this.strRep;
- return oid;
+ try
+ {
+ return super.clone();
+ }
+ catch (CloneNotSupportedException cnse)
+ {
+ InternalError ie = new InternalError();
+ ie.initCause(cnse);
+ throw ie;
+ }
}
/* Nice idea, but possibly too expensive for whatever benefit it