josef-core change log

Release 3.2.5

org.josef.finance
UK sort codes have been updated to be valid from august 17th 2017.

org.josef.util.Formatter
org.josef.util.FormatterFactory
Added support for BigeDcimals. You should now be able to parse a BigDecimal value and format a BigDecimal value. Actually the formatting of a BigDecimal is done using the good old formatDecimal(...) methods since a BigDecimal is a number. See the javadoc of class Formatter(Factory)documentation for details. In short in comes down to this:
Formatter usFormatter = new Formatter(Locale.US);
BigDecimal usValue = usformatter.parseBigDecimal("1,234,567.89");
Parses a US value using the default pattern.
Formatter dutchFormatter = new Formatter(new Locale("nl"));
BigDecimal dutchValue = dutchFormatter.parseBigDecimal("1.234.567,89", "#,###,###.##");
Parses a Dutch value using the supplied pattern. Note that the value uses localized pattern characters but the pattern does not. So the decimal separator in the pattern is always a point.
Note: If you use the FormatterFactory to create a Formatter to format a BigDecimal, this formatter will NOT check if grouping separators are actually correct. Class Formatter has a method: validatePositionsOfGroupingSeparators(...) that performs this validation for you.

Release 3.2.4

This release was about removing lambda expressions from JSF modules. WebLogic 12.1.3. had a problem with this. See the release notes for josef-jar-faces. The core is not changed in this release.

Release 3.2.3

org.josef.jdbc.SqlStatementUtil
The changes, previously made to this class caused compatibility problems. So I reverted the changes. Effectively, createWhereClause creates a StringBuffer again, and addToWhereClause appends to this StringBuffer.

Release 3.2.2

org.josef.jpa.AbstractEntity
Added equals and hashCode methods that were already present in the J2EE6 branch.

org.josef.util.MailServer
Added this new class that represents a mail server.

org.josef.util.DnsUtil
Added this new utility class for Domain Name System communication.
This is work in progress.

org.josef.jdbc.SqlStatementUtil
The createWhereClause and addToWhereClause methods now return a String instead of a StringBuffer. This makes the code cleaner. It does force you to rewrite your code however. Look at the updated example in the source code.

Release 3.2.1

org.josef.util.CodeDescription
Renamed createCaseInsensitiveDescriptionComparator to caseInsensitiveDescriptionComparator since we were dealing with a function reference, not with an actual create method anymore.

org.josef.util.FormatterFactory
The createDecimalFormat(Locale, String) method created a NumberFormat object that was only suitable for parsing Integers.

org.josef.util.Formatter
The existing parseDecimal(String) method does NOT accept an exponent in the input anymore. Previously this method would happily parse 2E34 as valid input. Should you want to parse a decimal value with an exponent, then please use the new parseDecimalAcceptingAnExponent(final String decimalNumber) method.
Another new method parseDecimal(String decimalNumber, String pattern) has been added. You can use this method to use your own pattern for parsing decimal numbers. Note that its use is limited as this method will parse a value of 12345 with a pattern of "#". It will properly take care of parsing decimal numbers with or without grouping symbols in either the decimal number of the pattern.
The test code has been adapted as well.

org.josef.jdbc.Column
Now contains a property named nullable. The order in which the members are added in the toString() method have changed. precision is now used before scale, which is more logical.

org.josef.jdbc.Constraint
Now contains a referencedTableName and referenceColumns that can be used in combination with foreign keys.

org.josef.jdbc.Database
Corrected problems with width, scale and precision. Meta data contains a scale and precision but the Column class uses a width for character columns and a scale and precision for numeric fields. Added a getConstraints and getActualConstraints method.

org.josef.jdbc.DerbyDatabase
Implemented the new getActualConstraint(s) methods by always throwing an UnsupportedOperationException.

org.josef.jdbc.OracleDatabase
Added the getActualConstraints method. The existing getActualConstraint method now also reads referential integrity data.

org.josef.jdbc.OracleDatabase
OracleDatabase did not fetch the primary keys of a table.

Source jar and javadoc jar is generated upon a "mvn deploy" command.

org.josef.finance
UK sort code files have been upgraded to the 12/6/2017 version.

org.josef.jpa.SequentialIdGenerator
Now contains a new method to get a new sequential ID and then reserve a number of other id's. So when you know in advance how many id's of a certain sequence you're going to need, you can reserve them all in a single transaction. The signature of the new method is:
public long fetchNextSequentialID(final String sequenceName, final int numberOfIds)

UKSortCodeRange.txt
Updated with information that will be valid from January 9, 2017. More info is available at: https://www.vocalink.com/customer-support/modulus-checking/

org.josef.util.Iso3166Country
Changed enum name CZECH_REPUBLIC to CZECHIA. This caused changes in other files that used this enum.

org.josef.jpa.AbstractEntity
Removed the equals and hashCode methods from this class. Search for: should-i-write-equals-methods-in-jpa-entities on StackOverflow for an explanation.

org.josef.util.CodeDescription
org.josef.util.LocalizableEnumeration
Changed the code member field from Object to Serializable to make this class Serialiazble.

org.josef.util.Formatter
Restored the German translations.

org.josef.util.Iso3166Country
Updated the description of the country woth code 'CZ'.

org.josef.finance.UKSortCode
The UK sort codes were not properly read from the sort codes text file! Notice that this does not influence the validity of sort code/bank account combinations, only the determination of what sort code belongs to what bank fails.

All classes
Logging now uses lambda expressions

org.josef.util.CodeDescription
Added a method to perform a case insensitive comparison on description.

log4j2.xml
Has been renamed to log4jconfig.xml. This prevents programs that are using Josef, from automatically picking up Josef's log4j configuration file. When you need the configuration file use: -Dlog4j.configurationFile='path/log4j2config.xml'

org.josef.finance.UKBankAccountNumber
Updated the check on sortcode/bankaccount to ignore unhandled exceptions and to execute the second algorithm in case the first one fails. The first exceptions (1 and 5) are now being handled.

The different sort codes, and sort code ranges are updated to 2016-06-13.

org.josef.finance.UKSortCodeSubstitution
Now uses Strings instead of Integers.

Release 3.2.0

org.josef.web.servlet.GZipFilter
Added this class and some supporting classes to zip responses.

org.josef.util.GlobalSettings
Added application server Url to the settings.

Moved classes with a @PersistContext to josef-ejb since TomEE would not deploy josef-demo-web with these classes in josef-core.

Switched to Log4J/2 from JUL.

Release 3.1.1

org.josef.util.CReflection
The method getAllFields does not return synthetic fields anymore. Synthetic fields may be added by code coverage tools for example. Jacoco actually made the unit test for CReflection fail, hence the change.

org.josef.Iso3166Country.properties
Changed description (English) of Bonaire, Saint Eustatius and Saba as suggested by the ISO3166 group.

org.josef.science.math.CByte
Added method to convert a byte to two hexadecimal characters. Added method to convert a byte array to two hexadecimal characters per byte.

org.josef.util.security
Added new Hash class that supports hashing using MessageDigest.

org.josef.web.servleAbstractHttpServlet
Synchronization was wrong and has been fixed. In the process the service method was changed since currently this method won't be called when the server is shutting down.

org.josef.util.ParameterName
Introduced this new class which contains all parameter names of methods from the util package, that are used in a CDebug.checkParameter...(...) statement. Usage of this class voids duplicate strings.

org.josef.util.Formatter
The parseDateTime(String, String) method now correctly parses short date/times and date only input. The parseDecimal method did not add a message when group separators were used incorrectly. An empty message was returned in the InvalidArgumentException.

Release 3.1.0 (Bumped the minor version after creating the j2ee6 branch)

org.josef.util.FormatterFactory
Now contains a new createDateFormat method that is now used by: formatDate(final Date date, final String pattern). Previously the formatDate used a standard SimpleDateFormat object that did not take localized pattern characters into account, resulting in an exception, stating that 'jjjj' is not a valid pattern character.

Added a new resource bundle key to get a localized pattern for a date/time that includes hours, minutes and seconds. Corrected an error in the Dutch localized pattern characters that caused milliseconds to be displayed instead of the number of seconds.

org.josef.util.CReflection
Instead of the "old" IllegalAccessException, InvocationTargetException and NoSuchMethodException the more generic RefelctiveOperationException is used. This results in cleaner code.

org.josef.util.CReflection
Instead of the "old" IllegalAccessException, InvocationTargetException and NoSuchMethodException the more generic ReflrctiveOperationException is used. This results in cleaner code.