Project

Profile

Help

Bug #6400

closed

XdmItem.getStringValue() throws undocumented exception

Added by Michael Kay 27 days ago. Updated 25 days ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
s9api API
Sprint/Milestone:
-
Start date:
2024-04-20
Due date:
% Done:

0%

Estimated time:
Legacy ID:
Applies to branch:
12, trunk
Fix Committed on Branch:
12, trunk
Fixed in Maintenance Release:
Platforms:
Java

Description

The s9api methods XdmItem.getStringValue() and XdmItem.getUnicodeStringValue() throw the internal unchecked exception UncheckedXPathException if applied to an item (such as a map) that has no string value. The exception thrown should be a checked exception and should be documented in the Javadoc.

(Hmmm: adding a checked exception to an existing method may mean existing application code no longer compiles. Perhaps we should only do this at a major release?)

Please register to edit this issue

Also available in: Atom PDF