Index: src/main/java/hudson/plugins/twitter/TwitterPublisher.java =================================================================== --- src/main/java/hudson/plugins/twitter/TwitterPublisher.java (revision 21738) +++ src/main/java/hudson/plugins/twitter/TwitterPublisher.java (working copy) @@ -15,7 +15,6 @@ import hudson.tasks.Publisher; import java.io.IOException; -import java.lang.reflect.Constructor; import java.util.Arrays; import java.util.List; import java.util.Set; @@ -143,7 +142,7 @@ tinyUrl = "?"; } } - return String.format("%s%s:%s#%d - %s", toblame, result.substring(0, 4), projectName, + return String.format("%s%s:%s#%d - %s", toblame, result.toString(), projectName, build.number, tinyUrl); } @@ -189,7 +188,7 @@ } /** - * Detrmine if this build represents a failure or recovery. A build failure + * Determine if this build represents a failure or recovery. A build failure * includes both failed and unstable builds. A recovery is defined as a * successful build that follows a build that was not successful. Always * returns false for aborted builds. @@ -315,8 +314,8 @@ LOGGER.info("Attempting to update Twitter status to: " + message); - AsyncTwitter twitter = createAsyncTwitter(id, password); - twitter.updateAsync(message, new TwitterAdapter() { + AsyncTwitter twitter = new AsyncTwitter(id, password); + twitter.updateStatusAsync(message, new TwitterAdapter() { @Override public void onException(TwitterException e, int method) { @@ -331,11 +330,5 @@ }); } - private AsyncTwitter createAsyncTwitter(String id, String password) throws Exception { - Constructor con = asyncTwitterClass.getConstructor( - String.class, String.class); - - return con.newInstance(id, password); - } } } \ No newline at end of file Index: src/main/resources/index.jelly =================================================================== --- src/main/resources/index.jelly (revision 21738) +++ src/main/resources/index.jelly (working copy) @@ -1,3 +1,3 @@
- This plugin is a Twiter Plugin. + This plugin is a Twitter Plugin.
\ No newline at end of file Index: pom.xml =================================================================== --- pom.xml (revision 21738) +++ pom.xml (working copy) @@ -21,7 +21,7 @@ net.homeip.yusuke twitter4j - 1.1.0 + 2.0.9 mockobjects