[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[wtp-dev] ValidationRegistryReader problem

Sorry for the other mail…

 

Working with the latest release of WTP 3.0.1 I keep getting this exception:

 

java.lang.NullPointerException

            at org.eclipse.wst.validation.internal.ValidationRegistryReader.isConfiguredOnProject(ValidationRegistryReader.java:1056)

            at org.eclipse.wst.validation.internal.operations.ValidationOperation.setEnabledValidators(ValidationOperation.java:553)

            at org.eclipse.wst.validation.internal.operations.ManualValidatorsOperation.<init>(ManualValidatorsOperation.java:33)

            at org.eclipse.wst.validation.internal.ValManager.getValidators(ValManager.java:203)

            at org.eclipse.wst.validation.internal.ValManager.accept(ValManager.java:646)

            at org.eclipse.wst.validation.internal.ValManager.validate(ValManager.java:546)

            at org.eclipse.wst.validation.internal.ValBuilderJob.visit(ValBuilderJob.java:176)

            at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:68)

            at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:79)

            at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:48)

            at org.eclipse.wst.validation.internal.ValBuilderJob.deltaBuild(ValBuilderJob.java:154)

            at org.eclipse.wst.validation.internal.ValBuilderJob.run(ValBuilderJob.java:135)

            at org.eclipse.wst.validation.internal.ValBuilderJob.runInWorkspace(ValBuilderJob.java:123)

            at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38)

            at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

 

 

Checking the code I think we have synchronization problem, since there is a nullity check before we get the exception:

            if (projectValidationMetaData == null)

                  projectValidationMetaData = new HashMap<IProject, Set<ValidatorMetaData>>();

 

            Set<ValidatorMetaData> vmds = projectValidationMetaData.get(project);

            if (vmds != null) {

                  return vmds.contains(vmd);

            } else {

                  Set<ValidatorMetaData> prjVmds = getValidatorMetaData(project);

                  if (prjVmds == null || prjVmds.size() == 0)return false;

                  projectValidationMetaData.put(project, prjVmds);  ß exception occurs here

                  return prjVmds.contains(vmd);

            }

 

Am I missing something?

 

Thanks,

Roy