Commits

Christian Schlichtherle committed 7f79a2e

RCB

Comments (0)

Files changed (1)

truelicense-core/src/main/java/net/java/truelicense/core/BasicLicenseApplicationContext.java

     }
 
     final LicenseParameters chainedParameters(
-            LicenseConsumerManager parent,
-            Authentication authentication,
+            final LicenseConsumerManager parent,
+            final Authentication authentication,
             final @CheckForNull Encryption encryption) {
         if (authentication.parameters().forSigning())
             throw new IllegalArgumentException();
     }
 
     private LicenseParameters chainedParameters(
-            final LicenseConsumerManager parent,
-            final LicenseInitialization initialization,
-            final Authentication authentication,
-            final @CheckForNull Encryption encryption) {
-        return parameters(initialization, authentication, null != encryption
-                ? encryption
-                : parent.parameters().encryption());
+            LicenseConsumerManager parent,
+            LicenseInitialization initialization,
+            Authentication authentication,
+            @CheckForNull Encryption encryption) {
+        return parameters(initialization, authentication,
+                resolveEncryption(parent, encryption));
+    }
+
+    private static Encryption resolveEncryption(
+            LicenseConsumerManager parent,
+            @CheckForNull Encryption encryption) {
+        return null != encryption ? encryption : parent.parameters().encryption();
     }
 
     private LicenseParameters parameters(
                 c, authentication, c.codec(), c.compression(), encryption);
     }
 
-    private LicenseParameters parameters(
+    private static LicenseParameters parameters(
             final LicenseAuthorization authorization,
             final LicenseInitialization initialization,
             final LicenseValidation validation,