mirror of
				https://github.com/owncloud/android-library.git
				synced 2025-10-31 10:27:45 +00:00 
			
		
		
		
	Prevent null values in OCShare members
This commit is contained in:
		
							parent
							
								
									b09969d078
								
							
						
					
					
						commit
						0238e51903
					
				| @ -86,17 +86,17 @@ public class OCShare implements Parcelable, Serializable { | |||||||
|         mFileSource = 0; |         mFileSource = 0; | ||||||
|         mItemSource = 0; |         mItemSource = 0; | ||||||
|         mShareType = ShareType.NO_SHARED;  |         mShareType = ShareType.NO_SHARED;  | ||||||
|         mShareWith = null; |         mShareWith = ""; | ||||||
|         mPath = null; |         mPath = ""; | ||||||
|         mPermissions = -1; |         mPermissions = -1; | ||||||
|         mSharedDate = 0; |         mSharedDate = 0; | ||||||
|         mExpirationDate = 0; |         mExpirationDate = 0; | ||||||
|         mToken = null; |         mToken = ""; | ||||||
|         mSharedWithDisplayName = null; |         mSharedWithDisplayName = ""; | ||||||
|         mIsFolder = false; |         mIsFolder = false; | ||||||
|         mUserId = -1; |         mUserId = -1; | ||||||
|         mIdRemoteShared = -1; |         mIdRemoteShared = -1; | ||||||
|         mShareLink = null; |         mShareLink = ""; | ||||||
|     }	 |     }	 | ||||||
|      |      | ||||||
|     /// Getters and Setters |     /// Getters and Setters | ||||||
| @ -138,7 +138,7 @@ public class OCShare implements Parcelable, Serializable { | |||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     public void setShareWith(String shareWith) { |     public void setShareWith(String shareWith) { | ||||||
|         this.mShareWith = shareWith; |         this.mShareWith = (shareWith != null) ? shareWith : ""; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     public String getPath() { |     public String getPath() { | ||||||
| @ -146,7 +146,7 @@ public class OCShare implements Parcelable, Serializable { | |||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     public void setPath(String path) { |     public void setPath(String path) { | ||||||
|         this.mPath = path; |         this.mPath = (path != null) ? path : ""; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     public int getPermissions() { |     public int getPermissions() { | ||||||
| @ -178,7 +178,7 @@ public class OCShare implements Parcelable, Serializable { | |||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     public void setToken(String token) { |     public void setToken(String token) { | ||||||
|         this.mToken = token; |         this.mToken = (token != null) ? token : ""; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     public String getSharedWithDisplayName() { |     public String getSharedWithDisplayName() { | ||||||
| @ -186,7 +186,7 @@ public class OCShare implements Parcelable, Serializable { | |||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     public void setSharedWithDisplayName(String sharedWithDisplayName) { |     public void setSharedWithDisplayName(String sharedWithDisplayName) { | ||||||
|         this.mSharedWithDisplayName = sharedWithDisplayName; |         this.mSharedWithDisplayName = (sharedWithDisplayName != null) ? sharedWithDisplayName : ""; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     public boolean isFolder() { |     public boolean isFolder() { | ||||||
| @ -218,7 +218,7 @@ public class OCShare implements Parcelable, Serializable { | |||||||
|     } |     } | ||||||
|      |      | ||||||
|     public void setShareLink(String shareLink) { |     public void setShareLink(String shareLink) { | ||||||
|     	this.mShareLink = shareLink; |         this.mShareLink = (shareLink != null) ? shareLink : ""; | ||||||
|     } |     } | ||||||
|      |      | ||||||
|     /**  |     /**  | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user