spring-attic / eclipse-integration-gradle

Gradle Tooling for Eclipse
Eclipse Public License 1.0
298 stars 108 forks source link

NPE during Eclipse Gradle project refresh #99

Closed warwickhunter closed 9 years ago

warwickhunter commented 9 years ago

I see this exception all the time when I try and refresh my project.

eclipse.buildId=4.5.1.M20150904-0015
java.version=1.8.0_65
java.vendor=Oracle Corporation
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_AU
Framework arguments:  -product org.eclipse.epp.package.java.product
Command-line arguments:  -os linux -ws gtk -arch x86_64 -product  org.eclipse.epp.package.java.product
org.springsource.ide.eclipse.gradle.core
Error Wed Nov 25 16:45:58 AEST 2015

java.lang.NullPointerException
at org.springsource.ide.eclipse.gradle.core.GradleCore.matches(GradleCore.java:250)
at org.springsource.ide.eclipse.gradle.core.GradleCore.getGradleProject(GradleCore.java:225)
at org.springsource.ide.eclipse.gradle.core.classpathcontainer.GradleDependencyComputer.computeEntries(GradleDependencyComputer.java:139)
at org.springsource.ide.eclipse.gradle.core.classpathcontainer.GradleDependencyComputer.getClassPath(GradleDependencyComputer.java:107)
at org.springsource.ide.eclipse.gradle.core.classpathcontainer.GradleClassPathContainer.getClasspathEntries(GradleClassPathContainer.java:166)
at org.eclipse.jdt.internal.core.JavaProject.resolveClasspath(JavaProject.java:2699)
at org.eclipse.jdt.internal.core.JavaProject.resolveClasspath(JavaProject.java:2857)
at org.eclipse.jdt.internal.core.ClasspathChange.generateDelta(ClasspathChange.java:235)
at org.eclipse.jdt.internal.core.DeltaProcessor.resourceChanged(DeltaProcessor.java:2032)
at org.eclipse.jdt.internal.core.DeltaProcessingState.resourceChanged(DeltaProcessingState.java:477)
at org.eclipse.core.internal.events.NotificationManager$1.run(NotificationManager.java:299)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.NotificationManager.notify(NotificationManager.java:289)
at org.eclipse.core.internal.events.NotificationManager.broadcastChanges(NotificationManager.java:152)
at org.eclipse.core.internal.resources.Workspace.broadcastPostChange(Workspace.java:373)
at org.eclipse.core.internal.resources.Workspace.endOperation(Workspace.java:1470)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2250)
at org.eclipse.jdt.internal.core.JavaModelOperation.runOperation(JavaModelOperation.java:794)
at org.eclipse.jdt.core.JavaCore.setClasspathContainer(JavaCore.java:5479)
at org.springsource.ide.eclipse.gradle.core.classpathcontainer.GradleClassPathContainer.setJDTClassPathContainer(GradleClassPathContainer.java:291)
at org.springsource.ide.eclipse.gradle.core.classpathcontainer.GradleClassPathContainer.notifyJDT(GradleClassPathContainer.java:276)
at org.springsource.ide.eclipse.gradle.core.classpathcontainer.JarRemapRefresher$1$1.doit(JarRemapRefresher.java:117)
at org.springsource.ide.eclipse.gradle.core.util.GradleRunnable.run(GradleRunnable.java:104)
at org.springsource.ide.eclipse.gradle.core.util.JobUtil.withRule(JobUtil.java:192)
at org.springsource.ide.eclipse.gradle.core.classpathcontainer.JarRemapRefresher$1.doit(JarRemapRefresher.java:110)
at org.springsource.ide.eclipse.gradle.core.util.GradleRunnable$1.run(GradleRunnable.java:53)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
kdvolder commented 9 years ago

Thanks, I added a couple of null checks.

kdvolder commented 9 years ago

https://github.com/spring-projects/eclipse-integration-gradle/commit/7d011e8bdd70a02ddc0631b0f65dde62f00e12ad

warwickhunter commented 9 years ago

Thanks!