jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1418387 - in /jackrabbit/oak/trunk: oak-core/src/test/java/org/apache/jackrabbit/oak/security/authentication/token/TokenProviderImplTest.java oak-mk-remote/src/main/java/org/apache/jackrabbit/mk/server/Response.java
Date Fri, 07 Dec 2012 16:47:06 GMT
Author: mduerig
Date: Fri Dec  7 16:47:05 2012
New Revision: 1418387

URL: http://svn.apache.org/viewvc?rev=1418387&view=rev
Log:
- remove unnecessary null check
- fix @NonNull violation

Modified:
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/security/authentication/token/TokenProviderImplTest.java
    jackrabbit/oak/trunk/oak-mk-remote/src/main/java/org/apache/jackrabbit/mk/server/Response.java

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/security/authentication/token/TokenProviderImplTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/security/authentication/token/TokenProviderImplTest.java?rev=1418387&r1=1418386&r2=1418387&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/security/authentication/token/TokenProviderImplTest.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/security/authentication/token/TokenProviderImplTest.java
Fri Dec  7 16:47:05 2012
@@ -264,12 +264,12 @@ public class TokenProviderImplTest exten
         @Nonnull
         @Override
         public Map<String, String> getPrivateAttributes() {
-            return null;
+            return Collections.emptyMap();
         }
         @Nonnull
         @Override
         public Map<String, String> getPublicAttributes() {
-            return null;
+            return Collections.emptyMap();
         }
     }
 }
\ No newline at end of file

Modified: jackrabbit/oak/trunk/oak-mk-remote/src/main/java/org/apache/jackrabbit/mk/server/Response.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-mk-remote/src/main/java/org/apache/jackrabbit/mk/server/Response.java?rev=1418387&r1=1418386&r2=1418387&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-mk-remote/src/main/java/org/apache/jackrabbit/mk/server/Response.java
(original)
+++ jackrabbit/oak/trunk/oak-mk-remote/src/main/java/org/apache/jackrabbit/mk/server/Response.java
Fri Dec  7 16:47:05 2012
@@ -129,10 +129,8 @@ class Response implements Closeable {
         if (!keepAlive) {
             writeLine("Connection: Close");
         }
-        if (headers != null) {
-            for (Map.Entry<String, String> header : headers.entrySet()) {
-                writeLine(String.format("%s: %s", header.getKey(), header.getValue()));
-            }
+        for (Map.Entry<String, String> header : headers.entrySet()) {
+            writeLine(String.format("%s: %s", header.getKey(), header.getValue()));
         }
 
         writeLine("");



Mime
View raw message