diff options
author | Bananeweizen <bananeweizen@gmx.de> | 2013-09-13 18:32:36 +0200 |
---|---|---|
committer | Bananeweizen <bananeweizen@gmx.de> | 2013-09-13 18:32:36 +0200 |
commit | 5049488a85ed9785c7cc452f0fbc08a57c8241d5 (patch) | |
tree | 3d30ac4d0be0070abe1926c8943f84889fee9abb /main | |
parent | 6f159746cbffff44108a015fad80b78ddf2b5aad (diff) | |
download | cgeo-5049488a85ed9785c7cc452f0fbc08a57c8241d5.zip cgeo-5049488a85ed9785c7cc452f0fbc08a57c8241d5.tar.gz cgeo-5049488a85ed9785c7cc452f0fbc08a57c8241d5.tar.bz2 |
refactoring: compile errors for missing nullable annotations
Diffstat (limited to 'main')
-rw-r--r-- | main/src/cgeo/geocaching/connector/oc/OCAuthorizationActivity.java | 5 | ||||
-rw-r--r-- | main/src/cgeo/geocaching/twitter/TwitterAuthorizationActivity.java | 37 |
2 files changed, 22 insertions, 20 deletions
diff --git a/main/src/cgeo/geocaching/connector/oc/OCAuthorizationActivity.java b/main/src/cgeo/geocaching/connector/oc/OCAuthorizationActivity.java index ec6bbf4..96875ce 100644 --- a/main/src/cgeo/geocaching/connector/oc/OCAuthorizationActivity.java +++ b/main/src/cgeo/geocaching/connector/oc/OCAuthorizationActivity.java @@ -6,6 +6,7 @@ import cgeo.geocaching.network.OAuthAuthorizationActivity; import cgeo.geocaching.settings.Settings; import org.apache.commons.lang3.tuple.ImmutablePair; +import org.eclipse.jdt.annotation.Nullable; public class OCAuthorizationActivity extends OAuthAuthorizationActivity { @@ -28,12 +29,12 @@ public class OCAuthorizationActivity extends OAuthAuthorizationActivity { } @Override - protected void setTempTokens(String tokenPublic, String tokenSecret) { + protected void setTempTokens(@Nullable final String tokenPublic, @Nullable final String tokenSecret) { Settings.setTokens(authParams.getTempTokenPublicPrefKey(), tokenPublic, authParams.getTempTokenSecretPrefKey(), tokenSecret); } @Override - protected void setTokens(String tokenPublic, String tokenSecret, boolean enable) { + protected void setTokens(@Nullable final String tokenPublic, @Nullable final String tokenSecret, final boolean enable) { Settings.setTokens(authParams.getTokenPublicPrefKey(), tokenPublic, authParams.getTokenSecretPrefKey(), tokenSecret); if (tokenPublic != null) { Settings.setTokens(authParams.getTempTokenPublicPrefKey(), null, authParams.getTempTokenSecretPrefKey(), null); diff --git a/main/src/cgeo/geocaching/twitter/TwitterAuthorizationActivity.java b/main/src/cgeo/geocaching/twitter/TwitterAuthorizationActivity.java index 4d9a1f2..13dbde9 100644 --- a/main/src/cgeo/geocaching/twitter/TwitterAuthorizationActivity.java +++ b/main/src/cgeo/geocaching/twitter/TwitterAuthorizationActivity.java @@ -1,10 +1,11 @@ package cgeo.geocaching.twitter; import cgeo.geocaching.R; -import cgeo.geocaching.settings.Settings; import cgeo.geocaching.network.OAuthAuthorizationActivity; +import cgeo.geocaching.settings.Settings; import org.apache.commons.lang3.tuple.ImmutablePair; +import org.eclipse.jdt.annotation.Nullable; public class TwitterAuthorizationActivity extends OAuthAuthorizationActivity { @@ -19,87 +20,87 @@ public class TwitterAuthorizationActivity extends OAuthAuthorizationActivity { } @Override - protected ImmutablePair<String, String> getTempTokens() { + protected final ImmutablePair<String, String> getTempTokens() { return Settings.getTempToken(); } @Override - protected void setTempTokens(String tokenPublic, String tokenSecret) { + protected final void setTempTokens(@Nullable final String tokenPublic, @Nullable final String tokenSecret) { Settings.setTwitterTempTokens(tokenPublic, tokenSecret); } @Override - protected void setTokens(String tokenPublic, String tokenSecret, boolean enable) { + protected final void setTokens(@Nullable final String tokenPublic, @Nullable final String tokenSecret, final boolean enable) { Settings.setTwitterTokens(tokenPublic, tokenSecret, enable); } @Override - protected String getAuthTitle() { + protected final String getAuthTitle() { return res.getString(R.string.auth_twitter); } @Override - protected String getAuthAgain() { + protected final String getAuthAgain() { return res.getString(R.string.auth_again); } @Override - protected String getErrAuthInitialize() { + protected final String getErrAuthInitialize() { return res.getString(R.string.err_auth_initialize); } @Override - protected String getAuthStart() { + protected final String getAuthStart() { return res.getString(R.string.auth_start); } @Override - protected String getAuthDialogCompleted() { + protected final String getAuthDialogCompleted() { return res.getString(R.string.auth_dialog_completed); } @Override - protected String getErrAuthProcess() { + protected final String getErrAuthProcess() { return res.getString(R.string.err_auth_process); } @Override - protected String getAuthDialogWait() { + protected final String getAuthDialogWait() { return res.getString(R.string.auth_dialog_wait); } @Override - protected String getAuthDialogPinTitle() { + protected final String getAuthDialogPinTitle() { return res.getString(R.string.auth_dialog_pin_title); } @Override - protected String getAuthDialogPinMessage() { + protected final String getAuthDialogPinMessage() { return res.getString(R.string.auth_dialog_pin_message); } @Override - protected String getAboutAuth1() { + protected final String getAboutAuth1() { return res.getString(R.string.about_auth_1); } @Override - protected String getAboutAuth2() { + protected final String getAboutAuth2() { return res.getString(R.string.about_auth_2); } @Override - protected String getAuthAuthorize() { + protected final String getAuthAuthorize() { return res.getString(R.string.auth_authorize); } @Override - protected String getAuthPinHint() { + protected final String getAuthPinHint() { return res.getString(R.string.auth_pin_hint); } @Override - protected String getAuthFinish() { + protected final String getAuthFinish() { return res.getString(R.string.auth_finish); } |