aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/cgeo/geocaching/files/LocalStorage.java
diff options
context:
space:
mode:
authorSamuel Tardieu <sam@rfc1149.net>2014-01-10 22:46:21 +0100
committerSamuel Tardieu <sam@rfc1149.net>2014-01-11 00:34:34 +0100
commit61f8c7c5fdb3a1d1d452e219b45879024df02bef (patch)
tree376a7faaf2582136d15e42f5af7eb1b72072df9f /main/src/cgeo/geocaching/files/LocalStorage.java
parent2f903a12fcb61a25fe744680ffa3b2060ab1c009 (diff)
downloadcgeo-61f8c7c5fdb3a1d1d452e219b45879024df02bef.zip
cgeo-61f8c7c5fdb3a1d1d452e219b45879024df02bef.tar.gz
cgeo-61f8c7c5fdb3a1d1d452e219b45879024df02bef.tar.bz2
refactoring: add @Nullable annotations
Diffstat (limited to 'main/src/cgeo/geocaching/files/LocalStorage.java')
-rw-r--r--main/src/cgeo/geocaching/files/LocalStorage.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/main/src/cgeo/geocaching/files/LocalStorage.java b/main/src/cgeo/geocaching/files/LocalStorage.java
index edbecf6..3d0c19a 100644
--- a/main/src/cgeo/geocaching/files/LocalStorage.java
+++ b/main/src/cgeo/geocaching/files/LocalStorage.java
@@ -122,7 +122,7 @@ public final class LocalStorage {
* the geocode
* @return the cache directory
*/
- public static File getStorageDir(final String geocode) {
+ public static File getStorageDir(@Nullable final String geocode) {
return storageDir(getStorage(), geocode);
}
@@ -134,11 +134,11 @@ public final class LocalStorage {
* the geocode
* @return the cache directory
*/
- private static File getStorageSecDir(final String geocode) {
+ private static File getStorageSecDir(@Nullable final String geocode) {
return storageDir(getStorageSec(), geocode);
}
- private static File storageDir(final File base, final String geocode) {
+ private static File storageDir(final File base, @Nullable final String geocode) {
return new File(base, StringUtils.defaultIfEmpty(geocode, "_others"));
}
@@ -155,7 +155,7 @@ public final class LocalStorage {
* true if an url was given, false if a file name was given
* @return the file
*/
- public static File getStorageFile(final String geocode, final String fileNameOrUrl, final boolean isUrl, final boolean createDirs) {
+ public static File getStorageFile(@Nullable final String geocode, final String fileNameOrUrl, final boolean isUrl, final boolean createDirs) {
return buildFile(getStorageDir(geocode), fileNameOrUrl, isUrl, createDirs);
}