projects
/
jSite2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
create new id if null id is set
[jSite2.git]
/
src
/
net
/
pterodactylus
/
jsite
/
core
/
Node.java
diff --git
a/src/net/pterodactylus/jsite/core/Node.java
b/src/net/pterodactylus/jsite/core/Node.java
index
b632eea
..
9a4d3be
100644
(file)
--- a/
src/net/pterodactylus/jsite/core/Node.java
+++ b/
src/net/pterodactylus/jsite/core/Node.java
@@
-77,7
+77,11
@@
public class Node extends AbstractBean {
* The internal ID of the node
*/
void setId(String id) {
- this.id = id;
+ if (id == null) {
+ this.id = Hex.toHex(IdGenerator.generateId());
+ } else {
+ this.id = id;
+ }
}
/**