diff options
author | Tor Norbye <tnorbye@google.com> | 2013-01-03 18:25:26 -0800 |
---|---|---|
committer | Tor Norbye <tnorbye@google.com> | 2013-01-03 18:25:26 -0800 |
commit | 9d99a725286c43ab0c4a642fddc4f0ab8a6057dd (patch) | |
tree | dd91fc8b63faeff1fa236121da64fb438c2fec15 /eclipse/plugins | |
parent | a44e0307227f81dbb3139bcbbbb463123ad92870 (diff) | |
download | sdk-9d99a725286c43ab0c4a642fddc4f0ab8a6057dd.zip sdk-9d99a725286c43ab0c4a642fddc4f0ab8a6057dd.tar.gz sdk-9d99a725286c43ab0c4a642fddc4f0ab8a6057dd.tar.bz2 |
42051: Subversion folder causes NPE in PreCompilerBuilder
Change-Id: Ie2846fdd25a4ea05b798c62ec6512bffa84819f9
Diffstat (limited to 'eclipse/plugins')
-rw-r--r-- | eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/build/SourceProcessor.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/build/SourceProcessor.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/build/SourceProcessor.java index 7932a70..4ecb91d 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/build/SourceProcessor.java +++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/build/SourceProcessor.java @@ -366,15 +366,16 @@ public abstract class SourceProcessor { for (IResource r : members) { // get the type of the resource switch (r.getType()) { - case IResource.FILE: + case IResource.FILE: { // if this a file, check that the file actually exist // and that it's the type of of file that's used in this processor - if (r.exists() && - getExtensions().contains( - r.getFileExtension().toLowerCase(Locale.US))) { + String extension = r.exists() ? r.getFileExtension() : null; + if (extension != null && + getExtensions().contains(extension.toLowerCase(Locale.US))) { mFiles.put((IFile) r, new SourceFileData((IFile) r)); } break; + } case IResource.FOLDER: // recursively go through children scanFolderForSourceFiles(sourceFolder, (IFolder)r); |