Author: matthieu
Date: Mon Jan 4 09:40:15 2016
New Revision: 1722812
URL: http://svn.apache.org/viewvc?rev=1722812&view=rev
Log:
JAMES-1651 remove a bunch of (eclipse) warnings
Removed:
james/project/trunk/server/data/data-library/src/test/java/org/apache/james/rrt/lib/mock/MockRecipientRewriteTableManagementImpl.java
Modified:
james/project/trunk/backends-common/cassandra/pom.xml
james/project/trunk/mailbox/api/src/test/java/org/apache/james/mailbox/manager/QuotaMessageManagerTest.java
james/project/trunk/mailbox/cassandra/pom.xml
james/project/trunk/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/modules/CassandraRegistrationModule.java
james/project/trunk/mailbox/elasticsearch/pom.xml
james/project/trunk/mailbox/hbase/src/main/java/org/apache/james/mailbox/hbase/mail/HBaseMailboxMapper.java
james/project/trunk/mailbox/hbase/src/main/java/org/apache/james/mailbox/hbase/mail/HBaseMessageMapper.java
james/project/trunk/mailbox/jcr/src/test/java/org/apache/james/mailbox/jcr/JCRMailboxIdDeserializerTest.java
james/project/trunk/mailbox/kafka/src/main/java/org/apache/james/mailbox/kafka/KafkaMessageConsumer.java
james/project/trunk/mailbox/maildir/src/test/java/org/apache/james/mailbox/maildir/MaildirMailboxIdDeserializerTest.java
james/project/trunk/mailbox/memory/src/main/java/org/apache/james/mailbox/inmemory/quota/InMemoryCurrentQuotaManager.java
james/project/trunk/mailbox/memory/src/test/java/org/apache/james/mailbox/inmemory/InMemoryMailboxIdDeserializerTest.java
james/project/trunk/mailbox/memory/src/test/java/org/apache/james/mailbox/inmemory/manager/InMemoryIntegrationResources.java
james/project/trunk/mailbox/memory/src/test/java/org/apache/james/mailbox/inmemory/quota/InMemoryCurrentQuotaManagerTest.java
james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/MailboxSessionMapperFactory.java
james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/StoreMailboxManager.java
james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/StoreMessageManager.java
james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/event/MailboxListenerRegistry.java
james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/json/JsonEventSerializer.java
james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/json/event/MailboxConverter.java
james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/json/event/dto/UpdatedFlagsDataTransferObject.java
james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/quota/CurrentQuotaCalculator.java
james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/quota/DefaultQuotaRootResolver.java
james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/quota/QuotaChecker.java
james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/search/LazyMessageSearchIndex.java
james/project/trunk/mailbox/store/src/test/java/org/apache/james/mailbox/store/event/DefaultDelegatingMailboxListenerTest.java
james/project/trunk/mailbox/store/src/test/java/org/apache/james/mailbox/store/quota/DefaultQuotaRootResolverTest.java
james/project/trunk/mailbox/store/src/test/java/org/apache/james/mailbox/store/quota/QuotaCheckerTest.java
james/project/trunk/mailbox/tool/src/main/java/org/apache/james/mailbox/indexer/registrations/MailboxRegistration.java
james/project/trunk/mailbox/zoo-seq-provider/src/main/java/org/apache/james/mailbox/store/mail/ZooUidProvider.java
james/project/trunk/mailet/ai/pom.xml
james/project/trunk/mailet/ai/src/main/java/org/apache/james/ai/classic/BayesianAnalysis.java
james/project/trunk/mailet/api/pom.xml
james/project/trunk/mailet/base/pom.xml
james/project/trunk/mailet/base/src/main/java/org/apache/mailet/base/GenericRecipientMatcher.java
james/project/trunk/mailet/base/src/test/java/org/apache/mailet/base/test/FakeMailetConfig.java
james/project/trunk/mailet/crypto/pom.xml
james/project/trunk/mailet/crypto/src/main/java/org/apache/james/transport/KeyStoreHolder.java
james/project/trunk/mailet/crypto/src/main/java/org/apache/james/transport/SMIMEKeyHolder.java
james/project/trunk/mailet/crypto/src/main/java/org/apache/james/transport/mailet/AbstractSign.java
james/project/trunk/mailet/crypto/src/main/java/org/apache/james/transport/mailet/SMIMECheckSignature.java
james/project/trunk/mailet/crypto/src/main/java/org/apache/james/transport/mailet/SMIMEDecrypt.java
james/project/trunk/mailet/crypto/src/main/java/org/apache/james/transport/matcher/IsX509CertificateSubject.java
james/project/trunk/mailet/mailetdocs-maven-plugin/pom.xml
james/project/trunk/mailet/mailetdocs-maven-plugin/src/main/java/org/apache/james/mailet/DefaultDescriptorsExtractor.java
james/project/trunk/mailet/pom.xml
james/project/trunk/mailet/standard/pom.xml
james/project/trunk/mailet/standard/src/main/java/org/apache/james/transport/mailets/ClassifyBounce.java
james/project/trunk/mailet/standard/src/main/java/org/apache/james/transport/mailets/LogMessage.java
james/project/trunk/mailet/standard/src/main/java/org/apache/james/transport/matchers/RelayLimit.java
james/project/trunk/mailet/standard/src/test/java/org/apache/james/transport/matchers/AbstractSenderIsTest.java
james/project/trunk/mailet/standard/src/test/java/org/apache/james/transport/matchers/HostIsLocalTest.java
james/project/trunk/mpt/antlib/src/main/java/org/apache/james/mpt/ant/MailProtocolTestTask.java
james/project/trunk/mpt/app/src/main/java/org/apache/james/mpt/app/Main.java
james/project/trunk/mpt/core/src/test/java/org/apache/james/mpt/DiscardProtocol.java
james/project/trunk/mpt/impl/imap-mailbox/elasticsearch/src/test/java/org/apache/james/mpt/imapmailbox/elasticsearch/host/ElasticSearchHostSystem.java
james/project/trunk/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/host/HBaseHostSystem.java
james/project/trunk/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryMailboxEventAsynchronousTestModule.java
james/project/trunk/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/host/InMemoryEventAsynchronousHostSystem.java
james/project/trunk/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/host/InMemoryHostSystem.java
james/project/trunk/mpt/impl/imap-mailbox/jcr/src/test/java/org/apache/james/mpt/imapmailbox/jcr/host/JCRHostSystem.java
james/project/trunk/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaMailboxTest.java
james/project/trunk/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/host/JPAHostSystem.java
james/project/trunk/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/host/MaildirHostSystem.java
james/project/trunk/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/host/FileHostSystem.java
james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/ImapRequestLineReader.java
james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/ImapParserFactory.java
james/project/trunk/protocols/imap/src/main/java/org/apache/james/imap/processor/StoreProcessor.java
james/project/trunk/protocols/imap/src/test/java/org/apache/james/imap/processor/DeleteACLProcessorTest.java
james/project/trunk/protocols/imap/src/test/java/org/apache/james/protocols/imap/utils/DecoderUtilsTest.java
james/project/trunk/protocols/managesieve/src/main/java/org/apache/james/managesieve/api/commands/SetActive.java
james/project/trunk/protocols/pop3/src/main/java/org/apache/james/protocols/pop3/core/TopCmdHandler.java
james/project/trunk/server/container/cassandra-guice/src/main/java/org/apache/james/modules/data/CassandraDomainListModule.java
james/project/trunk/server/container/cassandra-guice/src/main/java/org/apache/james/modules/mailbox/CassandraMailboxModule.java
james/project/trunk/server/container/cassandra-guice/src/main/java/org/apache/james/modules/server/QuotaModule.java
james/project/trunk/server/container/cassandra-guice/src/main/java/org/apache/james/utils/GuiceGenericLoader.java
james/project/trunk/server/container/cassandra-guice/src/main/java/org/apache/james/utils/GuiceProtocolHandlerLoader.java
james/project/trunk/server/container/cli/src/main/java/org/apache/james/cli/probe/ServerProbe.java
james/project/trunk/server/container/core/pom.xml
james/project/trunk/server/container/core/src/main/java/org/apache/james/core/MailHeaders.java
james/project/trunk/server/container/core/src/main/java/org/apache/james/core/MailImpl.java
james/project/trunk/server/container/core/src/main/java/org/apache/james/core/MimeMessageCopyOnWriteProxy.java
james/project/trunk/server/container/core/src/main/java/org/apache/james/core/MimeMessageUtil.java
james/project/trunk/server/container/core/src/main/java/org/apache/james/core/MimeMessageWrapper.java
james/project/trunk/server/container/core/src/test/java/org/apache/james/core/MailHeadersTest.java
james/project/trunk/server/container/core/src/test/java/org/apache/james/core/MailImplTest.java
james/project/trunk/server/container/core/src/test/java/org/apache/james/core/MimeMessageCopyOnWriteProxyTest.java
james/project/trunk/server/container/core/src/test/java/org/apache/james/core/MimeMessageTest.java
james/project/trunk/server/container/core/src/test/java/org/apache/james/core/MimeMessageWrapperTest.java
james/project/trunk/server/container/lifecycle-api/pom.xml
james/project/trunk/server/container/mailbox-adapter/pom.xml
james/project/trunk/server/container/mailbox-adapter/src/main/java/org/apache/james/adapter/mailbox/ReIndexerManagementMBean.java
james/project/trunk/server/container/mailbox-adapter/src/test/java/org/apache/james/adapter/mailbox/MailboxManagementTest.java
james/project/trunk/server/container/spring/pom.xml
james/project/trunk/server/container/spring/src/main/java/org/apache/james/container/spring/bean/factory/mailrepositorystore/MailRepositoryStoreBeanFactory.java
james/project/trunk/server/container/spring/src/main/java/org/apache/james/container/spring/bean/factorypostprocessor/MailboxConfigurationBeanFactoryPostProcessor.java
james/project/trunk/server/container/spring/src/main/java/org/apache/james/container/spring/lifecycle/LogProviderImpl.java
james/project/trunk/server/container/spring/src/main/java/org/apache/james/container/spring/osgi/AbstractBundleTracker.java
james/project/trunk/server/container/util-java8/pom.xml
james/project/trunk/server/container/util/pom.xml
james/project/trunk/server/container/util/src/main/java/org/apache/james/util/bayesian/BayesianAnalyzer.java
james/project/trunk/server/container/util/src/main/java/org/apache/james/util/bayesian/JDBCBayesianAnalyzer.java
james/project/trunk/server/container/util/src/main/java/org/apache/james/util/scanner/SpamAssassinInvoker.java
james/project/trunk/server/data/data-api/pom.xml
james/project/trunk/server/data/data-api/src/main/java/org/apache/james/rrt/api/RecipientRewriteTable.java
james/project/trunk/server/data/data-api/src/main/java/org/apache/james/rrt/api/RecipientRewriteTableManagementMBean.java
james/project/trunk/server/data/data-api/src/main/java/org/apache/james/sieverepository/api/SieveRepository.java
james/project/trunk/server/data/data-cassandra/pom.xml
james/project/trunk/server/data/data-file/pom.xml
james/project/trunk/server/data/data-file/src/main/java/org/apache/james/mailrepository/file/FileMailRepository.java
james/project/trunk/server/data/data-file/src/main/java/org/apache/james/mailrepository/file/MBoxMailRepository.java
james/project/trunk/server/data/data-file/src/main/java/org/apache/james/sieverepository/file/SieveDefaultRepository.java
james/project/trunk/server/data/data-file/src/main/java/org/apache/james/sieverepository/file/SieveFileRepository.java
james/project/trunk/server/data/data-hbase/src/main/java/org/apache/james/system/hbase/TablePool.java
james/project/trunk/server/data/data-hbase/src/main/java/org/apache/james/user/hbase/HBaseUsersRepository.java
james/project/trunk/server/data/data-hbase/src/test/java/org/apache/james/rrt/hbase/HBaseRecipientRewriteTableTest.java
james/project/trunk/server/data/data-hbase/src/test/java/org/apache/james/system/hbase/TablePoolTest.java
james/project/trunk/server/data/data-jcr/pom.xml
james/project/trunk/server/data/data-jdbc/pom.xml
james/project/trunk/server/data/data-jdbc/src/main/java/org/apache/james/mailrepository/jdbc/JDBCMailRepository.java
james/project/trunk/server/data/data-jdbc/src/main/java/org/apache/james/rrt/jdbc/JDBCRecipientRewriteTable.java
james/project/trunk/server/data/data-jdbc/src/main/java/org/apache/james/user/jdbc/AbstractJdbcUsersRepository.java
james/project/trunk/server/data/data-jpa/pom.xml
james/project/trunk/server/data/data-jpa/src/main/java/org/apache/james/rrt/jpa/JPARecipientRewriteTable.java
james/project/trunk/server/data/data-jpa/src/main/java/org/apache/james/rrt/jpa/model/JPARecipientRewrite.java
james/project/trunk/server/data/data-ldap/pom.xml
james/project/trunk/server/data/data-library/pom.xml
james/project/trunk/server/data/data-library/src/main/java/org/apache/james/mailrepository/lib/Lock.java
james/project/trunk/server/data/data-library/src/main/java/org/apache/james/repository/file/ClassLoaderObjectInputStream.java
james/project/trunk/server/data/data-library/src/main/java/org/apache/james/repository/file/FilePersistentObjectRepository.java
james/project/trunk/server/data/data-library/src/main/java/org/apache/james/rrt/lib/AbstractRecipientRewriteTable.java
james/project/trunk/server/data/data-library/src/main/java/org/apache/james/rrt/lib/RecipientRewriteTableUtil.java
james/project/trunk/server/data/data-library/src/main/java/org/apache/james/user/lib/AbstractUsersRepository.java
james/project/trunk/server/data/data-library/src/main/java/org/apache/james/user/lib/util/DigestUtil.java
james/project/trunk/server/data/data-library/src/test/java/org/apache/james/sieverepository/lib/AbstractSieveRepositoryTest.java
james/project/trunk/server/data/data-library/src/test/java/org/apache/james/user/lib/AbstractUsersRepositoryTest.java
james/project/trunk/server/dns-service/dnsservice-api/pom.xml
james/project/trunk/server/dns-service/dnsservice-dnsjava/pom.xml
james/project/trunk/server/dns-service/dnsservice-dnsjava/src/main/java/org/apache/james/dnsservice/dnsjava/DNSJavaService.java
james/project/trunk/server/dns-service/dnsservice-library/pom.xml
james/project/trunk/server/dns-service/dnsservice-library/src/main/java/org/apache/james/dnsservice/library/MXHostAddressIterator.java
james/project/trunk/server/karaf/features/pom.xml
james/project/trunk/server/mailet/mailetcontainer-api/pom.xml
james/project/trunk/server/mailet/mailetcontainer-api/src/test/java/org/apache/james/mailetcontainer/api/mock/ExceptionThrowingMatcher.java
james/project/trunk/server/mailet/mailetcontainer-api/src/test/java/org/apache/james/mailetcontainer/api/mock/MockMailetContext.java
james/project/trunk/server/mailet/mailetcontainer-api/src/test/java/org/apache/james/mailetcontainer/api/mock/MockMatcher.java
james/project/trunk/server/mailet/mailetcontainer-camel/pom.xml
james/project/trunk/server/mailet/mailetcontainer-camel/src/main/java/org/apache/james/mailetcontainer/impl/JamesMailetContext.java
james/project/trunk/server/mailet/mailetcontainer-camel/src/main/java/org/apache/james/mailetcontainer/impl/MailetConfigImpl.java
james/project/trunk/server/mailet/mailetcontainer-camel/src/main/java/org/apache/james/mailetcontainer/impl/ProcessorUtil.java
james/project/trunk/server/mailet/mailetcontainer-camel/src/main/java/org/apache/james/mailetcontainer/impl/camel/CamelMailetProcessor.java
james/project/trunk/server/mailet/mailetcontainer-camel/src/main/java/org/apache/james/mailetcontainer/impl/camel/CamelProcessor.java
james/project/trunk/server/mailet/mailetcontainer-camel/src/main/java/org/apache/james/mailetcontainer/impl/camel/MatcherSplitter.java
james/project/trunk/server/mailet/mailetcontainer-camel/src/main/java/org/apache/james/mailetcontainer/impl/jmx/JMXStateMailetProcessorListener.java
james/project/trunk/server/mailet/mailetcontainer-camel/src/main/java/org/apache/james/mailetcontainer/impl/jmx/MailetManagement.java
james/project/trunk/server/mailet/mailetcontainer-camel/src/main/java/org/apache/james/mailetcontainer/impl/matchers/And.java
james/project/trunk/server/mailet/mailetcontainer-camel/src/main/java/org/apache/james/mailetcontainer/impl/matchers/CompositeMatcher.java
james/project/trunk/server/mailet/mailetcontainer-camel/src/main/java/org/apache/james/mailetcontainer/impl/matchers/GenericCompositeMatcher.java
james/project/trunk/server/mailet/mailetcontainer-camel/src/main/java/org/apache/james/mailetcontainer/impl/matchers/Not.java
james/project/trunk/server/mailet/mailetcontainer-camel/src/main/java/org/apache/james/mailetcontainer/impl/matchers/Or.java
james/project/trunk/server/mailet/mailetcontainer-camel/src/main/java/org/apache/james/mailetcontainer/impl/matchers/Xor.java
james/project/trunk/server/mailet/mailetcontainer-camel/src/main/java/org/apache/james/mailetcontainer/lib/AbstractStateCompositeProcessor.java
james/project/trunk/server/mailet/mailetcontainer-camel/src/main/java/org/apache/james/mailetcontainer/lib/AbstractStateMailetProcessor.java
james/project/trunk/server/mailet/mailetcontainer-camel/src/test/java/org/apache/james/mailetcontainer/impl/matchers/AndTest.java
james/project/trunk/server/mailet/mailetcontainer-camel/src/test/java/org/apache/james/mailetcontainer/impl/matchers/OrTest.java
james/project/trunk/server/mailet/mailetcontainer-camel/src/test/java/org/apache/james/mailetcontainer/impl/matchers/XorTest.java
james/project/trunk/server/mailet/mailets/pom.xml
james/project/trunk/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/AbstractNotify.java
james/project/trunk/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/AbstractRecipientRewriteTableMailet.java
james/project/trunk/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/AbstractRedirect.java
james/project/trunk/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/BayesianAnalysisFeeder.java
james/project/trunk/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/Bounce.java
james/project/trunk/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/Forward.java
james/project/trunk/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/FromRepository.java
james/project/trunk/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/LocalDelivery.java
james/project/trunk/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/RemoteDelivery.java
james/project/trunk/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/ResourceLocatorImpl.java
james/project/trunk/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/ToRecipientFolder.java
james/project/trunk/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/XMLRecipientRewriteTable.java
james/project/trunk/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/managesieve/ManageSieveMailet.java
james/project/trunk/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/managesieve/transcode/MessageToCoreToMessage.java
james/project/trunk/server/mailet/mailets/src/main/java/org/apache/james/transport/matchers/AbstractSQLWhitelistMatcher.java
james/project/trunk/server/mailet/mailets/src/main/java/org/apache/james/transport/matchers/IsInWhiteList.java
james/project/trunk/server/mailet/mailets/src/main/java/org/apache/james/transport/matchers/NetworkIsInWhitelist.java
james/project/trunk/server/mailet/mailets/src/main/java/org/apache/james/transport/util/MailetContextLog.java
james/project/trunk/server/mailet/mailets/src/test/java/org/apache/james/samples/mailets/HelloWorldMailet.java
james/project/trunk/server/mailet/mailets/src/test/java/org/apache/james/samples/mailets/InstrumentationMailet.java
james/project/trunk/server/mailet/mailets/src/test/java/org/apache/james/transport/mailets/RecordingMailContext.java
james/project/trunk/server/mailet/mailets/src/test/java/org/apache/james/transport/mailets/managesieve/ManageSieveMailetTestCase.java
james/project/trunk/server/mailet/mailets/src/test/java/org/apache/james/transport/matchers/AbstractRemoteAddrInNetworkTest.java
james/project/trunk/server/protocols/fetchmail/pom.xml
james/project/trunk/server/protocols/fetchmail/src/main/java/org/apache/james/fetchmail/FetchMail.java
james/project/trunk/server/protocols/fetchmail/src/main/java/org/apache/james/fetchmail/FetchScheduler.java
james/project/trunk/server/protocols/fetchmail/src/main/java/org/apache/james/fetchmail/MessageProcessor.java
james/project/trunk/server/protocols/jmap-integration-testing/pom.xml
james/project/trunk/server/protocols/jmap/pom.xml
james/project/trunk/server/protocols/jmap/src/main/java/org/apache/james/jmap/methods/GetMessageListMethod.java
james/project/trunk/server/protocols/jmap/src/main/java/org/apache/james/jmap/methods/GetMessagesMethod.java
james/project/trunk/server/protocols/jmap/src/main/java/org/apache/james/jmap/methods/JmapResponse.java
james/project/trunk/server/protocols/jmap/src/test/java/org/apache/james/jmap/methods/JmapRequestParserImplTest.java
james/project/trunk/server/protocols/protocols-imap4/pom.xml
james/project/trunk/server/protocols/protocols-imap4/src/main/java/org/apache/james/imapserver/netty/IMAPServerFactory.java
james/project/trunk/server/protocols/protocols-library/pom.xml
james/project/trunk/server/protocols/protocols-library/src/main/java/org/apache/james/protocols/lib/ProtocolHandlerChainImpl.java
james/project/trunk/server/protocols/protocols-library/src/main/java/org/apache/james/protocols/lib/Slf4jLoggerAdapter.java
james/project/trunk/server/protocols/protocols-library/src/main/java/org/apache/james/protocols/lib/jmx/AbstractConnectHandlerResultJMXMonitor.java
james/project/trunk/server/protocols/protocols-library/src/main/java/org/apache/james/protocols/lib/jmx/AbstractLineHandlerResultJMXMonitor.java
james/project/trunk/server/protocols/protocols-lmtp/pom.xml
james/project/trunk/server/protocols/protocols-lmtp/src/main/java/org/apache/james/lmtpserver/DataLineLMTPHandler.java
james/project/trunk/server/protocols/protocols-lmtp/src/main/java/org/apache/james/lmtpserver/netty/LMTPServerFactory.java
james/project/trunk/server/protocols/protocols-managesieve/src/main/java/org/apache/james/managesieveserver/netty/ManageSieveServerFactory.java
james/project/trunk/server/protocols/protocols-pop3/pom.xml
james/project/trunk/server/protocols/protocols-pop3/src/main/java/org/apache/james/pop3server/netty/POP3ServerFactory.java
james/project/trunk/server/protocols/protocols-smtp/pom.xml
james/project/trunk/server/protocols/protocols-smtp/src/main/java/org/apache/james/smtpserver/DataLineJamesMessageHookHandler.java
james/project/trunk/server/protocols/protocols-smtp/src/main/java/org/apache/james/smtpserver/MailPriorityHandler.java
james/project/trunk/server/protocols/protocols-smtp/src/main/java/org/apache/james/smtpserver/fastfail/DNSRBLHandler.java
james/project/trunk/server/protocols/protocols-smtp/src/main/java/org/apache/james/smtpserver/fastfail/ValidSenderDomainHandler.java
james/project/trunk/server/protocols/protocols-smtp/src/main/java/org/apache/james/smtpserver/netty/SMTPServerFactory.java
james/project/trunk/server/protocols/protocols-smtp/src/test/java/org/apache/james/smtpserver/SMTPTestConfiguration.java
james/project/trunk/server/protocols/protocols-smtp/src/test/java/org/apache/james/smtpserver/SPFHandlerTest.java
james/project/trunk/server/protocols/protocols-smtp/src/test/java/org/apache/james/smtpserver/SpamAssassinHandlerTest.java
james/project/trunk/server/protocols/protocols-smtp/src/test/java/org/apache/james/smtpserver/URIRBLHandlerTest.java
james/project/trunk/server/protocols/protocols-smtp/src/test/java/org/apache/james/smtpserver/ValidRcptMXTest.java
james/project/trunk/server/protocols/protocols-smtp/src/test/java/org/apache/james/smtpserver/mock/MockMimeMessage.java
james/project/trunk/server/protocols/protocols-smtp/src/test/java/org/apache/james/smtpserver/mock/mailet/MockMail.java
james/project/trunk/server/protocols/protocols-smtp/src/test/java/org/apache/james/smtpserver/mock/mailet/MockMailContext.java
james/project/trunk/server/protocols/protocols-smtp/src/test/java/org/apache/james/smtpserver/mock/mailet/MockMailetConfig.java
james/project/trunk/server/queue/queue-activemq/pom.xml
james/project/trunk/server/queue/queue-api/pom.xml
james/project/trunk/server/queue/queue-file/src/main/java/org/apache/james/queue/file/FileMailQueueFactory.java
james/project/trunk/server/queue/queue-jms/pom.xml
james/project/trunk/server/queue/queue-jms/src/main/java/org/apache/james/queue/jms/JMSMailQueue.java
james/project/trunk/server/queue/queue-jms/src/main/java/org/apache/james/queue/library/MailQueueManagement.java
Modified: james/project/trunk/backends-common/cassandra/pom.xml
URL:
http://svn.apache.org/viewvc/james/project/trunk/backends-common/cassandra/pom.xml?rev=1722812&r1=1722811&r2=1722812&view=diff
==============================================================================
--- james/project/trunk/backends-common/cassandra/pom.xml (original)
+++ james/project/trunk/backends-common/cassandra/pom.xml Mon Jan 4 09:40:15
2016
@@ -129,7 +129,6 @@
<dependency>
<groupId>org.apache.james</groupId>
<artifactId>james-server-util-java8</artifactId>
- <version>3.0.0-beta5-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.datastax.cassandra</groupId>
Modified:
james/project/trunk/mailbox/api/src/test/java/org/apache/james/mailbox/manager/QuotaMessageManagerTest.java
URL:
http://svn.apache.org/viewvc/james/project/trunk/mailbox/api/src/test/java/org/apache/james/mailbox/manager/QuotaMessageManagerTest.java?rev=1722812&r1=1722811&r2=1722812&view=diff
==============================================================================
---
james/project/trunk/mailbox/api/src/test/java/org/apache/james/mailbox/manager/QuotaMessageManagerTest.java
(original)
+++
james/project/trunk/mailbox/api/src/test/java/org/apache/james/mailbox/manager/QuotaMessageManagerTest.java
Mon Jan 4 09:40:15 2016
@@ -24,7 +24,6 @@ import org.apache.james.mailbox.MailboxM
import org.apache.james.mailbox.MailboxSession;
import org.apache.james.mailbox.quota.MaxQuotaManager;
import org.apache.james.mailbox.MessageManager;
-import org.apache.james.mailbox.quota.QuotaManager;
import org.apache.james.mailbox.exception.OverQuotaException;
import org.apache.james.mailbox.mock.MockMail;
import org.apache.james.mailbox.model.MailboxPath;
Modified: james/project/trunk/mailbox/cassandra/pom.xml
URL:
http://svn.apache.org/viewvc/james/project/trunk/mailbox/cassandra/pom.xml?rev=1722812&r1=1722811&r2=1722812&view=diff
==============================================================================
--- james/project/trunk/mailbox/cassandra/pom.xml (original)
+++ james/project/trunk/mailbox/cassandra/pom.xml Mon Jan 4 09:40:15 2016
@@ -149,7 +149,6 @@
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
- <version>16.0</version>
</dependency>
<dependency>
<groupId>javax.inject</groupId>
Modified:
james/project/trunk/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/modules/CassandraRegistrationModule.java
URL:
http://svn.apache.org/viewvc/james/project/trunk/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/modules/CassandraRegistrationModule.java?rev=1722812&r1=1722811&r2=1722812&view=diff
==============================================================================
---
james/project/trunk/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/modules/CassandraRegistrationModule.java
(original)
+++
james/project/trunk/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/modules/CassandraRegistrationModule.java
Mon Jan 4 09:40:15 2016
@@ -19,20 +19,18 @@
package org.apache.james.mailbox.cassandra.modules;
-import com.datastax.driver.core.schemabuilder.SchemaBuilder;
+import static com.datastax.driver.core.DataType.text;
+
+import java.util.Collections;
+import java.util.List;
+
import org.apache.james.backends.cassandra.components.CassandraIndex;
import org.apache.james.backends.cassandra.components.CassandraModule;
import org.apache.james.backends.cassandra.components.CassandraTable;
import org.apache.james.backends.cassandra.components.CassandraType;
-import org.apache.james.mailbox.cassandra.table.CassandraACLTable;
import
org.apache.james.mailbox.cassandra.table.CassandraMailboxPathRegisterTable;
-import java.util.Collections;
-import java.util.List;
-
-import static com.datastax.driver.core.DataType.bigint;
-import static com.datastax.driver.core.DataType.text;
-import static com.datastax.driver.core.DataType.timeuuid;
+import com.datastax.driver.core.schemabuilder.SchemaBuilder;
public class CassandraRegistrationModule implements CassandraModule {
Modified: james/project/trunk/mailbox/elasticsearch/pom.xml
URL:
http://svn.apache.org/viewvc/james/project/trunk/mailbox/elasticsearch/pom.xml?rev=1722812&r1=1722811&r2=1722812&view=diff
==============================================================================
--- james/project/trunk/mailbox/elasticsearch/pom.xml (original)
+++ james/project/trunk/mailbox/elasticsearch/pom.xml Mon Jan 4 09:40:15 2016
@@ -194,7 +194,6 @@
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
- <version>16.0</version>
</dependency>
<dependency>
<groupId>com.jayway.awaitility</groupId>
Modified:
james/project/trunk/mailbox/hbase/src/main/java/org/apache/james/mailbox/hbase/mail/HBaseMailboxMapper.java
URL:
http://svn.apache.org/viewvc/james/project/trunk/mailbox/hbase/src/main/java/org/apache/james/mailbox/hbase/mail/HBaseMailboxMapper.java?rev=1722812&r1=1722811&r2=1722812&view=diff
==============================================================================
---
james/project/trunk/mailbox/hbase/src/main/java/org/apache/james/mailbox/hbase/mail/HBaseMailboxMapper.java
(original)
+++
james/project/trunk/mailbox/hbase/src/main/java/org/apache/james/mailbox/hbase/mail/HBaseMailboxMapper.java
Mon Jan 4 09:40:15 2016
@@ -82,7 +82,7 @@ public class HBaseMailboxMapper extends
Scan scan = new Scan();
scan.addFamily(MAILBOX_CF);
- scan.setCaching(mailboxes.getScannerCaching() * 2);
+
scan.setCaching(mailboxes.getConfiguration().getInt("hbase.client.scanner.caching",
1) * 2);
scan.setMaxVersions(1);
/*
@@ -133,7 +133,7 @@ public class HBaseMailboxMapper extends
Scan scan = new Scan();
scan.addFamily(MAILBOX_CF);
- scan.setCaching(mailboxes.getScannerCaching() * 2);
+
scan.setCaching(mailboxes.getConfiguration().getInt("hbase.client.scanner.caching",
1) * 2);
scan.setMaxVersions(1);
FilterList filters = new
FilterList(FilterList.Operator.MUST_PASS_ALL);
@@ -195,7 +195,7 @@ public class HBaseMailboxMapper extends
mailboxes = new HTable(conf, MAILBOXES_TABLE);
Scan scan = new Scan();
scan.addFamily(MAILBOX_CF);
- scan.setCaching(mailboxes.getScannerCaching() * 2);
+
scan.setCaching(mailboxes.getConfiguration().getInt("hbase.client.scanner.caching",
1) * 2);
scan.setMaxVersions(1);
scanner = mailboxes.getScanner(scan);
List<Mailbox<HBaseId>> mailboxList = new
ArrayList<Mailbox<HBaseId>>();
@@ -279,7 +279,7 @@ public class HBaseMailboxMapper extends
Scan scan = new Scan();
scan.addFamily(MAILBOX_CF);
- scan.setCaching(mailboxes.getScannerCaching() * 2);
+
scan.setCaching(mailboxes.getConfiguration().getInt("hbase.client.scanner.caching",
1) * 2);
scan.setMaxVersions(1);
FilterList filters = new
FilterList(FilterList.Operator.MUST_PASS_ALL);
Modified:
james/project/trunk/mailbox/hbase/src/main/java/org/apache/james/mailbox/hbase/mail/HBaseMessageMapper.java
URL:
http://svn.apache.org/viewvc/james/project/trunk/mailbox/hbase/src/main/java/org/apache/james/mailbox/hbase/mail/HBaseMessageMapper.java?rev=1722812&r1=1722811&r2=1722812&view=diff
==============================================================================
---
james/project/trunk/mailbox/hbase/src/main/java/org/apache/james/mailbox/hbase/mail/HBaseMessageMapper.java
(original)
+++
james/project/trunk/mailbox/hbase/src/main/java/org/apache/james/mailbox/hbase/mail/HBaseMessageMapper.java
Mon Jan 4 09:40:15 2016
@@ -333,7 +333,7 @@ public class HBaseMessageMapper extends
messageRowKey(mailbox.getMailboxId(), 0));
scan.addFamily(MESSAGES_META_CF);
scan.setFilter(new
SingleColumnValueExcludeFilter(MESSAGES_META_CF, FLAGS_SEEN, CompareOp.EQUAL,
MARKER_MISSING));
- scan.setCaching(messages.getScannerCaching() * 2);
+
scan.setCaching(messages.getConfiguration().getInt("hbase.client.scanner.caching",
1) * 2);
scan.setMaxVersions(1);
scanner = messages.getScanner(scan);
long count = 0;
@@ -405,7 +405,7 @@ public class HBaseMessageMapper extends
// filter out all rows with FLAGS_SEEN qualifier
SingleColumnValueFilter filter = new
SingleColumnValueFilter(MESSAGES_META_CF, FLAGS_SEEN, CompareOp.EQUAL,
MARKER_MISSING);
scan.setFilter(filter);
- scan.setCaching(messages.getScannerCaching() * 2);
+
scan.setCaching(messages.getConfiguration().getInt("hbase.client.scanner.caching",
1) * 2);
scan.setMaxVersions(1);
scanner = messages.getScanner(scan);
Result result;
@@ -448,7 +448,7 @@ public class HBaseMessageMapper extends
scan.addColumn(MESSAGES_META_CF, FLAGS_RECENT);
SingleColumnValueFilter filter = new
SingleColumnValueFilter(MESSAGES_META_CF, FLAGS_RECENT, CompareOp.EQUAL,
MARKER_PRESENT);
scan.setFilter(filter);
- scan.setCaching(messages.getScannerCaching() * 2);
+
scan.setCaching(messages.getConfiguration().getInt("hbase.client.scanner.caching",
1) * 2);
scan.setMaxVersions(1);
scanner = messages.getScanner(scan);
Modified:
james/project/trunk/mailbox/jcr/src/test/java/org/apache/james/mailbox/jcr/JCRMailboxIdDeserializerTest.java
URL:
http://svn.apache.org/viewvc/james/project/trunk/mailbox/jcr/src/test/java/org/apache/james/mailbox/jcr/JCRMailboxIdDeserializerTest.java?rev=1722812&r1=1722811&r2=1722812&view=diff
==============================================================================
---
james/project/trunk/mailbox/jcr/src/test/java/org/apache/james/mailbox/jcr/JCRMailboxIdDeserializerTest.java
(original)
+++
james/project/trunk/mailbox/jcr/src/test/java/org/apache/james/mailbox/jcr/JCRMailboxIdDeserializerTest.java
Mon Jan 4 09:40:15 2016
@@ -30,7 +30,7 @@ public class JCRMailboxIdDeserializerTes
private static final String SERIALIZED_ID = "some_string";
private static final JCRId JCR_ID = JCRId.of(SERIALIZED_ID);
- private MailboxIdDeserializer mailboxIdDeserializer;
+ private MailboxIdDeserializer<JCRId> mailboxIdDeserializer;
@Before
public void setUp() {
Modified:
james/project/trunk/mailbox/kafka/src/main/java/org/apache/james/mailbox/kafka/KafkaMessageConsumer.java
URL:
http://svn.apache.org/viewvc/james/project/trunk/mailbox/kafka/src/main/java/org/apache/james/mailbox/kafka/KafkaMessageConsumer.java?rev=1722812&r1=1722811&r2=1722812&view=diff
==============================================================================
---
james/project/trunk/mailbox/kafka/src/main/java/org/apache/james/mailbox/kafka/KafkaMessageConsumer.java
(original)
+++
james/project/trunk/mailbox/kafka/src/main/java/org/apache/james/mailbox/kafka/KafkaMessageConsumer.java
Mon Jan 4 09:40:15 2016
@@ -42,15 +42,14 @@ public class KafkaMessageConsumer implem
private class Consumer implements Runnable {
- private KafkaStream m_stream;
+ private KafkaStream<byte[], byte[]> m_stream;
- public Consumer(KafkaStream a_stream) {
+ public Consumer(KafkaStream<byte[], byte[]> a_stream) {
m_stream = a_stream;
}
- @SuppressWarnings("unchecked")
public void run() {
- for (MessageAndMetadata<byte[], byte[]> aM_stream :
(Iterable<MessageAndMetadata<byte[], byte[]>>) m_stream) {
+ for (MessageAndMetadata<byte[], byte[]> aM_stream : m_stream) {
messageReceiver.receiveSerializedEvent(aM_stream.message());
}
}
@@ -112,9 +111,7 @@ public class KafkaMessageConsumer implem
}
private void startConsuming(List<KafkaStream<byte[], byte[]>> streams) {
- for (final KafkaStream stream : streams) {
- executor.submit(new Consumer(stream));
- }
+ streams.forEach(stream -> executor.submit(new Consumer(stream)));
}
private ConsumerConfig createConsumerConfig(String
zookeeperConnectionString, String groupId) {
Modified:
james/project/trunk/mailbox/maildir/src/test/java/org/apache/james/mailbox/maildir/MaildirMailboxIdDeserializerTest.java
URL:
http://svn.apache.org/viewvc/james/project/trunk/mailbox/maildir/src/test/java/org/apache/james/mailbox/maildir/MaildirMailboxIdDeserializerTest.java?rev=1722812&r1=1722811&r2=1722812&view=diff
==============================================================================
---
james/project/trunk/mailbox/maildir/src/test/java/org/apache/james/mailbox/maildir/MaildirMailboxIdDeserializerTest.java
(original)
+++
james/project/trunk/mailbox/maildir/src/test/java/org/apache/james/mailbox/maildir/MaildirMailboxIdDeserializerTest.java
Mon Jan 4 09:40:15 2016
@@ -32,7 +32,7 @@ public class MaildirMailboxIdDeserialize
private static final String MALFORMED_SERIALIZED_ID = "az";
private static final MaildirId MAILDIR_ID =
MaildirId.of(Integer.valueOf(SERIALIZED_ID));
- private MailboxIdDeserializer mailboxIdDeserializer;
+ private MailboxIdDeserializer<MaildirId> mailboxIdDeserializer;
@Before
public void setUp() {
Modified:
james/project/trunk/mailbox/memory/src/main/java/org/apache/james/mailbox/inmemory/quota/InMemoryCurrentQuotaManager.java
URL:
http://svn.apache.org/viewvc/james/project/trunk/mailbox/memory/src/main/java/org/apache/james/mailbox/inmemory/quota/InMemoryCurrentQuotaManager.java?rev=1722812&r1=1722811&r2=1722812&view=diff
==============================================================================
---
james/project/trunk/mailbox/memory/src/main/java/org/apache/james/mailbox/inmemory/quota/InMemoryCurrentQuotaManager.java
(original)
+++
james/project/trunk/mailbox/memory/src/main/java/org/apache/james/mailbox/inmemory/quota/InMemoryCurrentQuotaManager.java
Mon Jan 4 09:40:15 2016
@@ -32,6 +32,7 @@ import com.google.common.cache.LoadingCa
import org.apache.james.mailbox.MailboxListener;
import org.apache.james.mailbox.MailboxManager;
import org.apache.james.mailbox.exception.MailboxException;
+import org.apache.james.mailbox.inmemory.InMemoryId;
import org.apache.james.mailbox.model.QuotaRoot;
import org.apache.james.mailbox.store.quota.CurrentQuotaCalculator;
import org.apache.james.mailbox.store.quota.StoreCurrentQuotaManager;
@@ -46,7 +47,7 @@ public class InMemoryCurrentQuotaManager
private final LoadingCache<QuotaRoot, Entry> quotaCache;
@Inject
- public InMemoryCurrentQuotaManager(final CurrentQuotaCalculator
quotaCalculator, final MailboxManager mailboxManager) {
+ public InMemoryCurrentQuotaManager(final
CurrentQuotaCalculator<InMemoryId> quotaCalculator, final MailboxManager
mailboxManager) {
this.quotaCache = CacheBuilder.newBuilder().build(new
CacheLoader<QuotaRoot, Entry>() {
@Override
public Entry load(QuotaRoot quotaRoot) throws Exception {
Modified:
james/project/trunk/mailbox/memory/src/test/java/org/apache/james/mailbox/inmemory/InMemoryMailboxIdDeserializerTest.java
URL:
http://svn.apache.org/viewvc/james/project/trunk/mailbox/memory/src/test/java/org/apache/james/mailbox/inmemory/InMemoryMailboxIdDeserializerTest.java?rev=1722812&r1=1722811&r2=1722812&view=diff
==============================================================================
---
james/project/trunk/mailbox/memory/src/test/java/org/apache/james/mailbox/inmemory/InMemoryMailboxIdDeserializerTest.java
(original)
+++
james/project/trunk/mailbox/memory/src/test/java/org/apache/james/mailbox/inmemory/InMemoryMailboxIdDeserializerTest.java
Mon Jan 4 09:40:15 2016
@@ -32,7 +32,7 @@ public class InMemoryMailboxIdDeserializ
private static final String MALFORMED_SERIALIZED_ID = "aEZ";
private static final InMemoryId IN_MEMORY_ID =
InMemoryId.of(Long.valueOf(SERIALIZED_ID));
- private MailboxIdDeserializer mailboxIdDeserializer;
+ private MailboxIdDeserializer<InMemoryId> mailboxIdDeserializer;
@Before
public void setUp() {
Modified:
james/project/trunk/mailbox/memory/src/test/java/org/apache/james/mailbox/inmemory/manager/InMemoryIntegrationResources.java
URL:
http://svn.apache.org/viewvc/james/project/trunk/mailbox/memory/src/test/java/org/apache/james/mailbox/inmemory/manager/InMemoryIntegrationResources.java?rev=1722812&r1=1722811&r2=1722812&view=diff
==============================================================================
---
james/project/trunk/mailbox/memory/src/test/java/org/apache/james/mailbox/inmemory/manager/InMemoryIntegrationResources.java
(original)
+++
james/project/trunk/mailbox/memory/src/test/java/org/apache/james/mailbox/inmemory/manager/InMemoryIntegrationResources.java
Mon Jan 4 09:40:15 2016
@@ -71,7 +71,7 @@ public class InMemoryIntegrationResource
QuotaRootResolver quotaRootResolver =
createQuotaRootResolver(mailboxManager);
InMemoryCurrentQuotaManager currentQuotaManager = new
InMemoryCurrentQuotaManager(
- new
CurrentQuotaCalculator(((StoreMailboxManager<InMemoryId>)mailboxManager).getMapperFactory(),
quotaRootResolver),
+ new
CurrentQuotaCalculator<InMemoryId>(((StoreMailboxManager<InMemoryId>)mailboxManager).getMapperFactory(),
quotaRootResolver),
mailboxManager
);
Modified:
james/project/trunk/mailbox/memory/src/test/java/org/apache/james/mailbox/inmemory/quota/InMemoryCurrentQuotaManagerTest.java
URL:
http://svn.apache.org/viewvc/james/project/trunk/mailbox/memory/src/test/java/org/apache/james/mailbox/inmemory/quota/InMemoryCurrentQuotaManagerTest.java?rev=1722812&r1=1722811&r2=1722812&view=diff
==============================================================================
---
james/project/trunk/mailbox/memory/src/test/java/org/apache/james/mailbox/inmemory/quota/InMemoryCurrentQuotaManagerTest.java
(original)
+++
james/project/trunk/mailbox/memory/src/test/java/org/apache/james/mailbox/inmemory/quota/InMemoryCurrentQuotaManagerTest.java
Mon Jan 4 09:40:15 2016
@@ -25,6 +25,7 @@ import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
import org.apache.james.mailbox.MailboxManager;
+import org.apache.james.mailbox.inmemory.InMemoryId;
import org.apache.james.mailbox.model.QuotaRoot;
import org.apache.james.mailbox.store.quota.CurrentQuotaCalculator;
import org.apache.james.mailbox.store.quota.QuotaRootImpl;
@@ -38,7 +39,7 @@ public class InMemoryCurrentQuotaManager
public static final QuotaRoot QUOTA_ROOT =
QuotaRootImpl.quotaRoot("benwa");
private InMemoryCurrentQuotaManager testee;
- private CurrentQuotaCalculator mockedCurrentQuotaCalculator;
+ private CurrentQuotaCalculator<InMemoryId> mockedCurrentQuotaCalculator;
@SuppressWarnings("unchecked")
@Before
Modified:
james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/MailboxSessionMapperFactory.java
URL:
http://svn.apache.org/viewvc/james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/MailboxSessionMapperFactory.java?rev=1722812&r1=1722811&r2=1722812&view=diff
==============================================================================
---
james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/MailboxSessionMapperFactory.java
(original)
+++
james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/MailboxSessionMapperFactory.java
Mon Jan 4 09:40:15 2016
@@ -35,7 +35,7 @@ import org.apache.james.mailbox.store.us
* Maintain mapper instances by {@link MailboxSession}. So only one mapper
instance is used
* in a {@link MailboxSession}
*/
-public abstract class MailboxSessionMapperFactory <Id extends MailboxId>
implements RequestAware, MailboxMapperFactory<Id>, MessageMapperFactory<Id>,
SubscriptionMapperFactory{
+public abstract class MailboxSessionMapperFactory<Id extends MailboxId>
implements RequestAware, MailboxMapperFactory<Id>, MessageMapperFactory<Id>,
SubscriptionMapperFactory{
protected final static String MESSAGEMAPPER ="MESSAGEMAPPER";
protected final static String MAILBOXMAPPER ="MAILBOXMAPPER";
Modified:
james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/StoreMailboxManager.java
URL:
http://svn.apache.org/viewvc/james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/StoreMailboxManager.java?rev=1722812&r1=1722811&r2=1722812&view=diff
==============================================================================
---
james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/StoreMailboxManager.java
(original)
+++
james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/StoreMailboxManager.java
Mon Jan 4 09:40:15 2016
@@ -165,7 +165,6 @@ public class StoreMailboxManager<Id exte
*
* @throws MailboxException
*/
- @SuppressWarnings("rawtypes")
@PostConstruct
public void init() throws MailboxException {
// The dispatcher need to have the delegating listener added
@@ -175,7 +174,7 @@ public class StoreMailboxManager<Id exte
index = new
SimpleMessageSearchIndex<Id>(mailboxSessionMapperFactory);
}
if (index instanceof ListeningMessageSearchIndex) {
- this.addGlobalListener((ListeningMessageSearchIndex) index, null);
+ this.addGlobalListener((MailboxListener) index, null);
}
if (idGenerator == null) {
Modified:
james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/StoreMessageManager.java
URL:
http://svn.apache.org/viewvc/james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/StoreMessageManager.java?rev=1722812&r1=1722811&r2=1722812&view=diff
==============================================================================
---
james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/StoreMessageManager.java
(original)
+++
james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/StoreMessageManager.java
Mon Jan 4 09:40:15 2016
@@ -373,7 +373,7 @@ public class StoreMessageManager<Id exte
final Message<Id> message = createMessage(internalDate, size,
bodyStartOctet, contentIn, flags, propertyBuilder);
- new QuotaChecker(quotaManager, quotaRootResolver,
mailbox).tryAddition(1, size);
+ new QuotaChecker<Id>(quotaManager, quotaRootResolver,
mailbox).tryAddition(1, size);
return locker.executeWithLock(mailboxSession, new
StoreMailboxPath<Id>(getMailboxEntity()), new
MailboxPathLocker.LockAwareExecution<Long>() {
@@ -701,7 +701,7 @@ public class StoreMessageManager<Id exte
private Iterator<MessageMetaData> copy(final Iterator<Message<Id>>
originalRows, final MailboxSession session) throws MailboxException {
final List<MessageMetaData> copiedRows = new
ArrayList<MessageMetaData>();
final MessageMapper<Id> messageMapper =
mapperFactory.getMessageMapper(session);
- QuotaChecker quotaChecker = new QuotaChecker(quotaManager,
quotaRootResolver, mailbox);
+ QuotaChecker<Id> quotaChecker = new QuotaChecker<Id>(quotaManager,
quotaRootResolver, mailbox);
while (originalRows.hasNext()) {
final Message<Id> originalMessage = originalRows.next();
Modified:
james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/event/MailboxListenerRegistry.java
URL:
http://svn.apache.org/viewvc/james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/event/MailboxListenerRegistry.java?rev=1722812&r1=1722811&r2=1722812&view=diff
==============================================================================
---
james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/event/MailboxListenerRegistry.java
(original)
+++
james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/event/MailboxListenerRegistry.java
Mon Jan 4 09:40:15 2016
@@ -19,18 +19,17 @@
package org.apache.james.mailbox.store.event;
-import com.google.common.collect.HashMultimap;
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.Multimap;
-import com.google.common.collect.Multimaps;
+import java.util.List;
+import java.util.concurrent.ConcurrentLinkedQueue;
+
import org.apache.james.mailbox.MailboxListener;
import org.apache.james.mailbox.exception.MailboxException;
import org.apache.james.mailbox.model.MailboxPath;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-import java.util.concurrent.ConcurrentLinkedQueue;
+import com.google.common.collect.HashMultimap;
+import com.google.common.collect.ImmutableList;
+import com.google.common.collect.Multimap;
+import com.google.common.collect.Multimaps;
public class MailboxListenerRegistry {
Modified:
james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/json/JsonEventSerializer.java
URL:
http://svn.apache.org/viewvc/james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/json/JsonEventSerializer.java?rev=1722812&r1=1722811&r2=1722812&view=diff
==============================================================================
---
james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/json/JsonEventSerializer.java
(original)
+++
james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/json/JsonEventSerializer.java
Mon Jan 4 09:40:15 2016
@@ -19,11 +19,11 @@
package org.apache.james.mailbox.store.json;
-import com.fasterxml.jackson.databind.ObjectMapper;
import org.apache.james.mailbox.store.json.event.EventConverter;
-import org.apache.james.mailbox.store.json.event.MailboxConverter;
import org.apache.james.mailbox.store.mail.model.MailboxId;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
public class JsonEventSerializer<Id extends MailboxId> extends
JacksonEventSerializer<Id> {
public JsonEventSerializer(EventConverter<Id> eventConverter) {
Modified:
james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/json/event/MailboxConverter.java
URL:
http://svn.apache.org/viewvc/james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/json/event/MailboxConverter.java?rev=1722812&r1=1722811&r2=1722812&view=diff
==============================================================================
---
james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/json/event/MailboxConverter.java
(original)
+++
james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/json/event/MailboxConverter.java
Mon Jan 4 09:40:15 2016
@@ -75,7 +75,7 @@ public class MailboxConverter<Id extends
@SuppressWarnings("unchecked")
public MailboxDataTransferObject
extractMailboxDataTransferObject(MailboxListener.Event event) {
if (event instanceof EventFactory.MailboxAware) {
- return
convertMailboxDataTransferObject(((EventFactory.MailboxAware)
event).getMailbox());
+ return
convertMailboxDataTransferObject(((EventFactory.MailboxAware<Id>)
event).getMailbox());
} else {
throw new RuntimeException("Unsupported event class : " +
event.getClass().getCanonicalName());
}
Modified:
james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/json/event/dto/UpdatedFlagsDataTransferObject.java
URL:
http://svn.apache.org/viewvc/james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/json/event/dto/UpdatedFlagsDataTransferObject.java?rev=1722812&r1=1722811&r2=1722812&view=diff
==============================================================================
---
james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/json/event/dto/UpdatedFlagsDataTransferObject.java
(original)
+++
james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/json/event/dto/UpdatedFlagsDataTransferObject.java
Mon Jan 4 09:40:15 2016
@@ -19,10 +19,10 @@
package org.apache.james.mailbox.store.json.event.dto;
-import com.fasterxml.jackson.annotation.JsonCreator;
-import com.fasterxml.jackson.annotation.JsonProperty;
import org.apache.james.mailbox.model.UpdatedFlags;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
public class UpdatedFlagsDataTransferObject {
@JsonProperty("uid")
private long uid;
Modified:
james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/quota/CurrentQuotaCalculator.java
URL:
http://svn.apache.org/viewvc/james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/quota/CurrentQuotaCalculator.java?rev=1722812&r1=1722811&r2=1722812&view=diff
==============================================================================
---
james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/quota/CurrentQuotaCalculator.java
(original)
+++
james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/quota/CurrentQuotaCalculator.java
Mon Jan 4 09:40:15 2016
@@ -32,6 +32,7 @@ import org.apache.james.mailbox.store.Ma
import org.apache.james.mailbox.store.mail.MailboxMapper;
import org.apache.james.mailbox.store.mail.MessageMapper;
import org.apache.james.mailbox.store.mail.model.Mailbox;
+import org.apache.james.mailbox.store.mail.model.MailboxId;
import org.apache.james.mailbox.store.mail.model.Message;
import javax.inject.Inject;
@@ -40,26 +41,25 @@ import java.util.Iterator;
import java.util.List;
@Singleton
-public class CurrentQuotaCalculator {
+public class CurrentQuotaCalculator<Id extends MailboxId> {
- private final MailboxSessionMapperFactory factory;
+ private final MailboxSessionMapperFactory<Id> factory;
private final QuotaRootResolver quotaRootResolver;
@Inject
- public CurrentQuotaCalculator(MailboxSessionMapperFactory factory,
+ public CurrentQuotaCalculator(MailboxSessionMapperFactory<Id> factory,
QuotaRootResolver quotaRootResolver) {
this.factory = factory;
this.quotaRootResolver = quotaRootResolver;
}
- @SuppressWarnings("unchecked")
public CurrentQuotas recalculateCurrentQuotas(QuotaRoot quotaRoot,
MailboxSession session) throws MailboxException {
- List<Mailbox> mailboxes = retrieveMailboxes(quotaRoot, session);
- MessageMapper mapper = factory.getMessageMapper(session);
+ List<Mailbox<Id>> mailboxes = retrieveMailboxes(quotaRoot, session);
+ MessageMapper<Id> mapper = factory.getMessageMapper(session);
long messagesSizes = 0;
long messageCount = 0;
- for (Mailbox mailbox : mailboxes) {
- Iterator<Message> messages = mapper.findInMailbox(mailbox,
MessageRange.all(), MessageMapper.FetchType.Metadata, -1);
+ for (Mailbox<Id> mailbox : mailboxes) {
+ Iterator<Message<Id>> messages = mapper.findInMailbox(mailbox,
MessageRange.all(), MessageMapper.FetchType.Metadata, -1);
messageCount += mapper.countMessagesInMailbox(mailbox);
while(messages.hasNext()) {
messagesSizes += messages.next().getFullContentOctets();
@@ -68,12 +68,12 @@ public class CurrentQuotaCalculator {
return new CurrentQuotas(messageCount, messagesSizes);
}
- private List<Mailbox> retrieveMailboxes(QuotaRoot quotaRoot,
MailboxSession session) throws MailboxException {
+ private List<Mailbox<Id>> retrieveMailboxes(QuotaRoot quotaRoot,
MailboxSession session) throws MailboxException {
List<MailboxPath> paths =
quotaRootResolver.retrieveAssociatedMailboxes(quotaRoot, session);
- final MailboxMapper mapper = factory.getMailboxMapper(session);
- return Lists.transform(paths, new Function<MailboxPath, Mailbox>() {
+ final MailboxMapper<Id> mapper = factory.getMailboxMapper(session);
+ return Lists.transform(paths, new Function<MailboxPath, Mailbox<Id>>()
{
@Override
- public Mailbox apply(MailboxPath mailboxPath) {
+ public Mailbox<Id> apply(MailboxPath mailboxPath) {
try {
return mapper.findMailboxByPath(mailboxPath);
} catch (MailboxException e) {
Modified:
james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/quota/DefaultQuotaRootResolver.java
URL:
http://svn.apache.org/viewvc/james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/quota/DefaultQuotaRootResolver.java?rev=1722812&r1=1722811&r2=1722812&view=diff
==============================================================================
---
james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/quota/DefaultQuotaRootResolver.java
(original)
+++
james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/quota/DefaultQuotaRootResolver.java
Mon Jan 4 09:40:15 2016
@@ -19,10 +19,10 @@
package org.apache.james.mailbox.store.quota;
-import com.google.common.base.Function;
-import com.google.common.base.Preconditions;
-import com.google.common.base.Splitter;
-import com.google.common.collect.Lists;
+import java.util.List;
+
+import javax.inject.Inject;
+
import org.apache.james.mailbox.MailboxSession;
import org.apache.james.mailbox.exception.MailboxException;
import org.apache.james.mailbox.model.MailboxPath;
@@ -30,20 +30,21 @@ import org.apache.james.mailbox.model.Qu
import org.apache.james.mailbox.quota.QuotaRootResolver;
import org.apache.james.mailbox.store.MailboxSessionMapperFactory;
import org.apache.james.mailbox.store.mail.model.Mailbox;
+import org.apache.james.mailbox.store.mail.model.MailboxId;
-import javax.inject.Inject;
-import javax.inject.Singleton;
-import java.util.List;
+import com.google.common.base.Function;
+import com.google.common.base.Preconditions;
+import com.google.common.base.Splitter;
+import com.google.common.collect.Lists;
-@Singleton
public class DefaultQuotaRootResolver implements QuotaRootResolver {
public static final String SEPARATOR = "&"; // Character illegal for
mailbox naming in regard of RFC 3501 section 5.1
- private final MailboxSessionMapperFactory factory;
+ private final MailboxSessionMapperFactory<? extends MailboxId> factory;
@Inject
- public DefaultQuotaRootResolver(MailboxSessionMapperFactory factory) {
+ public DefaultQuotaRootResolver(MailboxSessionMapperFactory<? extends
MailboxId> factory) {
this.factory = factory;
}
@@ -59,7 +60,6 @@ public class DefaultQuotaRootResolver im
return QuotaRootImpl.quotaRoot(mailboxPath.getNamespace() + SEPARATOR
+ mailboxPath.getUser());
}
- @SuppressWarnings("unchecked")
@Override
public List<MailboxPath> retrieveAssociatedMailboxes(QuotaRoot quotaRoot,
MailboxSession mailboxSession) throws MailboxException {
List<String> parts =
Lists.newArrayList(Splitter.on(SEPARATOR).split(quotaRoot.getValue()));
@@ -69,9 +69,9 @@ public class DefaultQuotaRootResolver im
String namespace = parts.get(0);
String user = parts.get(1);
return
Lists.transform(factory.getMailboxMapper(mailboxSession).findMailboxWithPathLike(new
MailboxPath(namespace, user, "%")),
- new Function<Mailbox, MailboxPath>() {
+ new Function<Mailbox<? extends MailboxId>, MailboxPath>() {
@Override
- public MailboxPath apply(Mailbox idMailbox) {
+ public MailboxPath apply(Mailbox<? extends MailboxId>
idMailbox) {
return new MailboxPath(idMailbox.getNamespace(),
idMailbox.getUser(), idMailbox.getName());
}
});
Modified:
james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/quota/QuotaChecker.java
URL:
http://svn.apache.org/viewvc/james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/quota/QuotaChecker.java?rev=1722812&r1=1722811&r2=1722812&view=diff
==============================================================================
---
james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/quota/QuotaChecker.java
(original)
+++
james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/quota/QuotaChecker.java
Mon Jan 4 09:40:15 2016
@@ -27,14 +27,15 @@ import org.apache.james.mailbox.model.Qu
import org.apache.james.mailbox.quota.QuotaManager;
import org.apache.james.mailbox.quota.QuotaRootResolver;
import org.apache.james.mailbox.store.mail.model.Mailbox;
+import org.apache.james.mailbox.store.mail.model.MailboxId;
-public class QuotaChecker {
+public class QuotaChecker<Id extends MailboxId> {
private Quota messageQuota;
private Quota sizeQuota;
private QuotaRoot quotaRoot;
- public QuotaChecker(QuotaManager quotaManager, QuotaRootResolver
quotaRootResolver, Mailbox mailbox) throws MailboxException {
+ public QuotaChecker(QuotaManager quotaManager, QuotaRootResolver
quotaRootResolver, Mailbox<Id> mailbox) throws MailboxException {
this.quotaRoot = quotaRootResolver.getQuotaRoot(new
MailboxPath(mailbox.getNamespace(), mailbox.getUser(), mailbox.getName()));
this.messageQuota = quotaManager.getMessageQuota(quotaRoot);
this.sizeQuota = quotaManager.getStorageQuota(quotaRoot);
Modified:
james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/search/LazyMessageSearchIndex.java
URL:
http://svn.apache.org/viewvc/james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/search/LazyMessageSearchIndex.java?rev=1722812&r1=1722811&r2=1722812&view=diff
==============================================================================
---
james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/search/LazyMessageSearchIndex.java
(original)
+++
james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/search/LazyMessageSearchIndex.java
Mon Jan 4 09:40:15 2016
@@ -23,7 +23,6 @@ import java.util.concurrent.ConcurrentHa
import javax.mail.Flags;
-import org.apache.james.mailbox.MailboxListener;
import org.apache.james.mailbox.MailboxSession;
import org.apache.james.mailbox.exception.MailboxException;
import org.apache.james.mailbox.model.MessageRange;
Modified:
james/project/trunk/mailbox/store/src/test/java/org/apache/james/mailbox/store/event/DefaultDelegatingMailboxListenerTest.java
URL:
http://svn.apache.org/viewvc/james/project/trunk/mailbox/store/src/test/java/org/apache/james/mailbox/store/event/DefaultDelegatingMailboxListenerTest.java?rev=1722812&r1=1722811&r2=1722812&view=diff
==============================================================================
---
james/project/trunk/mailbox/store/src/test/java/org/apache/james/mailbox/store/event/DefaultDelegatingMailboxListenerTest.java
(original)
+++
james/project/trunk/mailbox/store/src/test/java/org/apache/james/mailbox/store/event/DefaultDelegatingMailboxListenerTest.java
Mon Jan 4 09:40:15 2016
@@ -20,7 +20,6 @@
package org.apache.james.mailbox.store.event;
import static org.assertj.core.api.Assertions.assertThat;
-
import static org.mockito.Mockito.doThrow;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
@@ -35,13 +34,9 @@ import org.junit.Before;
import org.junit.Test;
import org.mockito.invocation.InvocationOnMock;
import org.mockito.stubbing.Answer;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
public class DefaultDelegatingMailboxListenerTest {
- private static final Logger LOGGER =
LoggerFactory.getLogger(DefaultDelegatingMailboxListenerTest.class);
-
private static final MailboxPath MAILBOX_PATH = new
MailboxPath("namespace", "user", "name");
private static final MailboxPath OTHER_MAILBOX_PATH = new
MailboxPath("namespace", "other", "name");
Modified:
james/project/trunk/mailbox/store/src/test/java/org/apache/james/mailbox/store/quota/DefaultQuotaRootResolverTest.java
URL:
http://svn.apache.org/viewvc/james/project/trunk/mailbox/store/src/test/java/org/apache/james/mailbox/store/quota/DefaultQuotaRootResolverTest.java?rev=1722812&r1=1722811&r2=1722812&view=diff
==============================================================================
---
james/project/trunk/mailbox/store/src/test/java/org/apache/james/mailbox/store/quota/DefaultQuotaRootResolverTest.java
(original)
+++
james/project/trunk/mailbox/store/src/test/java/org/apache/james/mailbox/store/quota/DefaultQuotaRootResolverTest.java
Mon Jan 4 09:40:15 2016
@@ -54,7 +54,7 @@ public class DefaultQuotaRootResolverTes
@SuppressWarnings("unchecked")
@Before
public void setUp() {
- mockedFactory = (MailboxSessionMapperFactory<TestId>)
mock(MailboxSessionMapperFactory.class);
+ mockedFactory = mock(MailboxSessionMapperFactory.class);
testee = new DefaultQuotaRootResolver(mockedFactory);
}
Modified:
james/project/trunk/mailbox/store/src/test/java/org/apache/james/mailbox/store/quota/QuotaCheckerTest.java
URL:
http://svn.apache.org/viewvc/james/project/trunk/mailbox/store/src/test/java/org/apache/james/mailbox/store/quota/QuotaCheckerTest.java?rev=1722812&r1=1722811&r2=1722812&view=diff
==============================================================================
---
james/project/trunk/mailbox/store/src/test/java/org/apache/james/mailbox/store/quota/QuotaCheckerTest.java
(original)
+++
james/project/trunk/mailbox/store/src/test/java/org/apache/james/mailbox/store/quota/QuotaCheckerTest.java
Mon Jan 4 09:40:15 2016
@@ -74,7 +74,7 @@ public class QuotaCheckerTest {
return QuotaImpl.quota(100, 1000);
}
});
- QuotaChecker quotaChecker = new QuotaChecker(mockedQuotaManager,
mockedQuotaRootResolver, MAILBOX);
+ QuotaChecker<TestId> quotaChecker = new
QuotaChecker<TestId>(mockedQuotaManager, mockedQuotaRootResolver, MAILBOX);
assertThat(quotaChecker.tryAddition(0, 0)).isTrue();
}
@@ -98,7 +98,7 @@ public class QuotaCheckerTest {
return QuotaImpl.quota(100, 1000);
}
});
- QuotaChecker quotaChecker = new QuotaChecker(mockedQuotaManager,
mockedQuotaRootResolver, MAILBOX);
+ QuotaChecker<TestId> quotaChecker = new
QuotaChecker<TestId>(mockedQuotaManager, mockedQuotaRootResolver, MAILBOX);
assertThat(quotaChecker.tryAddition(89, 899)).isTrue();
}
@@ -122,13 +122,13 @@ public class QuotaCheckerTest {
return QuotaImpl.quota(100, 1000);
}
});
- QuotaChecker quotaChecker = new QuotaChecker(mockedQuotaManager,
mockedQuotaRootResolver, MAILBOX);
+ QuotaChecker<TestId> quotaChecker = new
QuotaChecker<TestId>(mockedQuotaManager, mockedQuotaRootResolver, MAILBOX);
assertThat(quotaChecker.tryAddition(90, 900)).isTrue();
}
@Test(expected = OverQuotaException.class)
public void quotaCheckerShouldThrowOnExceededMessages() throws
MailboxException {
- QuotaChecker quotaChecker;
+ QuotaChecker<TestId> quotaChecker;
try {
when(mockedQuotaRootResolver.getQuotaRoot(MAILBOX_PATH)).thenAnswer(new
Answer<QuotaRoot>() {
@Override
@@ -148,7 +148,7 @@ public class QuotaCheckerTest {
return QuotaImpl.quota(100, 1000);
}
});
- quotaChecker = new QuotaChecker(mockedQuotaManager,
mockedQuotaRootResolver, MAILBOX);
+ quotaChecker = new QuotaChecker<TestId>(mockedQuotaManager,
mockedQuotaRootResolver, MAILBOX);
} catch(Exception e) {
fail("Exception caught : ", e);
return;
@@ -158,7 +158,7 @@ public class QuotaCheckerTest {
@Test(expected = OverQuotaException.class)
public void quotaCheckerShouldThrowOnExceededStorage() throws
MailboxException {
- QuotaChecker quotaChecker;
+ QuotaChecker<TestId> quotaChecker;
try {
when(mockedQuotaRootResolver.getQuotaRoot(MAILBOX_PATH)).thenAnswer(new
Answer<QuotaRoot>() {
@Override
@@ -178,7 +178,7 @@ public class QuotaCheckerTest {
return QuotaImpl.quota(100, 1000);
}
});
- quotaChecker = new QuotaChecker(mockedQuotaManager,
mockedQuotaRootResolver, MAILBOX);
+ quotaChecker = new QuotaChecker<TestId>(mockedQuotaManager,
mockedQuotaRootResolver, MAILBOX);
} catch(Exception e) {
fail("Exception caught : ", e);
return;
Modified:
james/project/trunk/mailbox/tool/src/main/java/org/apache/james/mailbox/indexer/registrations/MailboxRegistration.java
URL:
http://svn.apache.org/viewvc/james/project/trunk/mailbox/tool/src/main/java/org/apache/james/mailbox/indexer/registrations/MailboxRegistration.java?rev=1722812&r1=1722811&r2=1722812&view=diff
==============================================================================
---
james/project/trunk/mailbox/tool/src/main/java/org/apache/james/mailbox/indexer/registrations/MailboxRegistration.java
(original)
+++
james/project/trunk/mailbox/tool/src/main/java/org/apache/james/mailbox/indexer/registrations/MailboxRegistration.java
Mon Jan 4 09:40:15 2016
@@ -19,10 +19,8 @@
package org.apache.james.mailbox.indexer.registrations;
-import com.google.common.collect.ArrayListMultimap;
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.Multimap;
-import com.google.common.collect.Multimaps;
+import java.util.List;
+
import org.apache.james.mailbox.MailboxListener;
import org.apache.james.mailbox.indexer.events.FlagsMessageEvent;
import org.apache.james.mailbox.indexer.events.ImpactingMessageEvent;
@@ -30,8 +28,10 @@ import org.apache.james.mailbox.indexer.
import org.apache.james.mailbox.model.MailboxPath;
import org.apache.james.mailbox.model.UpdatedFlags;
-import java.util.Collection;
-import java.util.List;
+import com.google.common.collect.ArrayListMultimap;
+import com.google.common.collect.ImmutableList;
+import com.google.common.collect.Multimap;
+import com.google.common.collect.Multimaps;
public class MailboxRegistration implements MailboxListener {
Modified:
james/project/trunk/mailbox/zoo-seq-provider/src/main/java/org/apache/james/mailbox/store/mail/ZooUidProvider.java
URL:
http://svn.apache.org/viewvc/james/project/trunk/mailbox/zoo-seq-provider/src/main/java/org/apache/james/mailbox/store/mail/ZooUidProvider.java?rev=1722812&r1=1722811&r2=1722812&view=diff
==============================================================================
---
james/project/trunk/mailbox/zoo-seq-provider/src/main/java/org/apache/james/mailbox/store/mail/ZooUidProvider.java
(original)
+++
james/project/trunk/mailbox/zoo-seq-provider/src/main/java/org/apache/james/mailbox/store/mail/ZooUidProvider.java
Mon Jan 4 09:40:15 2016
@@ -21,6 +21,7 @@ package org.apache.james.mailbox.store.m
import com.google.common.base.Preconditions;
import com.netflix.curator.RetryPolicy;
import com.netflix.curator.framework.CuratorFramework;
+import com.netflix.curator.framework.imps.CuratorFrameworkState;
import com.netflix.curator.framework.recipes.atomic.AtomicValue;
import com.netflix.curator.framework.recipes.atomic.DistributedAtomicLong;
import com.netflix.curator.retry.RetryOneTime;
@@ -52,21 +53,17 @@ public class ZooUidProvider<E extends Ma
}
@Override
- public long nextUid(MailboxSession session, Mailbox mailbox) throws
MailboxException {
- if (client.isStarted()) {
+ public long nextUid(MailboxSession session, Mailbox<E> mailbox) throws
MailboxException {
+ if (client.getState() == CuratorFrameworkState.STARTED) {
DistributedAtomicLong uid = new DistributedAtomicLong(client,
pathForMailbox(mailbox), retryPolicy);
- AtomicValue<Long> value = null;
try {
uid.increment();
- value = uid.get();
- } catch (Exception e) {
- throw new MailboxException("Exception incrementing UID for
session " + session, e);
- } finally {
- if (value != null && value.succeeded()) {
+ AtomicValue<Long> value = uid.get();
+ if (value.succeeded()) {
return value.postValue();
- } else {
- throw new MailboxException("Failed getting next UID for "
+ session);
}
+ } catch (Exception e) {
+ throw new MailboxException("Exception incrementing UID for
session " + session, e);
}
}
throw new MailboxException("Curator client is closed.");
@@ -74,25 +71,21 @@ public class ZooUidProvider<E extends Ma
@Override
public long lastUid(MailboxSession session, Mailbox<E> mailbox) throws
MailboxException {
- if (client.isStarted()) {
+ if (client.getState() == CuratorFrameworkState.STARTED) {
DistributedAtomicLong uid = new DistributedAtomicLong(client,
pathForMailbox(mailbox), retryPolicy);
- AtomicValue<Long> value = null;
try {
- value = uid.get();
- } catch (Exception e) {
- throw new MailboxException("Exception getting last UID for
session " + session, e);
- } finally {
- if (value != null && value.succeeded()) {
+ AtomicValue<Long> value = uid.get();
+ if (value.succeeded()) {
return value.postValue();
- } else {
- throw new MailboxException("Failed getting last UID for "
+ session);
}
+ } catch (Exception e) {
+ throw new MailboxException("Exception getting last UID for
session " + session, e);
}
}
throw new MailboxException("Curator client is closed.");
}
- public static String pathForMailbox(Mailbox mailbox) {
- return mailbox.getMailboxId().toString() + UID_PATH_SUFFIX;
+ public static <E extends MailboxId> String pathForMailbox(Mailbox<E>
mailbox) {
+ return mailbox.getMailboxId().serialize() + UID_PATH_SUFFIX;
}
}
Modified: james/project/trunk/mailet/ai/pom.xml
URL:
http://svn.apache.org/viewvc/james/project/trunk/mailet/ai/pom.xml?rev=1722812&r1=1722811&r2=1722812&view=diff
==============================================================================
--- james/project/trunk/mailet/ai/pom.xml (original)
+++ james/project/trunk/mailet/ai/pom.xml Mon Jan 4 09:40:15 2016
@@ -28,7 +28,6 @@
</parent>
<artifactId>apache-mailet-ai</artifactId>
- <version>2.5.1-SNAPSHOT</version>
<packaging>bundle</packaging>
<name>Apache James :: AI Mailets</name>
Modified:
james/project/trunk/mailet/ai/src/main/java/org/apache/james/ai/classic/BayesianAnalysis.java
URL:
http://svn.apache.org/viewvc/james/project/trunk/mailet/ai/src/main/java/org/apache/james/ai/classic/BayesianAnalysis.java?rev=1722812&r1=1722811&r2=1722812&view=diff
==============================================================================
---
james/project/trunk/mailet/ai/src/main/java/org/apache/james/ai/classic/BayesianAnalysis.java
(original)
+++
james/project/trunk/mailet/ai/src/main/java/org/apache/james/ai/classic/BayesianAnalysis.java
Mon Jan 4 09:40:15 2016
@@ -316,7 +316,6 @@ public class BayesianAnalysis extends Ge
senderString = mail.getSender().toString();
}
if (probability > 0.1) {
- @SuppressWarnings("unchecked")
final Collection<MailAddress> recipients =
mail.getRecipients();
log(headerName + ": " + probabilityString + "; From: " +
senderString + "; Recipient(s): " + getAddressesString(recipients));
Modified: james/project/trunk/mailet/api/pom.xml
URL:
http://svn.apache.org/viewvc/james/project/trunk/mailet/api/pom.xml?rev=1722812&r1=1722811&r2=1722812&view=diff
==============================================================================
--- james/project/trunk/mailet/api/pom.xml (original)
+++ james/project/trunk/mailet/api/pom.xml Mon Jan 4 09:40:15 2016
@@ -28,7 +28,6 @@
</parent>
<artifactId>apache-mailet-api</artifactId>
- <version>2.5.1-SNAPSHOT</version>
<packaging>bundle</packaging>
<name>Apache James :: Mailet API</name>
Modified: james/project/trunk/mailet/base/pom.xml
URL:
http://svn.apache.org/viewvc/james/project/trunk/mailet/base/pom.xml?rev=1722812&r1=1722811&r2=1722812&view=diff
==============================================================================
--- james/project/trunk/mailet/base/pom.xml (original)
+++ james/project/trunk/mailet/base/pom.xml Mon Jan 4 09:40:15 2016
@@ -28,7 +28,6 @@
</parent>
<artifactId>apache-mailet-base</artifactId>
- <version>2.5.1-SNAPSHOT</version>
<packaging>bundle</packaging>
<name>Apache James :: Basic Mailet Toolkit</name>
Modified:
james/project/trunk/mailet/base/src/main/java/org/apache/mailet/base/GenericRecipientMatcher.java
URL:
http://svn.apache.org/viewvc/james/project/trunk/mailet/base/src/main/java/org/apache/mailet/base/GenericRecipientMatcher.java?rev=1722812&r1=1722811&r2=1722812&view=diff
==============================================================================
---
james/project/trunk/mailet/base/src/main/java/org/apache/mailet/base/GenericRecipientMatcher.java
(original)
+++
james/project/trunk/mailet/base/src/main/java/org/apache/mailet/base/GenericRecipientMatcher.java
Mon Jan 4 09:40:15 2016
@@ -26,7 +26,6 @@ import org.apache.mailet.Mail;
import org.apache.mailet.MailAddress;
import java.util.Collection;
-import java.util.Iterator;
import java.util.Vector;
/**
Modified:
james/project/trunk/mailet/base/src/test/java/org/apache/mailet/base/test/FakeMailetConfig.java
URL:
http://svn.apache.org/viewvc/james/project/trunk/mailet/base/src/test/java/org/apache/mailet/base/test/FakeMailetConfig.java?rev=1722812&r1=1722811&r2=1722812&view=diff
==============================================================================
---
james/project/trunk/mailet/base/src/test/java/org/apache/mailet/base/test/FakeMailetConfig.java
(original)
+++
james/project/trunk/mailet/base/src/test/java/org/apache/mailet/base/test/FakeMailetConfig.java
Mon Jan 4 09:40:15 2016
@@ -28,35 +28,33 @@ import org.apache.mailet.MailetContext;
/**
* MailetConfig over Properties
*/
-public class FakeMailetConfig extends Properties implements MailetConfig {
-
- private static final long serialVersionUID = 1L;
+public class FakeMailetConfig implements MailetConfig {
public String mailetName;
public MailetContext mc;
+ private Properties properties;
+
public FakeMailetConfig() {
this("A Mailet", new FakeMailContext());
}
public FakeMailetConfig(String mailetName, MailetContext mc) {
- super();
- this.mailetName = mailetName;
- this.mc = mc;
+ this(mailetName, mc, new Properties());
}
public FakeMailetConfig(String mailetName, MailetContext mc, Properties
arg0) {
- super(arg0);
this.mailetName = mailetName;
this.mc = mc;
+ this.properties = arg0;
}
public String getInitParameter(String name) {
- return getProperty(name);
+ return properties.getProperty(name);
}
- public Iterator getInitParameterNames() {
- return keySet().iterator();
+ public Iterator<String> getInitParameterNames() {
+ return properties.stringPropertyNames().iterator();
}
public MailetContext getMailetContext() {
@@ -69,12 +67,16 @@ public class FakeMailetConfig extends Pr
// Override setProperty to work like it should in this MockMailetConfig
public Object setProperty(String key, String value) {
- String oldValue = getProperty(key);
+ String oldValue = properties.getProperty(key);
String newValue = value;
if (oldValue != null) {
newValue = oldValue + "," + value;
}
- return super.setProperty(key, newValue);
+ return properties.setProperty(key, newValue);
+ }
+
+ public void clear() {
+ properties.clear();
}
}
Modified: james/project/trunk/mailet/crypto/pom.xml
URL:
http://svn.apache.org/viewvc/james/project/trunk/mailet/crypto/pom.xml?rev=1722812&r1=1722811&r2=1722812&view=diff
==============================================================================
--- james/project/trunk/mailet/crypto/pom.xml (original)
+++ james/project/trunk/mailet/crypto/pom.xml Mon Jan 4 09:40:15 2016
@@ -28,7 +28,6 @@
</parent>
<artifactId>apache-mailet-crypto</artifactId>
- <version>2.5.1-SNAPSHOT</version>
<packaging>bundle</packaging>
<name>Apache James :: Crypto Mailets</name>
Modified:
james/project/trunk/mailet/crypto/src/main/java/org/apache/james/transport/KeyStoreHolder.java
URL:
http://svn.apache.org/viewvc/james/project/trunk/mailet/crypto/src/main/java/org/apache/james/transport/KeyStoreHolder.java?rev=1722812&r1=1722811&r2=1722812&view=diff
==============================================================================
---
james/project/trunk/mailet/crypto/src/main/java/org/apache/james/transport/KeyStoreHolder.java
(original)
+++
james/project/trunk/mailet/crypto/src/main/java/org/apache/james/transport/KeyStoreHolder.java
Mon Jan 4 09:40:15 2016
@@ -42,7 +42,6 @@ import java.security.cert.X509CertSelect
import java.security.cert.X509Certificate;
import java.util.ArrayList;
import java.util.Collection;
-import java.util.Iterator;
import java.util.List;
import javax.mail.MessagingException;
@@ -118,19 +117,18 @@ public class KeyStoreHolder {
public List<SMIMESignerInfo> verifySignatures(SMIMESigned signed) throws
Exception, MessagingException {
CertStore certs = signed.getCertificatesAndCRLs("Collection", "BC");
SignerInformationStore siginfo = signed.getSignerInfos();
+ @SuppressWarnings("unchecked")
Collection<SignerInformation> sigCol = siginfo.getSigners();
- Iterator<SignerInformation> sigIterator = sigCol.iterator();
List<SMIMESignerInfo> result = new
ArrayList<SMIMESignerInfo>(sigCol.size());
// I iterate over the signer collection
// checking if the signatures put
// on the message are valid.
- for (int i=0;sigIterator.hasNext();i++) {
- SignerInformation info = sigIterator.next();
+ for (SignerInformation info: sigCol) {
// I get the signer's certificate
- Collection certCollection = certs.getCertificates(info.getSID());
- Iterator<X509Certificate> certIter = certCollection.iterator();
- if (certIter.hasNext()) {
- X509Certificate signerCert = certIter.next();
+ @SuppressWarnings("unchecked")
+ Collection<X509Certificate> certCollection =
(Collection<X509Certificate>) certs.getCertificates(info.getSID());
+ if (!certCollection.isEmpty()) {
+ X509Certificate signerCert = certCollection.iterator().next();
// The issuer's certifcate is searched in the list of trusted
certificate.
CertPath path = verifyCertificate(signerCert, certs, keyStore);
Modified:
james/project/trunk/mailet/crypto/src/main/java/org/apache/james/transport/SMIMEKeyHolder.java
URL:
http://svn.apache.org/viewvc/james/project/trunk/mailet/crypto/src/main/java/org/apache/james/transport/SMIMEKeyHolder.java?rev=1722812&r1=1722811&r2=1722812&view=diff
==============================================================================
---
james/project/trunk/mailet/crypto/src/main/java/org/apache/james/transport/SMIMEKeyHolder.java
(original)
+++
james/project/trunk/mailet/crypto/src/main/java/org/apache/james/transport/SMIMEKeyHolder.java
Mon Jan 4 09:40:15 2016
@@ -158,7 +158,7 @@ public class SMIMEKeyHolder implements K
throw new KeyStoreException("The \"" + keyAlias + "\"
X509Certificate alias was not found in keystore.");
}
java.security.cert.Certificate[] certificateChain =
keyStore.getCertificateChain(keyAlias);
- ArrayList certList = new ArrayList();
+ ArrayList<java.security.cert.Certificate> certList = new
ArrayList<java.security.cert.Certificate>();
if (certificateChain == null) {
certList.add(this.certificate);
} else {
Modified:
james/project/trunk/mailet/crypto/src/main/java/org/apache/james/transport/mailet/AbstractSign.java
URL:
http://svn.apache.org/viewvc/james/project/trunk/mailet/crypto/src/main/java/org/apache/james/transport/mailet/AbstractSign.java?rev=1722812&r1=1722811&r2=1722812&view=diff
==============================================================================
---
james/project/trunk/mailet/crypto/src/main/java/org/apache/james/transport/mailet/AbstractSign.java
(original)
+++
james/project/trunk/mailet/crypto/src/main/java/org/apache/james/transport/mailet/AbstractSign.java
Mon Jan 4 09:40:15 2016
@@ -490,7 +490,8 @@ public abstract class AbstractSign exten
MimeMessage newMessage = new
MimeMessage(Session.getDefaultInstance(System.getProperties(),
null));
- Enumeration headerEnum = originalMessage.getAllHeaderLines();
+ @SuppressWarnings("unchecked")
+ Enumeration<String> headerEnum =
originalMessage.getAllHeaderLines();
while (headerEnum.hasMoreElements()) {
newMessage.addHeaderLine((String) headerEnum.nextElement());
}
@@ -650,7 +651,8 @@ public abstract class AbstractSign exten
* @return The string containing the headers.
*/
protected final String getMessageHeaders(MimeMessage message) throws
MessagingException {
- Enumeration heads = message.getAllHeaderLines();
+ @SuppressWarnings("unchecked")
+ Enumeration<String> heads = message.getAllHeaderLines();
StringBuilder headBuffer = new StringBuilder(1024);
while(heads.hasMoreElements()) {
headBuffer.append(heads.nextElement().toString()).append("\r\n");
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]