Skip to content

Commit ebb6566

Browse files
committed
Add release notes wrt #52
1 parent 56043d1 commit ebb6566

File tree

6 files changed

+23
-4
lines changed

6 files changed

+23
-4
lines changed

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,11 @@ UUID uuid = gen.generate();
7373
UUID anotherUuid = gen.generate();
7474
```
7575

76-
If your machine has a standard IP networking setup, the `Generators.egressTimeBasedGenerator`
76+
If your machine has a standard IP networking setup, the `Generators.egressTimeBasedGenerator` (added in JUG 4.1)
7777
factory method will try to determine which network interface corresponds to the default route for
78-
all outgoing network traffic, and use that for creating a time based generator. This is likely a
79-
good choice for common usage scenarios if you want a version 1 UUID generator:
78+
all outgoing network traffic, and use that for creating a time based generator.
79+
This is likely a good choice for common usage scenarios if you want a version 1 UUID generator:
80+
8081
```java
8182
TimeBasedGenerator gen = Generators.egressTimeBasedGenerator();
8283
UUID uuid = gen.generate();

release-notes/CREDITS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,3 +118,7 @@ Pascal Schumacher (PascalSchumacher@github)
118118
Hal Hildebrand (Hellblazer@github)
119119
* Contributed #41: Add support for Proposed type v6 (reordered timestamp)
120120
[4.1.0]
121+
122+
Paul Galbraith (pgalbraith@github)
123+
* Contributed #52: Add `Generators.egressTimeBasedGenerator()` method that constructs
124+
`TimedBasedGenerator` with a sensible choice of interface

release-notes/VERSION

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ Releases
88

99
#41: Add support for Proposed type v6 (reordered timestamp)
1010
(contributed by Hal H)
11+
#52: Add `Generators.egressTimeBasedGenerator()` method that constructs `TimedBasedGenerator`
12+
with a sensible choice of interface
13+
(contributed by Paul G)
1114
- Fix a minor issue with argument validation for `Jug` tool class
1215
- Update junit dependency (via oss-parent:41)
1316
- Update slf4j-api to 1.7.36

src/main/java/com/fasterxml/uuid/EthernetAddress.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,8 @@ public static EthernetAddress fromInterface()
289289

290290
/**
291291
* A factory method to return the ethernet address of a specified network interface.
292+
*
293+
* @since 4.1
292294
*/
293295
public static EthernetAddress fromInterface(NetworkInterface nint)
294296
{
@@ -315,6 +317,8 @@ public static EthernetAddress fromInterface(NetworkInterface nint)
315317
* to be the default egress interface, and the corresponding address of
316318
* that interface will be returned. If all attempts are unsuccessful,
317319
* null will be returned.
320+
*
321+
* @since 4.1
318322
*/
319323
public static EthernetAddress fromEgressInterface()
320324
{
@@ -336,6 +340,8 @@ public static EthernetAddress fromEgressInterface()
336340
/**
337341
* A factory method to return the address of the interface used to route
338342
* traffic to the specified IP address.
343+
*
344+
* @since 4.1
339345
*/
340346
public static EthernetAddress fromEgressInterface(InetSocketAddress externalSocketAddress)
341347
{

src/main/java/com/fasterxml/uuid/Generators.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,8 @@ public static NameBasedGenerator nameBasedGenerator(UUID namespace, MessageDiges
130130
* identify the egress interface once: if you have a complex network setup where your
131131
* outbound routes/interfaces may change dynamically, and you want your UUIDs to
132132
* accurately reflect which interface is being actively used, this method is not for you.
133+
*
134+
* @since 4.1
133135
*/
134136
public static TimeBasedGenerator egressTimeBasedGenerator()
135137
{

src/test/java/com/fasterxml/uuid/UUIDGeneratorTest.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,10 @@
4040
public class UUIDGeneratorTest extends TestCase
4141
{
4242
// size of the arrays to create for tests using arrays of values
43-
private static final int SIZE_OF_TEST_ARRAY = 10000;
43+
// 19-Jun-2022, tatu: Reduce from 10000 since that seems to sometimes
44+
// trigger timing overflow wrt sanity checks (sanity checks being
45+
// simplistic; not exposing an actual issue)
46+
private static final int SIZE_OF_TEST_ARRAY = 9000;
4447

4548
public UUIDGeneratorTest(java.lang.String testName)
4649
{

0 commit comments

Comments
 (0)