Fix crash got with: 1. try to rename / delete a file with an outdated access token...
[pub/Android/ownCloud.git] / src / com / owncloud / android / network / BearerCredentials.java
index 35e2b4e..59596e8 100644 (file)
@@ -38,10 +38,10 @@ public class BearerCredentials implements Credentials {
      * @param token     The bearer token
      */
     public BearerCredentials(String token) {
      * @param token     The bearer token
      */
     public BearerCredentials(String token) {
-        if (token == null) {
+        /*if (token == null) {
             throw new IllegalArgumentException("Bearer token may not be null");            
             throw new IllegalArgumentException("Bearer token may not be null");            
-        }
-        mAccessToken = token;
+        }*/
+        mAccessToken = (token == null) ? "" : token;
     }
 
 
     }