Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslewis2008-02-05 02:26:27 -0500
committerslewis2008-02-05 02:26:27 -0500
commitdc2bf1e8e70e742408304bf4c803d3a6a2f5a3ad (patch)
tree533a6c8ab4fd8f419bfbe9ffe3bbc075974f60df /framework/bundles/org.eclipse.ecf.identity/src
parent511fa83f4f22b1d4b155e5cb7923b4e469459364 (diff)
downloadorg.eclipse.ecf-dc2bf1e8e70e742408304bf4c803d3a6a2f5a3ad.tar.gz
org.eclipse.ecf-dc2bf1e8e70e742408304bf4c803d3a6a2f5a3ad.tar.xz
org.eclipse.ecf-dc2bf1e8e70e742408304bf4c803d3a6a2f5a3ad.zip
Fixed GUID construction to allow for externally created value
Diffstat (limited to 'framework/bundles/org.eclipse.ecf.identity/src')
-rw-r--r--framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/GUID.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/GUID.java b/framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/GUID.java
index 4f4c16224..4a7349d0d 100644
--- a/framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/GUID.java
+++ b/framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/GUID.java
@@ -9,7 +9,6 @@
package org.eclipse.ecf.core.identity;
import java.security.SecureRandom;
-
import org.eclipse.ecf.core.util.Base64;
import org.eclipse.ecf.internal.core.identity.Messages;
@@ -34,6 +33,8 @@ public class GUID extends StringID {
return new GUID(this);
else if (args.length == 1 && args[0] instanceof Integer)
return new GUID(this, ((Integer) args[0]).intValue());
+ else if (args.length == 1 && args[0] instanceof String)
+ return new GUID(this, ((String) args[0]));
else
return new GUID(this);
}
@@ -90,6 +91,10 @@ public class GUID extends StringID {
value = Base64.encode(newBytes);
}
+ protected GUID(Namespace n, String value) {
+ super(n, value);
+ }
+
protected GUID(Namespace n, int byteLength) throws IDCreateException {
this(n, SR_DEFAULT_ALGO, SR_DEFAULT_PROVIDER, byteLength);
}

Back to the top