javacommons/security/javasrc/com/nokia/mj/impl/security/midp/storage/SecurityStorage.java
changeset 26 dc7c549001d5
parent 21 2a9601315dfc
child 46 4376525cdefb
child 50 023eef975703
--- a/javacommons/security/javasrc/com/nokia/mj/impl/security/midp/storage/SecurityStorage.java	Fri May 14 15:47:24 2010 +0300
+++ b/javacommons/security/javasrc/com/nokia/mj/impl/security/midp/storage/SecurityStorage.java	Thu May 27 12:49:31 2010 +0300
@@ -455,9 +455,13 @@
                 permEntry.addAttribute(new StorageAttribute(
                                            StorageNames.CLASS,
                                            p.getName()));
-                permEntry.addAttribute(new StorageAttribute(
-                                           StorageNames.NAME,
-                                           p.getTarget()));
+                if (p.getTarget() != null
+                        && p.getTarget().length() > 0)
+                {
+                    permEntry.addAttribute(new StorageAttribute(
+                                               StorageNames.NAME,
+                                               p.getTarget()));
+                }
                 if (p.getActionList() != null
                         && p.getActionList().length() > 0)
                 {
@@ -1250,9 +1254,13 @@
                 removePermissionQuery.addAttribute(new StorageAttribute(
                                                        StorageNames.CLASS,
                                                        p.getName()));
-                removePermissionQuery.addAttribute(new StorageAttribute(
-                                                       StorageNames.NAME,
-                                                       p.getTarget()));
+                if (p.getTarget() != null
+                        && p.getTarget().length() > 0)
+                {
+                    removePermissionQuery.addAttribute(new StorageAttribute(
+                                                           StorageNames.NAME,
+                                                           p.getTarget()));
+                }
                 if (p.getActionList() != null
                         && p.getActionList().length() > 0)
                 {