Bugs item #1571645, was opened at 2006-10-05 18:51
Message generated for change (Comment added) made by cjuergen
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=119984&aid=1571645&group_id=19984

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Submission/Ingest
Group: 1.3.2
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Mark H. Wood (mwoodiupui)
Assigned to: Nobody/Anonymous (nobody)
Summary: NullPointerException possible in review.jsp

Initial Comment:
In layoutSection, if inputType.equals("dropdown"),
Utils.addEntities is passed the result of
DCInput.getDisplayString().  getDisplayString is
documented to return null if the input stored-value is
not matched, which will cause addEntities to throw a
NPE.  The code should probably look more like the
"qualdrop_value" case below it, i.e. change:

  row.append(Utils.addEntities(displayVal));

to:

  if (displayVal != null)
  {
    row.append(Utils.addEntities(displayVal));
  }

I am still working the problem report, but I believe
that I've seen this NPE thrown in practice.  In any
case the code in review.jsp does not gracefully handle
a documented return value.

BTW the doc comments for getDisplayString (and
getStoredString) don't seem to match the code.

----------------------------------------------------------------------

>Comment By: Claudia Juergen (cjuergen)
Date: 2009-01-09 12:01

Message:
Hi Mark,

as far as I can tell this will not lead to a NPE. Nevertheless it is
something which should not happen.
But rather than hiding the thus chosen value in the review stage (it will
be stored anyway) a tradeoff might be to use the stored value as label see
attached patch.
Best would be to change the definition for the input forms and make the
display Values mandatory.

Claudia


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=119984&aid=1571645&group_id=19984

------------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It is the best place to buy or sell services for
just about anything Open Source.
http://p.sf.net/sfu/Xq1LFB
_______________________________________________
Dspace-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-devel

Reply via email to