You are viewing a plain text version of this content. The canonical link for it is here.
Posted to npanday-commits@incubator.apache.org by br...@apache.org on 2014/07/08 05:09:36 UTC

svn commit: r1608660 - /incubator/npanday/trunk/components/dotnet-registry/src/main/java/npanday/registry/impl/WinRegistry.java

Author: brett
Date: Tue Jul  8 05:09:35 2014
New Revision: 1608660

URL: http://svn.apache.org/r1608660
Log:
[NPANDAY-505] support recursive registry lookups

Avoid NPE

Modified:
    incubator/npanday/trunk/components/dotnet-registry/src/main/java/npanday/registry/impl/WinRegistry.java

Modified: incubator/npanday/trunk/components/dotnet-registry/src/main/java/npanday/registry/impl/WinRegistry.java
URL: http://svn.apache.org/viewvc/incubator/npanday/trunk/components/dotnet-registry/src/main/java/npanday/registry/impl/WinRegistry.java?rev=1608660&r1=1608659&r2=1608660&view=diff
==============================================================================
--- incubator/npanday/trunk/components/dotnet-registry/src/main/java/npanday/registry/impl/WinRegistry.java (original)
+++ incubator/npanday/trunk/components/dotnet-registry/src/main/java/npanday/registry/impl/WinRegistry.java Tue Jul  8 05:09:35 2014
@@ -521,9 +521,11 @@ public class WinRegistry
         try
         {
             String value = WinRegistry.readString( registryHKey.getHKey(), key, valueName );
-            Matcher m = REGISTRY_REFERENCE_REGEX.matcher(value);
-            if (m.matches()) {
-                value = getValue(RegistryHKey.tryGetFromName(m.group(1)), m.group(2), m.group(3));
+            if (value != null) {
+                Matcher m = REGISTRY_REFERENCE_REGEX.matcher(value);
+                if (m.matches()) {
+                    value = getValue(RegistryHKey.tryGetFromName(m.group(1)), m.group(2), m.group(3));
+                }
             }
             return value;
         }