Merge pull request #7285 from markmckinnon/8008-IllegalArgumentException-in-RA-ExtractZoneIdentifier-module

8008-IllegalArgumentException-in-RA-ExtractZoneIdentifier-module
This commit is contained in:
Richard Cordovano 2021-09-24 11:05:50 -04:00 committed by GitHub
commit 6817e73266
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -318,7 +318,13 @@ final class ExtractZoneIdentifier extends Extract {
*/
ZoneIdentifierInfo(AbstractFile zoneFile) throws IOException {
fileName = zoneFile.getName();
properties.load(new ReadContentInputStream(zoneFile));
// properties.load will throw IllegalArgument if unicode characters are found in the zone file.
try {
properties.load(new ReadContentInputStream(zoneFile));
} catch (IllegalArgumentException ex) {
String message = String.format("Unable to parse Zone Id for File %s", fileName); //NON-NLS
LOG.log(Level.WARNING, message);
}
}
/**