This is an automated email from the ASF dual-hosted git repository. matthiasblaesing pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/netbeans-tools.git
The following commit(s) were added to refs/heads/master by this push: new 7f2aaf0 Added check for ext (.) to avoid null pointer exception new 7ffce24 Merge pull request #41 from ebresie/master 7f2aaf0 is described below commit 7f2aaf0e3884483b57da873b7ecbbd2aefbe64c9 Author: Eric Bresie <ebre...@gmail.com> AuthorDate: Mon Jan 25 14:50:14 2021 -0600 Added check for ext (.) to avoid null pointer exception --- convert/src/convert/ConvertAndCopy.java | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/convert/src/convert/ConvertAndCopy.java b/convert/src/convert/ConvertAndCopy.java index fbcb2c8..df87977 100644 --- a/convert/src/convert/ConvertAndCopy.java +++ b/convert/src/convert/ConvertAndCopy.java @@ -86,15 +86,18 @@ public class ConvertAndCopy { } } else { final String name = rel.toString(); - final String fileEnding = name.substring(name.lastIndexOf(".")); - if (IMAGE_FILE_ENDINGS.contains(fileEnding)) { - imageFiles.add(p); - continue; - } else if (".properties".equals(fileEnding)) { - regenerateBundleFile(p, t); - copied++; - System.out.println("Regenerated: " + t); - continue; + // check if filename includes an extension for special cases + if (name.contains(".")) { + final String fileEnding = name.substring(name.lastIndexOf(".")); + if (IMAGE_FILE_ENDINGS.contains(fileEnding)) { + imageFiles.add(p); + continue; + } else if (".properties".equals(fileEnding)) { + regenerateBundleFile(p, t); + copied++; + System.out.println("Regenerated: " + t); + continue; + } } } notCopied.add(p); --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org For additional commands, e-mail: commits-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists