Skip to content

Commit 836c042

Browse files
committed
Merge remote-tracking branch 'origin/master'
2 parents b08425c + 26cc584 commit 836c042

4 files changed

Lines changed: 13 additions & 6 deletions

File tree

CHANGELOG

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ Changes in 3.9.3:
22
- Bundle Java 21 with Windows and Mac builds
33
- Updated SWT for all platforms, improved loading of correct SWT library on Linux
44
- Add support for plugin jars containing their own messages.properties
5+
- The UDP pinger now uses the same port as traceroute programs.
6+
- Switch from the legacy Date API to Java's new Time API
7+
- Time is now specified in 24-hour format in XML export
58
- Enable exporting very long lines as .txt
69

710
Changes in 3.9.2:

src/net/azib/ipscan/core/net/UDPPinger.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
public class UDPPinger implements Pinger {
2626
private static final Logger LOG = LoggerFactory.getLogger();
2727

28-
private static final int PROBE_UDP_PORT = 37381;
28+
private static final int PROBE_UDP_PORT = 33435;
2929

3030
private int timeout;
3131

src/net/azib/ipscan/exporters/TXTExporter.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@
1313
import java.io.IOException;
1414
import java.io.OutputStream;
1515
import java.net.InetAddress;
16-
import java.text.DateFormat;
16+
import java.time.LocalDateTime;
17+
import java.time.format.DateTimeFormatter;
18+
import java.time.format.FormatStyle;
1719
import java.util.ArrayList;
1820
import java.util.Date;
1921
import java.util.List;
@@ -55,7 +57,7 @@ public void start(OutputStream outputStream, String feederInfo) throws IOExcepti
5557
output.print(Labels.getLabel("exporter.txt.scanned"));
5658
output.print(' ');
5759
output.println(feederInfo);
58-
output.println(DateFormat.getDateTimeInstance().format(new Date()));
60+
output.println(LocalDateTime.now().format(DateTimeFormatter.ofLocalizedDateTime(FormatStyle.MEDIUM)));
5961
output.println();
6062
}
6163
}

src/net/azib/ipscan/exporters/XMLExporter.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88
import net.azib.ipscan.config.Version;
99

1010
import java.io.*;
11-
import java.text.SimpleDateFormat;
11+
import java.time.LocalDateTime;
12+
import java.time.format.DateTimeFormatter;
13+
import java.time.format.FormatStyle;
1214
import java.util.Date;
1315

1416
/**
@@ -45,8 +47,8 @@ public void start(OutputStream outputStream, String feederInfo) throws IOExcepti
4547
output.println("<!-- This file has been generated by " + Version.getFullName() + " -->");
4648
output.println("<!-- Visit the website at " + Version.WEBSITE + " -->");
4749

48-
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
49-
output.println("<scanning_report time=\"" + sdf.format(new Date()) + "\">");
50+
DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
51+
output.println("<scanning_report time=\"" + LocalDateTime.now().format(dtf) + "\">");
5052

5153
// this is a hack to extract feeder name from the feederInfo
5254
// this may not work with some non-standard feeders

0 commit comments

Comments
 (0)