Remove illegal @Override and other polishing

This commit is contained in:
Chris Beams
2010-11-11 10:39:03 -08:00
parent ee34695bc4
commit 8cce5cdc1f
7 changed files with 22 additions and 28 deletions

View File

@@ -13,18 +13,16 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.integration.twitter.core;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
import org.apache.commons.lang.NotImplementedException;
import org.springframework.util.Assert;
import twitter4j.DirectMessage;
import twitter4j.IDs;
import twitter4j.Paging;
import twitter4j.Query;
import twitter4j.QueryResult;

View File

@@ -132,9 +132,6 @@ public class Twitter4jTemplateTests {
List<Tweet> tweets = results.getTweets();
assertNotNull(tweets);
assertEquals(3, tweets.size());
assertTrue(tweets.get(0) instanceof Tweet);
assertTrue(tweets.get(1) instanceof Tweet);
assertTrue(tweets.get(2) instanceof Tweet);
}
}

View File

@@ -1,14 +1,25 @@
/**
*
/*
* Copyright 2002-2010 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.integration.twitter.inbound;
import org.junit.Ignore;
import org.junit.Test;
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
import org.springframework.integration.Message;
import org.springframework.integration.MessageChannel;
import org.springframework.integration.MessagingException;
import org.springframework.integration.channel.DirectChannel;
import org.springframework.integration.core.MessageHandler;
@@ -17,9 +28,9 @@ import org.springframework.integration.twitter.core.Tweet;
import org.springframework.integration.twitter.core.Twitter4jTemplate;
import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler;
/**
* @author ozhurakousky
*
* @author Oleg Zhurakousky
*/
public class SearchReceivingMessageSourceTests {

View File

@@ -89,7 +89,6 @@ public class XmppConnectionFactoryBean extends AbstractFactoryBean<XMPPConnectio
return connection;
}
@Override
public void start() {
try {
connection.connect();
@@ -112,7 +111,6 @@ public class XmppConnectionFactoryBean extends AbstractFactoryBean<XMPPConnectio
}
}
@Override
public void stop() {
if (this.isRunning()){
this.connection.disconnect();
@@ -120,22 +118,18 @@ public class XmppConnectionFactoryBean extends AbstractFactoryBean<XMPPConnectio
}
}
@Override
public boolean isRunning() {
return this.started;
}
@Override
public int getPhase() {
return Integer.MIN_VALUE;
}
@Override
public boolean isAutoStartup() {
return this.autoStartup;
}
@Override
public void stop(Runnable callback) {
callback.run();
}

View File

@@ -59,7 +59,6 @@ public class XmppHeaderEnricherParserTests {
MessagingTemplate messagingTemplate = new MessagingTemplate();
MessageHandler handler = mock(MessageHandler.class);
doAnswer(new Answer() {
@Override
public Object answer(InvocationOnMock invocation) throws Throwable {
Message message = (Message) invocation.getArguments()[0];
String chatToUser = (String) message.getHeaders().get(XmppHeaders.CHAT_TO_USER);

View File

@@ -49,18 +49,15 @@ public class XmppMessageDrivenEndpointTests {
final Set<PacketListener> packetListSet = new HashSet<PacketListener>();
XMPPConnection connection = mock(XMPPConnection.class);
XmppMessageDrivenEndpoint endpoint = new XmppMessageDrivenEndpoint(connection);
doAnswer(new Answer<Object>() {
@Override
public Object answer(InvocationOnMock invocation) throws Throwable {
packetListSet.add((PacketListener) invocation.getArguments()[0]);
return null;
}
}).when(connection).addPacketListener(Mockito.any(PacketListener.class), (PacketFilter) Mockito.any());
doAnswer(new Answer<Object>() {
@Override
public Object answer(InvocationOnMock invocation) throws Throwable {
packetListSet.remove(invocation.getArguments()[0]);
return null;

View File

@@ -54,17 +54,15 @@ public class XmppRosterEventMessageDrivenEndpointTests {
XMPPConnection connection = mock(XMPPConnection.class);
Roster roster = mock(Roster.class);
when(connection.getRoster()).thenReturn(roster);
doAnswer(new Answer<Object>() {
@Override
public Object answer(InvocationOnMock invocation) throws Throwable {
rosterSet.add((RosterListener) invocation.getArguments()[0]);
return null;
}
}).when(roster).addRosterListener(Mockito.any(RosterListener.class));
doAnswer(new Answer<Object>() {
@Override
public Object answer(InvocationOnMock invocation) throws Throwable {
rosterSet.remove(invocation.getArguments()[0]);
return null;