From: Roland Haeder Date: Tue, 29 Sep 2015 08:19:33 +0000 (+0200) Subject: added missing javadoc + updated jars X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=0b215d6018a6f8879eebc87ed991b19d6dfe38ad;p=jcustomer-core.git added missing javadoc + updated jars Signed-off-by:Roland Häder --- diff --git a/lib/jcore.jar b/lib/jcore.jar index 9bfe655..7884f3d 100644 Binary files a/lib/jcore.jar and b/lib/jcore.jar differ diff --git a/lib/jcoreee.jar b/lib/jcoreee.jar index 7d03abd..621440d 100644 Binary files a/lib/jcoreee.jar and b/lib/jcoreee.jar differ diff --git a/src/org/mxchange/jshopcore/model/customer/CustomerUtils.java b/src/org/mxchange/jshopcore/model/customer/CustomerUtils.java index ce15d8f..7e660fa 100644 --- a/src/org/mxchange/jshopcore/model/customer/CustomerUtils.java +++ b/src/org/mxchange/jshopcore/model/customer/CustomerUtils.java @@ -66,14 +66,16 @@ public class CustomerUtils extends BaseFrameworkSystem { // Default is found boolean isFound = true; - long part1 = 0; - long part2 = 0; + + // Declare variables + long part1; + long part2; // Is the number used? while (isFound) { // Both number parts - part1 = Math.round(Math.random() * 100000); - part2 = Math.round(Math.random() * 1000); + part1 = Math.round(Math.random() * 100_000); + part2 = Math.round(Math.random() * 1_000); // Generate new number customerNumber = String.format("%s-%s", part1, part2); //NOI18N @@ -127,7 +129,7 @@ public class CustomerUtils extends BaseFrameworkSystem { // Is the number used? while (isFound) { // Both number parts - String randString = String.format("%s:%s:%s", Long.toHexString(Math.round(Math.random() * 1000000)), em, customer.getCustomerNumber()); + String randString = String.format("%s:%s:%s", Long.toHexString(Math.round(Math.random() * 1_000_000)), em, customer.getCustomerNumber()); // Generate access key, use SHA512 hashing and BASE64-encoding for strong key generation accessKey = Base64.encodeBase64String(Sha2Crypt.sha512Crypt(randString.getBytes()).getBytes()).substring(0, 100);