f4b6a3 / uuid-creator

UUID Creator is a Java library for generating Universally Unique Identifiers.
MIT License
431 stars 44 forks source link

Get MAC address: check if nic is UP is not implemented? #4

Closed lbruun closed 5 years ago

lbruun commented 5 years ago

The Javadoc for MacNodeIdentifierStrategy.getNodeIdentifier() says:

It looks for the first MAC that is up and running. If none is up, it looks for the first MAC.

but I don't see that reflected in the code. It doesn't do nic.isUp().

Also, it says:

It returns ZERO if none is found.

but that too I cannot see in the code. It will never return ZERO as far as I can tell.

Please review.

fabiolimace commented 5 years ago

I've forgot to update the javadoc comments of that method. I took the opportunity to put back the nic.isUp() verification. It helps to find the correct network interface.