Skip to content

Commit 2a98b7f

Browse files
authored
Merge pull request #1644 from jgrassel/ECL_1535_UUIDGeneratorIntermittentFailure
[Master] ECL1535: UUIDGenerator intermittently fails to initialize
2 parents 48becba + 99fc104 commit 2a98b7f

File tree

1 file changed

+13
-1
lines changed
  • foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/sequencing

1 file changed

+13
-1
lines changed

foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/sequencing/UUIDSequence.java

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2011, 2022 Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2011, 2022 Oracle, IBM and/or its affiliates. All rights reserved.
33
*
44
* This program and the accompanying materials are made available under the
55
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -12,6 +12,8 @@
1212

1313
// Contributors:
1414
// Oracle - initial API and implementation
15+
// 08/10/2022-4.0 Jody Grassel
16+
// - ECL1535 : UUIDGenerator intermittently fails to initialize
1517
package org.eclipse.persistence.sequencing;
1618

1719
import java.util.UUID;
@@ -31,6 +33,16 @@ public UUIDSequence(String name) {
3133
super(name);
3234
}
3335

36+
@Override
37+
public boolean equals(Object obj) {
38+
if (obj instanceof UUIDSequence) {
39+
UUIDSequence other = (UUIDSequence)obj;
40+
return this.getName().equals(other.getName());
41+
} else {
42+
return false;
43+
}
44+
}
45+
3446
@Override
3547
public Object getGeneratedValue(Accessor accessor, AbstractSession writeSession, String seqName) {
3648
ValueReadQuery query = getDatasourcePlatform().getUUIDQuery();

0 commit comments

Comments
 (0)