You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by ma...@apache.org on 2021/01/26 19:57:54 UTC
[netbeans-tools] branch master updated: Added check for ext (.) to
avoid null pointer exception
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 <eb...@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-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists