https://issues.apache.org/bugzilla/show_bug.cgi?id=52661

[email protected] changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |NEW

--- Comment #2 from [email protected] 2012-02-15 06:12:10 UTC ---
The text diff of the revision 720997 is as bellows: 
--- poi/trunk/src/java/org/apache/poi/hssf/record/HyperlinkRecord.java   
2008/11/26 22:00:07    720996
+++ poi/trunk/src/java/org/apache/poi/hssf/record/HyperlinkRecord.java   
2008/11/26 22:00:29    720997
@@ -628,7 +628,7 @@
         if ((_linkOpts & HLINK_TARGET_FRAME) != 0) {
             buffer.append("    .targetFrame=
").append(getTargetFrame()).append("\n");
         }
-        if((_linkOpts & HLINK_URL) != 0) {
+        if((_linkOpts & HLINK_URL) != 0 && _moniker != null) {
             buffer.append("    .moniker   =
").append(_moniker.formatAsString()).append("\n");
         }
         if ((_linkOpts & HLINK_PLACE) != 0) {

we can see that only checking "(_linkOpts & HLINK_URL) != 0" can not guarantee
that " _moniker != null". 

If the revision 720997 is a right fix, then I think the Line 559 of the method
"serialize" should also be fixed this way. 

I think it will be more reasonable to treat them in a same way.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to