Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 229212

Summary: Type check is required when cast parent of virtual node to Schema
Product: [Tools] Data Tools Reporter: Cong Chen <cong.chen>
Component: ConnectivityAssignee: song lin <linsong>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: bfitzpat, hui.cao, linsong, lj
Version: 1.6Flags: bfitzpat: review? (lj)
Target Milestone: 1.6RC1   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
patch for 229212
none
patch-for-229212 none

Description Cong Chen CLA 2008-04-28 22:53:27 EDT
New contributed sybase enablement includes a feature that Schema node can be hidden by user. So if user choose to hide schema, in ServerExplorerVNodeContentProviderNav, methods like displayUDFNodeChildren(Object parent) will throw CCE since for now it just cast parent of UDF Node to Schema without check, while it's Catalog/Database if schema was hidden.
So for support new contributed feature, type check should be added to this kind of methods.
Comment 1 song lin CLA 2008-04-29 02:16:34 EDT
Created attachment 97908 [details]
patch for 229212

Add type check in ServerExplorerVNodeContentProviderNav to retrieve the children of schema
Comment 2 Hui Cao CLA 2008-04-29 04:59:50 EDT
Hi Loic, can you please have a review? Thanks!
Comment 3 Brian Fitzpatrick CLA 2008-04-29 09:23:44 EDT
Loic, would you please review the patch?
Comment 4 Loic JULIEN CLA 2008-04-29 11:54:51 EDT
(In reply to comment #3)
> Loic, would you please review the patch?
> 

Hi Lin,

Thanks for submitting the patch. 

Here is some of my feedback:

* I would really appreciate a new patch submitted where we abstract some of that code in one common method (copied 6 times). In order to get the EMF collections, we could use the structure feature.
* I would really appreciate if the variables can be slightly better named. For instance grandParent is not a name commonly used in c/s. Ancestor or something more appropriate for our domain would be great.

Thanks again,
~Loic
Comment 5 Brian Fitzpatrick CLA 2008-04-29 12:32:32 EDT
Thanks for looking at it Loic! Lin, can you address Loic's comments?
Comment 6 song lin CLA 2008-04-30 00:52:24 EDT
Created attachment 98119 [details]
patch-for-229212

update patch according to Loic's comments.
Comment 7 Brian Fitzpatrick CLA 2008-04-30 09:20:08 EDT
That's definitely much cleaner. Loic, can you take another look and then we'll get this delivered.
Comment 8 Loic JULIEN CLA 2008-05-02 12:05:30 EDT
(In reply to comment #7)
> That's definitely much cleaner. Loic, can you take another look and then we'll
> get this delivered.
> 

Thanks Lin,

Really appreciated the follow up on this! Looks much better, please deliver.

Thanks,
~Loic
Comment 9 Brian Fitzpatrick CLA 2008-05-02 12:12:06 EDT
Please send an e-mail to the DTP-PMC mailing list requesting inclusion of this patch in the M7/RC0 release. You must get at least 2/4 PMC members to sign off on it for inclusion. Unfortunately, I'm not sure that will occur before Monday's build.
Comment 10 Loic JULIEN CLA 2008-05-04 11:38:56 EDT
(In reply to comment #9)
> Please send an e-mail to the DTP-PMC mailing list requesting inclusion of this
> patch in the M7/RC0 release. You must get at least 2/4 PMC members to sign off
> on it for inclusion. Unfortunately, I'm not sure that will occur before
> Monday's build.
> 

Hi Brian, as I am fine with this fix not being in RC0, Lin, when RC1 reopens, please deliver the fix.

Thanks,
~Loic
Comment 11 Brian Fitzpatrick CLA 2008-05-14 11:47:39 EDT
Delivered patch to o.e.d.c.sqm.server.ui as tag v200805142345
also fixed small issue uncovered with ConnectionInfoImpl in o.e.d.c.sqm.core that occurred when the filter key was null
Comment 12 Loic JULIEN CLA 2008-05-14 14:29:43 EDT
(In reply to comment #11)
> Delivered patch to o.e.d.c.sqm.server.ui as tag v200805142345
> also fixed small issue uncovered with ConnectionInfoImpl in o.e.d.c.sqm.core
> that occurred when the filter key was null
> 

Thanks Brian for delivering this.
~Loic
Comment 13 Brian Fitzpatrick CLA 2008-07-01 17:44:13 EDT
Closing bugs