Skip to content

Commit fcc2b5d

Browse files
committed
Use an import instead of a FQCN
1 parent f14a91e commit fcc2b5d

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

src/main/java/org/apache/commons/net/ntp/NtpV3Impl.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
package org.apache.commons.net.ntp;
1919

2020
import java.net.DatagramPacket;
21+
import java.util.Arrays;
2122

2223
/**
2324
* Implements {@link NtpV3Packet} to convert Java objects to and from the Network Time Protocol (NTP) data message header format described in RFC-1305.
@@ -94,7 +95,7 @@ public boolean equals(final Object obj) {
9495
return false;
9596
}
9697
final NtpV3Impl other = (NtpV3Impl) obj;
97-
return java.util.Arrays.equals(buf, other.buf);
98+
return Arrays.equals(buf, other.buf);
9899
}
99100

100101
/**
@@ -365,7 +366,7 @@ public int getVersion() {
365366
*/
366367
@Override
367368
public int hashCode() {
368-
return java.util.Arrays.hashCode(buf);
369+
return Arrays.hashCode(buf);
369370
}
370371

371372
private String idAsHex() {

src/test/java/org/apache/commons/net/ntp/TimeStampTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
import java.util.Calendar;
2020
import java.util.Date;
21+
import java.util.TimeZone;
2122

2223
import junit.framework.TestCase;
2324

@@ -64,7 +65,7 @@ public void testCompare() {
6465
public void testDateConversion() {
6566
// convert current date to NtpTimeStamp then compare Java date
6667
// computed from NTP timestamp with original Java date.
67-
final Calendar refCal = Calendar.getInstance(java.util.TimeZone.getTimeZone("UTC"));
68+
final Calendar refCal = Calendar.getInstance(TimeZone.getTimeZone("UTC"));
6869
final Date refDate = refCal.getTime();
6970
final TimeStamp ts = new TimeStamp(refDate);
7071
assertEquals("refDate.getTime()", refDate.getTime(), ts.getTime());

0 commit comments

Comments
 (0)