OSDN Git Service

Add logic to prevent null tag names from populating the note tag name list. This...
authorRandy Baumgarte <randy@fbn.cx>
Mon, 23 Jan 2012 12:47:14 +0000 (07:47 -0500)
committerRandy Baumgarte <randy@fbn.cx>
Mon, 23 Jan 2012 12:47:14 +0000 (07:47 -0500)
src/cx/fbn/nevernote/sql/NoteTable.java

index af0ad28..92cc548 100644 (file)
@@ -305,7 +305,10 @@ public class NoteTable {
                        for (int i=0; i<n.getTagGuids().size(); i++) {\r
                                String currentGuid = n.getTagGuids().get(i);\r
                                Tag tag = tagTable.getTag(currentGuid);\r
                        for (int i=0; i<n.getTagGuids().size(); i++) {\r
                                String currentGuid = n.getTagGuids().get(i);\r
                                Tag tag = tagTable.getTag(currentGuid);\r
-                               tagNames.add(tag.getName());\r
+                               if (tag.getName() != null)\r
+                                       tagNames.add(tag.getName());\r
+                               else\r
+                                       tagNames.add("");\r
                        }\r
                        n.setTagNames(tagNames);\r
                }\r
                        }\r
                        n.setTagNames(tagNames);\r
                }\r