Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas FAUVERGUE2017-01-17 15:02:59 +0000
committerGerrit Code Review @ Eclipse.org2017-01-18 10:35:36 +0000
commitd9e7dcac172e360eb053c4cff35479e801d8e760 (patch)
treef6835735a59ee4dbdf8d50963d132c9beba85399 /plugins/infra
parent3642411bd315d2b3c4f2f3162856357c5fe7547b (diff)
downloadorg.eclipse.papyrus-d9e7dcac172e360eb053c4cff35479e801d8e760.tar.gz
org.eclipse.papyrus-d9e7dcac172e360eb053c4cff35479e801d8e760.tar.xz
org.eclipse.papyrus-d9e7dcac172e360eb053c4cff35479e801d8e760.zip
Bug 510581: [OneFile] NPE when the system meet a file without extension
in the same folder https://bugs.eclipse.org/bugs/show_bug.cgi?id=510581 - The file extension must be null when the file does not have file extension Change-Id: I1248142bb7125ac0a8349c8bccac4b6bfc03804f Signed-off-by: Nicolas FAUVERGUE <nicolas.fauvergue@cea.fr>
Diffstat (limited to 'plugins/infra')
-rw-r--r--plugins/infra/onefile/org.eclipse.papyrus.infra.onefile/src/org/eclipse/papyrus/infra/onefile/model/impl/PapyrusFile.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/infra/onefile/org.eclipse.papyrus.infra.onefile/src/org/eclipse/papyrus/infra/onefile/model/impl/PapyrusFile.java b/plugins/infra/onefile/org.eclipse.papyrus.infra.onefile/src/org/eclipse/papyrus/infra/onefile/model/impl/PapyrusFile.java
index f5fc561112a..ce0b5e6c8cf 100644
--- a/plugins/infra/onefile/org.eclipse.papyrus.infra.onefile/src/org/eclipse/papyrus/infra/onefile/model/impl/PapyrusFile.java
+++ b/plugins/infra/onefile/org.eclipse.papyrus.infra.onefile/src/org/eclipse/papyrus/infra/onefile/model/impl/PapyrusFile.java
@@ -57,7 +57,7 @@ public class PapyrusFile implements IPapyrusFile {
final String fileWithoutExtension = OneFileUtils.withoutFileExtension(file);
if(fileWithoutExtension.equals(resourceWithoutExtension)) {
files.add(res);
- }else if(res.getFileExtension().equals(PropertiesFilesUtils.PROPERTIES_FILE_EXTENSION) && resourceWithoutExtension.startsWith(fileWithoutExtension)){
+ }else if(PropertiesFilesUtils.PROPERTIES_FILE_EXTENSION.equals(res.getFileExtension()) && resourceWithoutExtension.startsWith(fileWithoutExtension)){
String possibleLocale = resourceWithoutExtension.substring(fileWithoutExtension.length());
if(possibleLocale.startsWith("_")){ //$NON-NLS-1$
possibleLocale = possibleLocale.substring(1);

Back to the top