zhou5852 / google-plugin-for-eclipse

Automatically exported from code.google.com/p/google-plugin-for-eclipse
Eclipse Public License 1.0
0 stars 0 forks source link

NPE in LaunchConfigAffectingChangesListener.updateLaunchConfigs seen in JBoss Tools #60

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
While developping JBoss Tools, having Google Suite Plugin 
2.5.2.v201202290255-rel-r37 installed, I'm seeing this exception in the log 
when creating any new project from JBoss Central 
(http://eclipse.dzone.com/articles/learn-java-ee-6-quickly-using) :

!MESSAGE Problems occurred when invoking code from plug-in: 
"org.eclipse.equinox.preferences".
!STACK 0
java.lang.NullPointerException
    at com.google.gdt.eclipse.suite.launch.processors.LaunchConfigAffectingChangesListener.updateLaunchConfigs(LaunchConfigAffectingChangesListener.java:247)
    at com.google.gdt.eclipse.suite.launch.processors.LaunchConfigAffectingChangesListener.preferenceChange(LaunchConfigAffectingChangesListener.java:166)
    at org.eclipse.core.internal.preferences.EclipsePreferences$3.run(EclipsePreferences.java:841)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    at org.eclipse.core.internal.preferences.EclipsePreferences.firePreferenceEvent(EclipsePreferences.java:844)
    at org.eclipse.core.internal.preferences.EclipsePreferences.putBoolean(EclipsePreferences.java:871)
    at org.eclipse.m2e.core.internal.project.ResolverConfigurationIO.saveResolverConfiguration(ResolverConfigurationIO.java:59)
    at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager.enableBasicMavenNature(ProjectConfigurationManager.java:437)
    at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager.create(ProjectConfigurationManager.java:835)
    at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager.importProjects(ProjectConfigurationManager.java:145)
    at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager.createArchetypeProject(ProjectConfigurationManager.java:692)
    at org.jboss.tools.maven.project.examples.wizard.ArchetypeExamplesWizardPage$5.run(ArchetypeExamplesWizardPage.java:400)
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2344)
    at org.jboss.tools.maven.project.examples.wizard.ArchetypeExamplesWizardPage$6.run(ArchetypeExamplesWizardPage.java:412)
    at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)

LaunchConfigAffectingChangesListener.updateLaunchConfigs is missing a 
null-check on the javaProject parameter.

Original issue reported on code.google.com by fbri...@gmail.com on 11 Apr 2012 at 4:37

GoogleCodeExporter commented 9 years ago
The reason is attempting to perform an update on non-java project while a java 
project required and having no check for this. The attached patch fixes the 
issue.

Original comment by victor.r...@gmail.com on 26 May 2012 at 1:49

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by chand...@google.com on 31 May 2012 at 4:21