commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Davide Ling (JIRA)" <>
Subject [jira] Created: (SANDBOX-307) UUID URN version 5 generation
Date Thu, 26 Mar 2009 13:06:54 GMT
UUID URN version 5 generation

                 Key: SANDBOX-307
             Project: Commons Sandbox
          Issue Type: Bug
          Components: Id
    Affects Versions: Nightly Builds
         Environment: Linux Ubuntu 8.10
JDK 1.6.10
            Reporter: Davide Ling

The following test fail with the message:
      expected:<...:uuid:be6a1b75-9a58-[5]4a8-972e-791dfdd8815...> but was:<...:uuid:be6a1b75-9a58-[3]4a8-972e-791dfdd8815...>
	at org.junit.Assert.assertEquals(
	at org.junit.Assert.assertEquals(
	at org.davideling.provauuid.ProvaUUIDTest.testUUID(

public class UUIDVersion5Test {

	// Linux generated URN using the uuid command:
	//		davide@mydebian:~$ uuid -v 5 6ba7b811-9dad-11d1-80b4-00c04fd430c8
	//		davide@mydebian:~$ be6a1b75-9a58-54a8-972e-791dfdd8815b
	private static final String LINUX_GENERATED_URN = "urn:uuid:be6a1b75-9a58-54a8-972e-791dfdd8815b";
	// URL UUID namespace
	private static final UUID NAMESPACE = new UUID("6ba7b811-9dad-11d1-80b4-00c04fd430c8");
	// Name
	private static final String NAME = "";
	public void testUUID() throws Exception {
		assertEquals(LINUX_GENERATED_URN, uuid.toUrn() );

When using the SHA1 algorithm with UUID.nameUUIDFromString the version field have to be 5
(?) as the
Linux uuid generated URN?

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message