Permalink
Browse files

reformat everything

  • Loading branch information...
1 parent 56e9bd0 commit f45b5de841c9552328efcebbac0b593c5b3dcf85 @yusuke committed Jul 14, 2012
Showing with 1,110 additions and 1,381 deletions.
  1. +2 −1 pom.xml
  2. +2 −1 twitter4j-appengine/pom.xml
  3. +2 −12 twitter4j-appengine/src/main/java/twitter4j/internal/http/alternative/AppEngineHttpResponseImpl.java
  4. +1 −6 twitter4j-appengine/src/main/java/twitter4j/internal/json/LazyAccountSettings.java
  5. +1 −5 twitter4j-appengine/src/main/java/twitter4j/internal/json/LazyDirectMessage.java
  6. +4 −4 twitter4j-appengine/src/main/java/twitter4j/internal/json/LazyPagableResponseList.java
  7. +1 −5 twitter4j-appengine/src/main/java/twitter4j/internal/json/LazyPlace.java
  8. +1 −5 twitter4j-appengine/src/main/java/twitter4j/internal/json/LazyQueryResult.java
  9. +1 −6 twitter4j-appengine/src/main/java/twitter4j/internal/json/LazyRelatedResults.java
  10. +3 −2 twitter4j-appengine/src/main/java/twitter4j/internal/json/LazyResponseList.java
  11. +2 −6 twitter4j-appengine/src/main/java/twitter4j/internal/json/LazySimilarPlaces.java
  12. +1 −6 twitter4j-appengine/src/main/java/twitter4j/internal/json/LazyTrends.java
  13. +1 −5 twitter4j-appengine/src/main/java/twitter4j/internal/json/LazyTwitterAPIConfiguration.java
  14. +1 −5 twitter4j-appengine/src/main/java/twitter4j/internal/json/LazyUser.java
  15. +1 −5 twitter4j-appengine/src/main/java/twitter4j/internal/json/LazyUserList.java
  16. +2 −1 twitter4j-async/pom.xml
  17. +1 −1 twitter4j-async/src/main/java/twitter4j/api/FavoriteMethodsAsync.java
  18. +6 −6 twitter4j-async/src/main/java/twitter4j/api/ListMethodsAsync.java
  19. +2 −1 twitter4j-core/pom.xml
  20. +1 −5 twitter4j-core/src/main/java/twitter4j/Annotation.java
  21. +2 −2 twitter4j-core/src/main/java/twitter4j/GeoLocation.java
  22. +1 −1 twitter4j-core/src/main/java/twitter4j/ProfileImage.java
  23. +10 −10 twitter4j-core/src/main/java/twitter4j/StatusUpdate.java
  24. +1 −6 twitter4j-core/src/main/java/twitter4j/TwitterAPIMonitor.java
  25. +1 −5 twitter4j-core/src/main/java/twitter4j/api/AccountMethods.java
  26. +3 −3 twitter4j-core/src/main/java/twitter4j/api/FavoriteMethods.java
  27. +1 −6 twitter4j-core/src/main/java/twitter4j/api/FriendshipMethods.java
  28. +1 −6 twitter4j-core/src/main/java/twitter4j/api/GeoMethods.java
  29. +11 −16 twitter4j-core/src/main/java/twitter4j/api/ListMethods.java
  30. +1 −5 twitter4j-core/src/main/java/twitter4j/api/LocalTrendsMethods.java
  31. +1 −1 twitter4j-core/src/main/java/twitter4j/api/StatusMethods.java
  32. +1 −6 twitter4j-core/src/main/java/twitter4j/api/UserMethods.java
  33. +2 −2 twitter4j-core/src/main/java/twitter4j/auth/AccessToken.java
  34. +1 −6 twitter4j-core/src/main/java/twitter4j/conf/PropertyConfiguration.java
  35. +1 −5 twitter4j-core/src/main/java/twitter4j/internal/http/HttpClientWrapper.java
  36. +1 −5 twitter4j-core/src/main/java/twitter4j/internal/http/HttpResponse.java
  37. +2 −2 twitter4j-core/src/main/java/twitter4j/internal/http/HttpResponseListener.java
  38. +1 −1 twitter4j-core/src/main/java/twitter4j/internal/logging/Logger.java
  39. +85 −74 twitter4j-core/src/main/java/twitter4j/internal/org/json/CDL.java
  40. +18 −13 twitter4j-core/src/main/java/twitter4j/internal/org/json/Cookie.java
  41. +9 −6 twitter4j-core/src/main/java/twitter4j/internal/org/json/CookieList.java
  42. +15 −10 twitter4j-core/src/main/java/twitter4j/internal/org/json/HTTP.java
  43. +7 −4 twitter4j-core/src/main/java/twitter4j/internal/org/json/HTTPTokener.java
  44. +1 −1 twitter4j-core/src/main/java/twitter4j/internal/org/json/JSONArray.java
  45. +4 −2 twitter4j-core/src/main/java/twitter4j/internal/org/json/JSONException.java
  46. +306 −298 twitter4j-core/src/main/java/twitter4j/internal/org/json/JSONML.java
  47. +3 −10 twitter4j-core/src/main/java/twitter4j/internal/org/json/JSONObject.java
  48. +12 −11 twitter4j-core/src/main/java/twitter4j/internal/org/json/JSONString.java
  49. +5 −3 twitter4j-core/src/main/java/twitter4j/internal/org/json/JSONStringer.java
  50. +123 −120 twitter4j-core/src/main/java/twitter4j/internal/org/json/JSONTokener.java
  51. +127 −101 twitter4j-core/src/main/java/twitter4j/internal/org/json/XML.java
  52. +196 −188 twitter4j-core/src/main/java/twitter4j/internal/org/json/XMLTokener.java
  53. +1 −5 twitter4j-core/src/main/java/twitter4j/internal/util/z_T4JInternalParseUtil.java
  54. +1 −1 twitter4j-core/src/test/java/twitter4j/FriendsFollowersTest.java
  55. +5 −5 twitter4j-core/src/test/java/twitter4j/StatusMethodsTest.java
  56. +0 −1 twitter4j-core/src/test/java/twitter4j/TimelineMethodsTest.java
  57. +3 −15 twitter4j-core/src/test/java/twitter4j/auth/OAuthTest.java
  58. +4 −6 twitter4j-core/src/test/java/twitter4j/internal/KryoSerializationTest.java
  59. +10 −13 twitter4j-core/src/test/java/twitter4j/internal/org/json/Test.java
  60. +2 −2 twitter4j-core/src/test/java/twitter4j/internal/util/ParseUtilTest.java
  61. +1 −1 twitter4j-core/src/test/java/twitter4j/internal/util/StringUtilTest.java
  62. +29 −29 twitter4j-examples/bin/logback.xml
  63. +2 −1 twitter4j-examples/pom.xml
  64. +1 −5 twitter4j-examples/src/main/java/twitter4j/examples/account/GetAccountSettings.java
  65. +1 −1 twitter4j-examples/src/main/java/twitter4j/examples/async/AsyncUpdate.java
  66. +1 −5 twitter4j-examples/src/main/java/twitter4j/examples/directmessage/GetDirectMessages.java
  67. +1 −5 twitter4j-examples/src/main/java/twitter4j/examples/directmessage/GetSentDirectMessages.java
  68. +1 −5 twitter4j-examples/src/main/java/twitter4j/examples/friendship/LookupFriendships.java
  69. +1 −5 twitter4j-examples/src/main/java/twitter4j/examples/geo/CreatePlace.java
  70. +1 −6 twitter4j-examples/src/main/java/twitter4j/examples/geo/GetSimilarPlaces.java
  71. +1 −7 twitter4j-examples/src/main/java/twitter4j/examples/geo/ReverseGeoCode.java
  72. +1 −7 twitter4j-examples/src/main/java/twitter4j/examples/geo/SearchPlaces.java
  73. +1 −6 twitter4j-examples/src/main/java/twitter4j/examples/json/LoadRawJSON.java
  74. +1 −5 twitter4j-examples/src/main/java/twitter4j/examples/json/SaveRawJSON.java
  75. +1 −5 twitter4j-examples/src/main/java/twitter4j/examples/list/GetAllUserLists.java
  76. +1 −5 twitter4j-examples/src/main/java/twitter4j/examples/list/GetUserListMemberships.java
  77. +1 −6 twitter4j-examples/src/main/java/twitter4j/examples/list/GetUserListStatuses.java
  78. +1 −5 twitter4j-examples/src/main/java/twitter4j/examples/list/GetUserListSubscriptions.java
  79. +1 −5 twitter4j-examples/src/main/java/twitter4j/examples/list/GetUserLists.java
  80. +1 −5 twitter4j-examples/src/main/java/twitter4j/examples/listmembers/GetUserListMembers.java
  81. +1 −5 twitter4j-examples/src/main/java/twitter4j/examples/listmembers/ShowUserListMembership.java
  82. +1 −5 twitter4j-examples/src/main/java/twitter4j/examples/listsubscribers/GetUserListSubscribers.java
  83. +1 −5 twitter4j-examples/src/main/java/twitter4j/examples/listsubscribers/ShowUserListSubscription.java
  84. +1 −8 twitter4j-examples/src/main/java/twitter4j/examples/oauth/GetAccessToken.java
  85. +1 −6 twitter4j-examples/src/main/java/twitter4j/examples/search/SearchTweets.java
  86. +1 −7 twitter4j-examples/src/main/java/twitter4j/examples/stream/PrintFilterStream.java
  87. +1 −6 twitter4j-examples/src/main/java/twitter4j/examples/stream/PrintFirehoseStream.java
  88. +1 −7 twitter4j-examples/src/main/java/twitter4j/examples/stream/PrintLinksStream.java
  89. +1 −7 twitter4j-examples/src/main/java/twitter4j/examples/stream/PrintRetweetStream.java
  90. +1 −7 twitter4j-examples/src/main/java/twitter4j/examples/stream/PrintSampleStream.java
  91. +1 −9 twitter4j-examples/src/main/java/twitter4j/examples/stream/PrintSiteStreams.java
  92. +1 −9 twitter4j-examples/src/main/java/twitter4j/examples/stream/PrintUserStream.java
  93. +1 −5 twitter4j-examples/src/main/java/twitter4j/examples/timeline/GetHomeTimeline.java
  94. +1 −5 twitter4j-examples/src/main/java/twitter4j/examples/timeline/GetMentions.java
  95. +1 −5 twitter4j-examples/src/main/java/twitter4j/examples/timeline/GetRetweetedByMe.java
  96. +1 −5 twitter4j-examples/src/main/java/twitter4j/examples/timeline/GetRetweetedByUser.java
  97. +1 −5 twitter4j-examples/src/main/java/twitter4j/examples/timeline/GetRetweetedToMe.java
  98. +1 −5 twitter4j-examples/src/main/java/twitter4j/examples/timeline/GetRetweetedToUser.java
  99. +1 −5 twitter4j-examples/src/main/java/twitter4j/examples/timeline/GetRetweetsOfMe.java
  100. +1 −6 twitter4j-examples/src/main/java/twitter4j/examples/trends/GetAvailableTrends.java
  101. +1 −5 twitter4j-examples/src/main/java/twitter4j/examples/trends/GetDailyTrends.java
  102. +1 −5 twitter4j-examples/src/main/java/twitter4j/examples/trends/GetLocationTrends.java
  103. +1 −5 twitter4j-examples/src/main/java/twitter4j/examples/trends/GetWeeklyTrends.java
  104. +2 −7 twitter4j-examples/src/main/java/twitter4j/examples/tweets/GetRetweetedBy.java
  105. +1 −5 twitter4j-examples/src/main/java/twitter4j/examples/tweets/GetRetweetedByIds.java
  106. +1 −5 twitter4j-examples/src/main/java/twitter4j/examples/user/GetMemberSuggestions.java
  107. +1 −5 twitter4j-examples/src/main/java/twitter4j/examples/user/GetSuggestedUserCategories.java
  108. +1 −5 twitter4j-examples/src/main/java/twitter4j/examples/user/GetUserSuggestions.java
  109. +1 −5 twitter4j-examples/src/main/java/twitter4j/examples/user/LookupUsers.java
  110. +1 −5 twitter4j-examples/src/main/java/twitter4j/examples/user/SearchUsers.java
  111. +2 −1 twitter4j-httpclient-support/pom.xml
  112. +2 −1 twitter4j-media-support/pom.xml
  113. +2 −2 twitter4j-media-support/src/main/java/twitter4j/media/ImageUploadFactory.java
  114. +2 −1 twitter4j-stream/pom.xml
  115. +4 −4 twitter4j-stream/src/main/java/twitter4j/SiteStreamsImpl.java
  116. +1 −1 twitter4j-stream/src/test/java/twitter4j/SiteStreamsTest.java
  117. +2 −13 twitter4j-stream/src/test/java/twitter4j/internal/json/DAOTest.java
View
@@ -1,4 +1,5 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.twitter4j</groupId>
<artifactId>twitter4j</artifactId>
@@ -1,4 +1,5 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.twitter4j</groupId>
@@ -26,18 +26,8 @@
import twitter4j.internal.org.json.JSONArray;
import twitter4j.internal.org.json.JSONObject;
-import java.io.BufferedReader;
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.Reader;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.TreeMap;
-import java.util.Locale;
+import java.io.*;
+import java.util.*;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Future;
import java.util.zip.GZIPInputStream;
@@ -16,12 +16,7 @@
package twitter4j.internal.json;
-import twitter4j.AccountSettings;
-import twitter4j.Location;
-import twitter4j.RateLimitStatus;
-import twitter4j.TimeZone;
-import twitter4j.TwitterException;
-import twitter4j.TwitterRuntimeException;
+import twitter4j.*;
import javax.annotation.Generated;
@@ -16,11 +16,7 @@
package twitter4j.internal.json;
-import twitter4j.DirectMessage;
-import twitter4j.RateLimitStatus;
-import twitter4j.TwitterException;
-import twitter4j.TwitterRuntimeException;
-import twitter4j.User;
+import twitter4j.*;
import javax.annotation.Generated;
import java.util.Date;
@@ -24,19 +24,19 @@
*/
abstract class LazyPagableResponseList<T extends TwitterResponse> extends LazyResponseList<T> implements PagableResponseList<T> {
public boolean hasPrevious() {
- return ((PagableResponseList)getTarget()).hasPrevious();
+ return ((PagableResponseList) getTarget()).hasPrevious();
}
public long getPreviousCursor() {
- return ((PagableResponseList)getTarget()).getPreviousCursor();
+ return ((PagableResponseList) getTarget()).getPreviousCursor();
}
public boolean hasNext() {
- return ((PagableResponseList)getTarget()).hasNext();
+ return ((PagableResponseList) getTarget()).hasNext();
}
public long getNextCursor() {
- return ((PagableResponseList)getTarget()).getNextCursor();
+ return ((PagableResponseList) getTarget()).getNextCursor();
}
}
@@ -1,10 +1,6 @@
package twitter4j.internal.json;
-import twitter4j.GeoLocation;
-import twitter4j.Place;
-import twitter4j.RateLimitStatus;
-import twitter4j.TwitterException;
-import twitter4j.TwitterRuntimeException;
+import twitter4j.*;
import javax.annotation.Generated;
@@ -16,11 +16,7 @@
package twitter4j.internal.json;
-import twitter4j.Query;
-import twitter4j.QueryResult;
-import twitter4j.Tweet;
-import twitter4j.TwitterException;
-import twitter4j.TwitterRuntimeException;
+import twitter4j.*;
import java.util.List;
@@ -16,12 +16,7 @@
package twitter4j.internal.json;
-import twitter4j.RateLimitStatus;
-import twitter4j.RelatedResults;
-import twitter4j.ResponseList;
-import twitter4j.Status;
-import twitter4j.TwitterException;
-import twitter4j.TwitterRuntimeException;
+import twitter4j.*;
import javax.annotation.Generated;
@@ -31,11 +31,12 @@
*/
abstract class LazyResponseList<T> implements ResponseList<T> {
ResponseList<T> target = null;
- LazyResponseList(){
+
+ LazyResponseList() {
}
protected ResponseList<T> getTarget() {
- if(target == null){
+ if (target == null) {
try {
target = createActualResponseList();
} catch (TwitterException e) {
@@ -17,11 +17,7 @@
// generated with generate-lazy-objects.sh
package twitter4j.internal.json;
-import twitter4j.GeoLocation;
-import twitter4j.Place;
-import twitter4j.ResponseList;
-import twitter4j.SimilarPlaces;
-import twitter4j.TwitterException;
+import twitter4j.*;
/**
* @author Yusuke Yamamoto - yusuke at mac.com
@@ -47,7 +43,7 @@
* @return token the token needed to be able to create a new place with {@link twitter4j.api.GeoMethods#createPlace(String, String, String, GeoLocation, String)}
*/
public String getToken() {
- return ((SimilarPlaces)getTarget()).getToken();
+ return ((SimilarPlaces) getTarget()).getToken();
}
@Override
@@ -16,12 +16,7 @@
package twitter4j.internal.json;
-import twitter4j.Location;
-import twitter4j.RateLimitStatus;
-import twitter4j.Trend;
-import twitter4j.Trends;
-import twitter4j.TwitterException;
-import twitter4j.TwitterRuntimeException;
+import twitter4j.*;
import javax.annotation.Generated;
import java.util.Date;
@@ -15,11 +15,7 @@
*/
package twitter4j.internal.json;
-import twitter4j.MediaEntity;
-import twitter4j.RateLimitStatus;
-import twitter4j.TwitterAPIConfiguration;
-import twitter4j.TwitterException;
-import twitter4j.TwitterRuntimeException;
+import twitter4j.*;
import javax.annotation.Generated;
import java.util.Map;
@@ -16,11 +16,7 @@
package twitter4j.internal.json;
-import twitter4j.RateLimitStatus;
-import twitter4j.Status;
-import twitter4j.TwitterException;
-import twitter4j.TwitterRuntimeException;
-import twitter4j.User;
+import twitter4j.*;
import javax.annotation.Generated;
import java.net.URL;
@@ -16,11 +16,7 @@
package twitter4j.internal.json;
-import twitter4j.RateLimitStatus;
-import twitter4j.TwitterException;
-import twitter4j.TwitterRuntimeException;
-import twitter4j.User;
-import twitter4j.UserList;
+import twitter4j.*;
import javax.annotation.Generated;
import java.net.URI;
View
@@ -1,4 +1,5 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.twitter4j</groupId>
@@ -76,7 +76,7 @@
* Returns the 20 most recent favorite statuses for the authenticating user or user specified by the ID parameter in the requested format.
* <br>This method calls http://api.twitter.com/1/favorites/[id].json
*
- * @param id the ID or screen name of the user for whom to request a list of favorite statuses
+ * @param id the ID or screen name of the user for whom to request a list of favorite statuses
* @param paging controls pagination. Supports sinceId and page parameters.
* @see <a href="https://dev.twitter.com/docs/api/1/get/favorites">GET favorites | Twitter Developers</a>
* @since Twitter4J 2.2.5
@@ -115,8 +115,8 @@
* List the lists the specified user has been added to.
* <br>This method calls http://api.twitter.com/1/lists/memberships.json
*
- * @param listMemberId The id of the list member
- * @param cursor Breaks the results into pages. A single page contains 20 lists. Provide a value of -1 to begin paging. Provide values as returned to in the response body's next_cursor and previous_cursor attributes to page back and forth in the list.
+ * @param listMemberId The id of the list member
+ * @param cursor Breaks the results into pages. A single page contains 20 lists. Provide a value of -1 to begin paging. Provide values as returned to in the response body's next_cursor and previous_cursor attributes to page back and forth in the list.
* @see <a href="https://dev.twitter.com/docs/api/1/get/lists/memberships">GET lists/memberships | Twitter Developers</a>
* @since Twitter4J 2.2.4
*/
@@ -137,9 +137,9 @@
* List the lists the specified user has been added to.
* <br>This method calls http://api.twitter.com/1/lists/memberships.json
*
- * @param listMemberId The id of the list member
- * @param cursor Breaks the results into pages. A single page contains 20 lists. Provide a value of -1 to begin paging. Provide values as returned to in the response body's next_cursor and previous_cursor attributes to page back and forth in the list.
- * @param filterToOwnedLists Whether to return just lists the authenticating user owns, and the user represented by listMemberScreenName is a member of.
+ * @param listMemberId The id of the list member
+ * @param cursor Breaks the results into pages. A single page contains 20 lists. Provide a value of -1 to begin paging. Provide values as returned to in the response body's next_cursor and previous_cursor attributes to page back and forth in the list.
+ * @param filterToOwnedLists Whether to return just lists the authenticating user owns, and the user represented by listMemberScreenName is a member of.
* @see <a href="https://dev.twitter.com/docs/api/1/get/lists/memberships">GET lists/memberships | Twitter Developers</a>
* @since Twitter4J 2.2.4
*/
@@ -150,7 +150,7 @@
* <br>This method calls http://api.twitter.com/1/lists/memberships.json
*
* @param listMemberScreenName The screen name of the list member
- * @param cursor Breaks the results into pages. A single page contains 20 lists. Provide a value of -1 to begin paging. Provide values as returned to in the response body's next_cursor and previous_cursor attributes to page back and forth in the list.
+ * @param cursor Breaks the results into pages. A single page contains 20 lists. Provide a value of -1 to begin paging. Provide values as returned to in the response body's next_cursor and previous_cursor attributes to page back and forth in the list.
* @param filterToOwnedLists Whether to return just lists the authenticating user owns, and the user represented by listMemberScreenName is a member of.
* @see <a href="https://dev.twitter.com/docs/api/1/get/lists/memberships">GET lists/memberships | Twitter Developers</a>
* @since Twitter4J 2.2.4
View
@@ -1,4 +1,5 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.twitter4j</groupId>
@@ -19,11 +19,7 @@
import twitter4j.internal.org.json.JSONException;
import twitter4j.internal.org.json.JSONObject;
-import java.util.Iterator;
-import java.util.LinkedHashMap;
-import java.util.Map;
-import java.util.SortedSet;
-import java.util.TreeSet;
+import java.util.*;
/**
* A data class representing an Annotation of a Status or a Tweet
@@ -37,10 +37,10 @@ public GeoLocation(double latitude, double longitude) {
this.latitude = latitude;
this.longitude = longitude;
}
-
+
/* For serialization purposes only. */
/* package */ GeoLocation() {
-
+
}
/**
@@ -28,7 +28,7 @@
ImageSize MINI = ImageSize.mini;
ImageSize ORIGINAL = ImageSize.original;
- enum ImageSize{
+ enum ImageSize {
bigger, normal, mini, original
}
}
@@ -104,57 +104,57 @@ public StatusUpdate displayCoordinates(boolean displayCoordinates) {
/**
* @since Twitter4J 2.2.5
*/
- public void setMedia(File file){
+ public void setMedia(File file) {
this.mediaFile = file;
}
/**
* @since Twitter4J 2.2.5
*/
- public StatusUpdate media(File file){
+ public StatusUpdate media(File file) {
setMedia(file);
return this;
}
/**
* @since Twitter4J 2.2.5
*/
- public void setMedia(String name, InputStream body){
+ public void setMedia(String name, InputStream body) {
this.mediaName = name;
this.mediaBody = body;
}
- /*package*/ boolean isWithMedia(){
+ /*package*/ boolean isWithMedia() {
return mediaFile != null || mediaName != null;
}
/**
* @since Twitter4J 2.2.5
*/
- public StatusUpdate media(String name, InputStream body){
+ public StatusUpdate media(String name, InputStream body) {
setMedia(name, body);
return this;
}
/**
* @since Twitter4J 2.2.5
*/
- public void setPossiblySensitive(boolean possiblySensitive){
+ public void setPossiblySensitive(boolean possiblySensitive) {
this.possiblySensitive = possiblySensitive;
}
/**
* @since Twitter4J 2.2.5
*/
- public StatusUpdate possiblySensitive(boolean possiblySensitive){
+ public StatusUpdate possiblySensitive(boolean possiblySensitive) {
setPossiblySensitive(possiblySensitive);
return this;
}
/**
* @since Twitter4J 2.2.5
*/
- public boolean isPossiblySensitive(){
+ public boolean isPossiblySensitive() {
return possiblySensitive;
}
@@ -202,10 +202,10 @@ public StatusUpdate annotation(Annotation annotation) {
appendParameter("annotations", annotations.asParameterValue(), params);
}
params.add(includeEntities);
- if(null != mediaFile){
+ if (null != mediaFile) {
params.add(new HttpParameter("media[]", mediaFile));
params.add(new HttpParameter("possibly_sensitive", possiblySensitive));
- }else if(mediaName != null && mediaBody != null){
+ } else if (mediaName != null && mediaBody != null) {
params.add(new HttpParameter("media[]", mediaName, mediaBody));
params.add(new HttpParameter("possibly_sensitive", possiblySensitive));
}
@@ -21,12 +21,7 @@
import twitter4j.management.APIStatisticsMBean;
import twitter4j.management.APIStatisticsOpenMBean;
-import javax.management.InstanceAlreadyExistsException;
-import javax.management.MBeanRegistrationException;
-import javax.management.MBeanServer;
-import javax.management.MalformedObjectNameException;
-import javax.management.NotCompliantMBeanException;
-import javax.management.ObjectName;
+import javax.management.*;
import java.lang.management.ManagementFactory;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
Oops, something went wrong.

0 comments on commit f45b5de

Please sign in to comment.