Bug in WatermarkAccesor::InsertWatermark?

Jun 27, 2008 at 12:28 AM
Looking at the InsertWatermark method in WatermarkAccesor.cs, I noticed something that does not look right. The following is the code.

if

 

(parentDocument.Headers.GetHeaderReference(HeaderType.First) == null)

 

   headers.Add(parentDocument.Headers.AddNewHeader(

HeaderType.First));

 

 

else

 

   headers.Add(parentDocument.Headers.AddNewHeader(

HeaderType.First));

Shouldn't for the else case, you want to get the header with "headers.Add(parentDocument.Headers.GetHeader(HeaderType.First))" instead of calling AddNewHeader again?

Thanks,

Peter.

 

Nov 9, 2008 at 7:51 PM
I think you're correct. The change will be included in the next version.