You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by se...@apache.org on 2017/03/24 18:38:45 UTC

svn commit: r1788521 - /commons/proper/net/trunk/src/main/java/examples/cidr/SubnetUtilsExample.java

Author: sebb
Date: Fri Mar 24 18:38:45 2017
New Revision: 1788521

URL: http://svn.apache.org/viewvc?rev=1788521&view=rev
Log:
(FindBugs) use %n rather than \n for locale-dependent EOLs

Modified:
    commons/proper/net/trunk/src/main/java/examples/cidr/SubnetUtilsExample.java

Modified: commons/proper/net/trunk/src/main/java/examples/cidr/SubnetUtilsExample.java
URL: http://svn.apache.org/viewvc/commons/proper/net/trunk/src/main/java/examples/cidr/SubnetUtilsExample.java?rev=1788521&r1=1788520&r2=1788521&view=diff
==============================================================================
--- commons/proper/net/trunk/src/main/java/examples/cidr/SubnetUtilsExample.java (original)
+++ commons/proper/net/trunk/src/main/java/examples/cidr/SubnetUtilsExample.java Fri Mar 24 18:38:45 2017
@@ -33,27 +33,27 @@ public class SubnetUtilsExample {
         SubnetUtils utils = new SubnetUtils(subnet);
         SubnetInfo info = utils.getInfo();
 
-        System.out.printf("Subnet Information for %s:\n", subnet);
+        System.out.printf("Subnet Information for %s:%n", subnet);
         System.out.println("--------------------------------------");
-        System.out.printf("IP Address:\t\t\t%s\t[%s]\n", info.getAddress(),
+        System.out.printf("IP Address:\t\t\t%s\t[%s]%n", info.getAddress(),
                 Integer.toBinaryString(info.asInteger(info.getAddress())));
-        System.out.printf("Netmask:\t\t\t%s\t[%s]\n", info.getNetmask(),
+        System.out.printf("Netmask:\t\t\t%s\t[%s]%n", info.getNetmask(),
                 Integer.toBinaryString(info.asInteger(info.getNetmask())));
-        System.out.printf("CIDR Representation:\t\t%s\n\n", info.getCidrSignature());
+        System.out.printf("CIDR Representation:\t\t%s%n%n", info.getCidrSignature());
 
-        System.out.printf("Supplied IP Address:\t\t%s\n\n", info.getAddress());
+        System.out.printf("Supplied IP Address:\t\t%s%n%n", info.getAddress());
 
-        System.out.printf("Network Address:\t\t%s\t[%s]\n", info.getNetworkAddress(),
+        System.out.printf("Network Address:\t\t%s\t[%s]%n", info.getNetworkAddress(),
                 Integer.toBinaryString(info.asInteger(info.getNetworkAddress())));
-        System.out.printf("Broadcast Address:\t\t%s\t[%s]\n", info.getBroadcastAddress(),
+        System.out.printf("Broadcast Address:\t\t%s\t[%s]%n", info.getBroadcastAddress(),
                 Integer.toBinaryString(info.asInteger(info.getBroadcastAddress())));
-        System.out.printf("Low Address:\t\t\t%s\t[%s]\n", info.getLowAddress(),
+        System.out.printf("Low Address:\t\t\t%s\t[%s]%n", info.getLowAddress(),
                 Integer.toBinaryString(info.asInteger(info.getLowAddress())));
-        System.out.printf("High Address:\t\t\t%s\t[%s]\n", info.getHighAddress(),
+        System.out.printf("High Address:\t\t\t%s\t[%s]%n", info.getHighAddress(),
                 Integer.toBinaryString(info.asInteger(info.getHighAddress())));
 
-        System.out.printf("Total usable addresses: \t%d\n", Long.valueOf(info.getAddressCountLong()));
-        System.out.printf("Address List: %s\n\n", Arrays.toString(info.getAllAddresses()));
+        System.out.printf("Total usable addresses: \t%d%n", Long.valueOf(info.getAddressCountLong()));
+        System.out.printf("Address List: %s%n%n", Arrays.toString(info.getAllAddresses()));
 
         final String prompt ="Enter an IP address (e.g. 192.168.0.10):";
         System.out.println(prompt);