Build: Oracle Solaris Studio 12.2 (Build cnd-build-2711-on-100506)
VM: Java HotSpot(TM) Client VM, 16.0-b13, Java(TM) SE Runtime Environment, 1.6.0_18-b07
Created attachment 100006 [details]
it was "run" of bunha sample on OpenSolaris using express 10/6
I cannot reproduce the problem. The source code was re-written in the DLightSession and the line from stack cannot give NPE. I will close as WORKSFORME
easily reproduced with clean userdir on e**f when created Quote sample and started THA
Looks like key point here: default toolchain used in project is tied to Studio 12
*** Bug 202972 has been marked as a duplicate of this bug. ***
Created attachment 111418 [details]
please, review patch for 701
There are 2 more places where result of getDataStorageFor is not verified for null value... Shouldn't these be handled as well?
Created attachment 111431 [details]
next proposed patch is better. Although it's preferable to have logic used before introduction of proxy storages. Otherwise collectors are started even in case of missing storages
Created attachment 111435 [details]
Proposed patch contains:
- prevention of possible NPEs related to absence of particular storages;
- earlier initialization of serviceInfoDataStorage
Patch is good. The only question I have:
how initial split by two exclusive groups 'idproviders' and 'collectors' handles the situation when collector was not able to be initialized due to absence storage, wehn it is still indicator data provider.
How it will be inited? it's not in list 'idproviders'
Isn't it what is commented in the patch?
+ * DataCollector usually acts as IndicatorDataProvider..
+ * It could be that infrastructure cannot provide all needed
+ * storages for the collector. This means that collector will
+ * not be able to *store* any data, still it *may* be able to
+ * act as an IndicatorDataProvider (with transient data).
+ * So do unconditional init with serviceInfoDataStorage.
+ * This will give a chance for collector to at least provide
+ * some information for Indicators...
+ * Note: It is collector's responsibility to handle the
+ * situation when it was not initialized with DataStorages!
+ * Note: Collector *will* be notified about session start even
+ * if it was not initialized with any DataStorage.
Created attachment 111448 [details]
This time both operations:
are performed unconditionally (even if cannot find all needed storages).
So in this case DataFilter events will be available to the toolCollector..
Also I have split the patch into two.
This one contains changes related to infrastructure.
The second one (will attach) related to preparing ProcFSDataCollector to the situation if no storage provided...
Created attachment 111449 [details]
ProcFSDataCollector to be ready for storgae absence
I've reviewed both patches and now they looks like complete solution of the problem.
Thanks for splitting as well.
pushed to releases/release701_fixes
changeset: e7e7df47fd77 [http://hg.netbeans.org/releases/rev/e7e7df47fd77]
changeset: afa15f6d4e27 [http://hg.netbeans.org/releases/rev/afa15f6d4e27]
I agree there should be an extra fix which also keep sequence of calls in order as was before
extra fix is http://hg.netbeans.org/releases/rev/078f6bc91602
verified in dev OSS IDE build #3375,
NPE does not appear any more.
Integrated into 'releases'
User: Andrew Krasny <firstname.lastname@example.org>
Log: Bug #187469 - NullPointerException at org.netbeans.modules.dlight.management.api.DLightSession.prepareContext
verified in OSS dev build #3394 (built on NB 7.0.1 patch 2 20111007)
*** Bug 203564 has been marked as a duplicate of this bug. ***