[ 
https://issues.apache.org/jira/browse/DERBY-673?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13689253#comment-13689253
 ] 

Dag H. Wanvik commented on DERBY-673:
-------------------------------------

Rick; the C_NodeNames class is gone. Most of the C_NodeTypes constants are 
useless but in some cases they are used to differentiate logical node classes 
mapped onto one physical node class. That usage could be refactored into enums 
defined by that physical class, and would be good to do in a next step.

Knut, you are right, the renamings were done to avoid the shadowing of class 
members. They could be removed I guess; shadowing isn't necessarily bad, but 
its probably a good idea to avoid them; that enables us to keep the IDE 
warnings enabled and so detect blunders due to new errors.

I also found a way to enable warnings to detect now useless casts (-Xlint:cast) 
so I'll upload a revised version 2 of the patch shortly.

Note: since classes in impl/sql/compilation do no always get compiled as part 
of the build.xml that logically is supposed to build those classes (they get 
sucked in for compilation in the iapi parts of the code I believe), I had to 
enable warnings in other build.xml files to see the warnings and even then I 
didn't see them all, so in the end I resorted to compile the classes by hand to 
get all the warnings :( More work to do there...


                
> Get rid of the NodeFactory
> --------------------------
>
>                 Key: DERBY-673
>                 URL: https://issues.apache.org/jira/browse/DERBY-673
>             Project: Derby
>          Issue Type: Improvement
>          Components: SQL
>            Reporter: Rick Hillegas
>            Assignee: Dag H. Wanvik
>         Attachments: derby-673-1.diff.gz, derby-673-1.status, 
> nodefactory-31.status, nodefactory-31.zip
>
>
> This piece of code once had a purpose in life. It was one of the 
> double-joints which allowed cloudscape to ship with and without compiler 
> support for the synchronization language. Synchronization has been removed. 
> If we want to plug in optional language components, I think there are better 
> ways to do this.
> The NodeFactory turned into a big, sprawling piece of code. At some point 
> this code was slimmed down by telescoping all of its factory methods into a 
> couple unwieldly, weakly-typed overloads backed by cumbersome logic in the 
> actual node constructors. I would like to reintroduce strongly typed node 
> constructors which the parser can call directly. This will make node 
> generation easier to read and less brittle and it will get rid of the now 
> useless NodeFactory class.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to