Skip to content

Commit

Permalink
TFJ-824 update serialversionUID
Browse files Browse the repository at this point in the history
  • Loading branch information
yusuke committed Mar 12, 2014
1 parent 044c18a commit 74f2f77
Show file tree
Hide file tree
Showing 78 changed files with 126 additions and 86 deletions.
Expand Up @@ -29,8 +29,8 @@
* @since Twitter4J 2.2.4
*/
public class AlternativeHttpClientImpl extends HttpClientBase {
private static final long serialVersionUID = 4559427508443601046L;
private static Logger logger = Logger.getLogger(AlternativeHttpClientImpl.class);
private static final long serialVersionUID = -6969046478967208236L;

public AlternativeHttpClientImpl(HttpClientConfiguration conf) {
super(conf);
Expand Down
Expand Up @@ -23,6 +23,7 @@
* @since Twitter4J 2.2.4
*/
class AppEngineTwitterImpl extends TwitterImpl {

private static final long serialVersionUID = -2740925801854937207L;

AppEngineTwitterImpl(Configuration conf, Authorization auth) {
Expand Down
Expand Up @@ -10,7 +10,7 @@
* @since Twitter4J 2.2.4
*/
class LazyJSONImplFactory implements ObjectFactory {
private static final long serialVersionUID = 8032710811910749119L;
private static final long serialVersionUID = -8140872181877586582L;
private final ObjectFactory factory;
private final Configuration conf;

Expand Down Expand Up @@ -41,6 +41,8 @@ public Status createStatus(HttpResponse res) throws TwitterException {

public ResponseList<Status> createStatusList(final HttpResponse res) throws TwitterException {
return new LazyResponseList<Status>() {
private static final long serialVersionUID = 7409380696188770069L;

@Override
protected ResponseList<Status> createActualResponseList() throws TwitterException {
return StatusJSONImpl.createStatusList(res, conf);
Expand All @@ -55,6 +57,8 @@ public Trends createTrends(HttpResponse res) throws TwitterException {

public ResponseList<Trends> createTrendsList(final HttpResponse res) throws TwitterException {
return new LazyResponseList<Trends>() {
private static final long serialVersionUID = 4409084320158745041L;

@Override
protected ResponseList<Trends> createActualResponseList() throws TwitterException {
return TrendsJSONImpl.createTrendsList(res, conf.isJSONStoreEnabled());
Expand All @@ -68,6 +72,8 @@ public User createUser(HttpResponse res) throws TwitterException {

public ResponseList<User> createUserList(final HttpResponse res) throws TwitterException {
return new LazyResponseList<User>() {
private static final long serialVersionUID = -2342604239975503212L;

@Override
protected ResponseList<User> createActualResponseList() throws TwitterException {
return UserJSONImpl.createUserList(res, conf);
Expand All @@ -77,6 +83,8 @@ protected ResponseList<User> createActualResponseList() throws TwitterException

public ResponseList<User> createUserListFromJSONArray(final HttpResponse res) throws TwitterException {
return new LazyPagableResponseList<User>() {
private static final long serialVersionUID = -4560012795625599671L;

@Override
protected ResponseList<User> createActualResponseList() throws TwitterException {
return UserJSONImpl.createUserList(res.asJSONArray(), res, conf);
Expand All @@ -86,6 +94,8 @@ protected ResponseList<User> createActualResponseList() throws TwitterException

public ResponseList<User> createUserListFromJSONArray_Users(final HttpResponse res) throws TwitterException {
return new LazyPagableResponseList<User>() {
private static final long serialVersionUID = 3138828209116873524L;

@Override
protected ResponseList<User> createActualResponseList() throws TwitterException {
try {
Expand All @@ -107,6 +117,8 @@ public IDs createIDs(HttpResponse res) throws TwitterException {

public PagableResponseList<User> createPagableUserList(final HttpResponse res) throws TwitterException {
return new LazyPagableResponseList<User>() {
private static final long serialVersionUID = 5621780922424425436L;

@Override
protected ResponseList<User> createActualResponseList() throws TwitterException {
return UserJSONImpl.createUserList(res, conf);
Expand All @@ -120,6 +132,8 @@ public UserList createAUserList(HttpResponse res) throws TwitterException {

public PagableResponseList<UserList> createPagableUserListList(final HttpResponse res) throws TwitterException {
return new LazyPagableResponseList<UserList>() {
private static final long serialVersionUID = -1744513840306430678L;

@Override
protected PagableResponseList<UserList> createActualResponseList() throws TwitterException {
return UserListJSONImpl.createPagableUserListList(res, conf);
Expand All @@ -129,6 +143,8 @@ protected PagableResponseList<UserList> createActualResponseList() throws Twitte

public ResponseList<UserList> createUserListList(final HttpResponse res) throws TwitterException {
return new LazyResponseList<UserList>() {
private static final long serialVersionUID = -688537134684737190L;

@Override
protected ResponseList<UserList> createActualResponseList() throws TwitterException {
return UserListJSONImpl.createUserListList(res, conf);
Expand All @@ -138,6 +154,8 @@ protected ResponseList<UserList> createActualResponseList() throws TwitterExcept

public ResponseList<Category> createCategoryList(final HttpResponse res) throws TwitterException {
return new LazyResponseList<Category>() {
private static final long serialVersionUID = -499989158452701469L;

@Override
protected ResponseList<Category> createActualResponseList() throws TwitterException {
return CategoryJSONImpl.createCategoriesList(res, conf);
Expand All @@ -151,6 +169,8 @@ public DirectMessage createDirectMessage(HttpResponse res) throws TwitterExcepti

public ResponseList<DirectMessage> createDirectMessageList(final HttpResponse res) throws TwitterException {
return new LazyResponseList<DirectMessage>() {
private static final long serialVersionUID = -4033757208726428299L;

@Override
protected ResponseList<DirectMessage> createActualResponseList() throws TwitterException {
return DirectMessageJSONImpl.createDirectMessageList(res, conf);
Expand All @@ -164,6 +184,8 @@ public Relationship createRelationship(HttpResponse res) throws TwitterException

public ResponseList<Friendship> createFriendshipList(final HttpResponse res) throws TwitterException {
return new LazyResponseList<Friendship>() {
private static final long serialVersionUID = 2000670419499499826L;

@Override
protected ResponseList<Friendship> createActualResponseList() throws TwitterException {
return FriendshipJSONImpl.createFriendshipList(res, conf);
Expand All @@ -185,6 +207,8 @@ public SavedSearch createSavedSearch(HttpResponse res) throws TwitterException {

public ResponseList<SavedSearch> createSavedSearchList(final HttpResponse res) throws TwitterException {
return new LazyResponseList<SavedSearch>() {
private static final long serialVersionUID = 5885155689227833223L;

@Override
protected ResponseList<SavedSearch> createActualResponseList() throws TwitterException {
return SavedSearchJSONImpl.createSavedSearchList(res, conf);
Expand All @@ -194,6 +218,8 @@ protected ResponseList<SavedSearch> createActualResponseList() throws TwitterExc

public ResponseList<Location> createLocationList(final HttpResponse res) throws TwitterException {
return new LazyResponseList<Location>() {
private static final long serialVersionUID = -5502050661491788149L;

@Override
protected ResponseList<Location> createActualResponseList() throws TwitterException {
return LocationJSONImpl.createLocationList(res, conf);
Expand All @@ -207,6 +233,8 @@ public Place createPlace(HttpResponse res) throws TwitterException {

public ResponseList<Place> createPlaceList(final HttpResponse res) throws TwitterException {
return new LazyResponseList<Place>() {
private static final long serialVersionUID = 3477694658457823153L;

@Override
protected ResponseList<Place> createActualResponseList() throws TwitterException {
return PlaceJSONImpl.createPlaceList(res, conf);
Expand All @@ -233,6 +261,8 @@ public TwitterAPIConfiguration createTwitterAPIConfiguration(HttpResponse res) t

public ResponseList<HelpResources.Language> createLanguageList(final HttpResponse res) throws TwitterException {
return new LazyResponseList<HelpResources.Language>() {
private static final long serialVersionUID = -7722971198897121377L;

@Override
protected ResponseList<HelpResources.Language> createActualResponseList() throws TwitterException {
return LanguageJSONImpl.createLanguageList(res, conf);
Expand Down
Expand Up @@ -20,6 +20,8 @@
* @since Twitter4J 2.2.4
*/
abstract class LazyPagableResponseList<T extends TwitterResponse> extends LazyResponseList<T> implements PagableResponseList<T> {
private static final long serialVersionUID = -3478264948215362741L;

public boolean hasPrevious() {
return ((PagableResponseList) getTarget()).hasPrevious();
}
Expand Down
Expand Up @@ -25,7 +25,7 @@
* @since Twitter4J 2.2.4
*/
final class LazyQueryResult implements twitter4j.QueryResult {
private static final long serialVersionUID = 1469029015622811726L;
private static final long serialVersionUID = 2570528566436339617L;
private HttpResponse res;
private ObjectFactory factory;
private QueryResult target = null;
Expand Down
Expand Up @@ -25,6 +25,7 @@
* @since Twitter4J 2.2.4
*/
abstract class LazyResponseList<T> implements ResponseList<T> {
private static final long serialVersionUID = -1928006011908397874L;
ResponseList<T> target = null;

LazyResponseList() {
Expand Down
Expand Up @@ -22,6 +22,7 @@
* @since Twitter4J 2.1.7
*/
final class LazySimilarPlaces extends LazyResponseList<Place> implements SimilarPlaces {
private static final long serialVersionUID = 8243780300298227789L;
private HttpResponse res;
private ObjectFactory factory;

Expand Down
Expand Up @@ -20,6 +20,7 @@
* @since Twitter4J 2.2.4
*/
public class TwitterRuntimeException extends RuntimeException {

private static final long serialVersionUID = 4476620514268902834L;

public TwitterRuntimeException(Throwable th) {
Expand Down
Expand Up @@ -26,6 +26,7 @@
* @since Twitter4J 2.2.4
*/
public class LazyHttpClientImpl extends HttpClientImpl {
private static final long serialVersionUID = 7325894890960046422L;
HttpClient client;

public LazyHttpClientImpl(HttpClientConfiguration conf) {
Expand Down
Expand Up @@ -33,8 +33,8 @@
* @since Twitter4J 2.1.0
*/
public final class AsyncTwitterFactory implements java.io.Serializable {
private static final long serialVersionUID = 1394946919393640158L;
private final Configuration conf;
private static final long serialVersionUID = -2565686715640816219L;
private static final AsyncTwitter SINGLETON;

static {
Expand Down Expand Up @@ -110,6 +110,7 @@ public AsyncTwitter getInstance(Authorization auth) {

/**
* a kind of copy factory method constructs an AsyncTwitter from Twitter instance
*
* @param twitter Twitter instance
* @return an instance
*/
Expand Down
Expand Up @@ -43,7 +43,7 @@
* @see {@link twitter4j.TwitterListener}
*/
class AsyncTwitterImpl extends TwitterBaseImpl implements AsyncTwitter {
private static final long serialVersionUID = -2008667933225051907L;
private static final long serialVersionUID = 6491978434917152443L;
private final Twitter twitter;
private final List<TwitterListener> listeners = new ArrayList<TwitterListener>();

Expand Down
Expand Up @@ -10,7 +10,7 @@

public abstract class HttpClientBase implements HttpClient, Serializable {
private static final Logger logger = Logger.getLogger(HttpClientBase.class);
private static final long serialVersionUID = 6944924907755685265L;
private static final long serialVersionUID = -8016974810651763053L;
protected final HttpClientConfiguration CONF;

private final Map<String, String> requestHeaders;
Expand Down
Expand Up @@ -31,7 +31,6 @@
class HttpClientImpl extends HttpClientBase implements HttpResponseCode, java.io.Serializable {
private static final Logger logger = Logger.getLogger(HttpClientImpl.class);

private static final long serialVersionUID = -8819171414069621503L;

static {
// detecting dalvik (Android platform)
Expand All @@ -47,6 +46,8 @@ class HttpClientImpl extends HttpClientBase implements HttpResponseCode, java.io
}
}

private static final long serialVersionUID = -403500272719330534L;

public HttpClientImpl() {
super(ConfigurationContext.getInstance().getHttpClientConfiguration());
}
Expand Down
Expand Up @@ -28,11 +28,11 @@
* @author Yusuke Yamamoto - yusuke at mac.com
*/
public final class HttpParameter implements Comparable, java.io.Serializable {
private static final long serialVersionUID = 4046908449190454692L;
private String name = null;
private String value = null;
private File file = null;
private InputStream fileBody = null;
private static final long serialVersionUID = -8708108746980739212L;

public HttpParameter(String name, String value) {
this.name = name;
Expand Down
Expand Up @@ -28,6 +28,7 @@
*/
public final class HttpRequest implements java.io.Serializable {

private static final long serialVersionUID = 3365496352032493020L;
private final RequestMethod method;

private final String url;
Expand All @@ -38,8 +39,6 @@ public final class HttpRequest implements java.io.Serializable {

private Map<String, String> requestHeaders;

private static final long serialVersionUID = -3463594029098858381L;


private static final HttpParameter[] NULL_PARAMETERS = new HttpParameter[0];

Expand Down
Expand Up @@ -24,11 +24,11 @@
* @since Twitter4J 2.1.3
*/
public class XAuthAuthorization implements Authorization, java.io.Serializable {
private static final long serialVersionUID = -7260372598870697494L;
private BasicAuthorization basic;

private String consumerKey;
private String consumerSecret;
private static final long serialVersionUID = -6082451214083464902L;

public XAuthAuthorization(BasicAuthorization basic) {
this.basic = basic;
Expand Down
Expand Up @@ -23,7 +23,7 @@
* @since Twitter4J 2.1.9
*/
class AccountSettingsJSONImpl extends TwitterResponseImpl implements AccountSettings, java.io.Serializable {
private static final long serialVersionUID = 7983363611306383416L;
private static final long serialVersionUID = 603189815663175766L;
private final boolean SLEEP_TIME_ENABLED;
private final String SLEEP_START_TIME;
private final String SLEEP_END_TIME;
Expand Down
Expand Up @@ -24,7 +24,7 @@
*/
class AccountTotalsJSONImpl extends TwitterResponseImpl implements AccountTotals, java.io.Serializable {

private static final long serialVersionUID = -2291419345865627123L;
private static final long serialVersionUID = 4199733699237229892L;
private final int updates;
private final int followers;
private final int favorites;
Expand Down
Expand Up @@ -24,10 +24,10 @@
*/
final class CategoryJSONImpl implements Category, java.io.Serializable {

private static final long serialVersionUID = 3811335888122469876L;
private String name;
private String slug;
private int size;
private static final long serialVersionUID = -6703617743623288566L;

CategoryJSONImpl(JSONObject json) throws JSONException {
init(json);
Expand Down
Expand Up @@ -27,7 +27,7 @@
* @author Yusuke Yamamoto - yusuke at mac.com
*/
/*package*/ final class DirectMessageJSONImpl extends TwitterResponseImpl implements DirectMessage, java.io.Serializable {
private static final long serialVersionUID = -7104233663827757577L;
private static final long serialVersionUID = 7092906238192790921L;
private long id;
private String text;
private long senderId;
Expand Down
Expand Up @@ -20,7 +20,7 @@
* @author Yusuke Yamamoto - yusuke at mac.com
*/
abstract class EntityIndex implements Comparable<EntityIndex>, java.io.Serializable {
private static final long serialVersionUID = 3864336402689899384L;
private static final long serialVersionUID = 3757474748266170719L;
private int start = -1;
private int end = -1;

Expand Down
Expand Up @@ -23,7 +23,7 @@
* @since Twitter4J 2.1.9
*/
class FriendshipJSONImpl implements Friendship {
private static final long serialVersionUID = 7724410837770709741L;
private static final long serialVersionUID = 6847273186993125826L;
private final long id;
private final String name;
private final String screenName;
Expand Down
Expand Up @@ -23,7 +23,7 @@
* @since Twitter4J 2.1.9
*/
/*package*/ class HashtagEntityJSONImpl extends EntityIndex implements HashtagEntity, SymbolEntity {
private static final long serialVersionUID = 4068992372784813200L;
private static final long serialVersionUID = -5317828991902848906L;
private String text;


Expand Down
Expand Up @@ -27,10 +27,10 @@
*/
/*package*/ final class IDsJSONImpl extends TwitterResponseImpl implements IDs {

private static final long serialVersionUID = 6999637496007165672L;
private long[] ids;
private long previousCursor = -1;
private long nextCursor = -1;
private static final long serialVersionUID = -6585026560164704953L;

/*package*/ IDsJSONImpl(HttpResponse res, Configuration conf) throws TwitterException {
super(res);
Expand Down
Expand Up @@ -7,7 +7,7 @@
* @version 2010-12-24
*/
public class JSONException extends Exception {
private static final long serialVersionUID = 0;
private static final long serialVersionUID = -4144585377907783745L;
private Throwable cause;

/**
Expand Down

0 comments on commit 74f2f77

Please sign in to comment.