<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to bugs</title><link>https://sourceforge.net/p/dvorcode/bugs/</link><description>Recent changes to bugs</description><atom:link href="https://sourceforge.net/p/dvorcode/bugs/feed.rss" rel="self"/><language>en</language><lastBuildDate>Tue, 19 Aug 2008 01:23:56 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/dvorcode/bugs/feed.rss" rel="self" type="application/rss+xml"/><item><title>NPE when transcoding data that contains un-mapped chars</title><link>https://sourceforge.net/p/dvorcode/bugs/1/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;When testing the filter function using an input file, the program crashed with Null Pointer Exception.&lt;/p&gt;
&lt;p&gt;-- Condition&lt;br /&gt;
run dvorcode to decode or encode an input file&lt;br /&gt;
-- Expected Result&lt;br /&gt;
output produced either encoded or decoded as requested&lt;br /&gt;
-- Actual Result&lt;br /&gt;
Null Pointer Exception in call to String.replace()&lt;/p&gt;
&lt;p&gt;-- Investigation&lt;/p&gt;
&lt;p&gt;This is due to the replace call being supplied a Null String reference. When the Map is asked to retrieve a character which is not a key, it returns Null.&lt;/p&gt;
&lt;p&gt;-- Resolution&lt;/p&gt;
&lt;p&gt;Rather than have a COMMON_STRING that contains all characters in common between encodings, use the Map's own predicates to guard string replacement.&lt;/p&gt;
&lt;p&gt;That is, replace the guarding code that does a String.contains() with a call to Map.containsKey()&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Michael Lockhart</dc:creator><pubDate>Tue, 19 Aug 2008 01:23:56 -0000</pubDate><guid>https://sourceforge.net445acf9c6be7370ddacfc2ccbbcd16827b76b479</guid></item></channel></rss>