diff options
author | Tor Norbye <tnorbye@google.com> | 2013-01-04 09:40:04 -0800 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2013-01-04 09:40:04 -0800 |
commit | cf7f3984edfb23ce6bb85ebd101c165c7c0cafa6 (patch) | |
tree | dd91fc8b63faeff1fa236121da64fb438c2fec15 | |
parent | a44e0307227f81dbb3139bcbbbb463123ad92870 (diff) | |
parent | 9d99a725286c43ab0c4a642fddc4f0ab8a6057dd (diff) | |
download | sdk-cf7f3984edfb23ce6bb85ebd101c165c7c0cafa6.zip sdk-cf7f3984edfb23ce6bb85ebd101c165c7c0cafa6.tar.gz sdk-cf7f3984edfb23ce6bb85ebd101c165c7c0cafa6.tar.bz2 |
Merge "42051: Subversion folder causes NPE in PreCompilerBuilder"
-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); |