Ok - I have some questions on style and convention in WS projects.
I'm the new guy here, so I'll go along with what the project does.
A bunch of my fixes were undone by anil's latest checkin, and I'm not
sure why.
Look at ScountUddiJaxrHelper.java around line 166
First, the current line is :
Description desc = descvect != null? (Description)
descvect.elementAt(0) : null;
Now, do we still want to propagate the null like this, or set a new
Description("") instead? If we do this here, it means we don't have
to do null checks forever after.
here's a bit of the diff :
+ Description desc = descvect != null? (Description)
descvect.elementAt(0) : null;
- Description desc = null;
-
- if (descvect != null && descvect.size() > 0) {
- desc = (Description)descvect.elementAt(0);
- }
- else {
- desc = new Description("");
- }
-
Organization org = new OrganizationImpl(lcm);
- org.setName(getIString(name, lcm));
- org.setDescription(getIString((String)desc.getValue(), lcm));
+ if( name != null ) org.setName(getIString(name, lcm));
+ if( desc != null ) org.setDescription(getIString((String)
desc.getValue(), lcm));
Now, what I had, the if-else is more "wordy", but I find that this
kind of thing is much easier to "read" w/o having to read, if you get
my drift. You can get the sense that there's an if/else w/o reading
exactly
it also means that things like
+ if( desc != null ) org.setDescription(getIString((String)
desc.getValue(), lcm));
just go away to become
org.setDescription(.....)
and that I think is easier to maintain for people not intimately
familiar, or people like me who come back to the code from time to time.
I don't want to unwind what Anil did, but I do need to fix some
things as this code is still throwing NPEs for me when running
against JUDDI as the server...
geir
On Jun 19, 2005, at 2:01 PM, Geir Magnusson Jr. wrote:
On Jun 17, 2005, at 12:56 AM, Anil Saldhana wrote:
Hi all,
I think we are ready to do the first release
(mileston e or regular). On my workspace, Scout passes
the Jaxr tck as part of the J2EE 1.4 TCK. I would
like to invite Geir to test it too.
Doesn't work. What are you testing against? When I test against
the latest JUDDI, it bombs throwing NPE where it didn't.
Does Apache have a copy of the TCK?
Yep
Dims, what are the steps to do a release?
Well, I'll fix the NPEs first.
Cheers,
Anil
__________________________________
Yahoo! Mail Mobile
Take Yahoo! Mail with you! Check email on your mobile phone.
http://mobile.yahoo.com/learn/mail
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
Geir Magnusson Jr +1-203-665-6437
[EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
Geir Magnusson Jr +1-203-665-6437
[EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]