Author: jstrachan
Date: Fri May 4 00:34:44 2007
New Revision: 535123
URL: http://svn.apache.org/viewvc?view=rev&rev=535123
Log:
patched the UUID generator to not use : characters to avoid issues on windows
file systems
Modified:
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/util/UIdGenerator.java
Modified:
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/util/UIdGenerator.java
URL:
http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/util/UIdGenerator.java?view=diff&rev=535123&r1=535122&r2=535123
==============================================================================
---
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/util/UIdGenerator.java
(original)
+++
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/util/UIdGenerator.java
Fri May 4 00:34:44 2007
@@ -50,7 +50,7 @@
try {
hostName = InetAddress.getLocalHost().getHostName();
ServerSocket ss = new ServerSocket(0);
- stub="-" + ss.getLocalPort() + "-" +
System.currentTimeMillis() + "-";
+ stub="/" + ss.getLocalPort() + "-" +
System.currentTimeMillis() + "/";
Thread.sleep(100);
ss.close();
}catch(Exception ioe){
@@ -80,12 +80,12 @@
public UIdGenerator(String prefix){
synchronized(UNIQUE_STUB){
- this.seed = prefix + UNIQUE_STUB +(instanceCount++) +":";
+ this.seed = prefix + UNIQUE_STUB +(instanceCount++) +"-";
}
}
public UIdGenerator(){
- this("ID:" + hostName);
+ this("ID-" + hostName);
}
/**