diff options
author | Alan Conway <aconway@apache.org> | 2011-10-12 19:55:26 +0000 |
---|---|---|
committer | Alan Conway <aconway@apache.org> | 2011-10-12 19:55:26 +0000 |
commit | a3c979371c3a3879d9573e00e3a64c9b3a5a7b1b (patch) | |
tree | 6a57d953c004c6cfd523c1ebd0ae48cb107f3a16 | |
parent | 144a676c34e338358d203344f053f951303674f2 (diff) | |
download | qpid-python-a3c979371c3a3879d9573e00e3a64c9b3a5a7b1b.tar.gz |
QPID-2920: Clean up out-dated FIXME comments.
git-svn-id: https://svn.apache.org/repos/asf/qpid/branches/qpid-2920-active@1182557 13f79535-47bb-0310-9956-ffa450edef68
44 files changed, 76 insertions, 150 deletions
diff --git a/qpid/cpp/examples/old_api/failover/Makefile.am b/qpid/cpp/examples/old_api/failover/Makefile.am index 8b1da80f2c..e1decf959e 100644 --- a/qpid/cpp/examples/old_api/failover/Makefile.am +++ b/qpid/cpp/examples/old_api/failover/Makefile.am @@ -38,8 +38,6 @@ examples_DATA= \ replaying_sender.cpp \ $(MAKEDIST) -# FIXME aconway 2008-10-10: add verify scripts. - EXTRA_DIST= \ CMakeLists.txt \ failover_declare_queues.vcproj \ diff --git a/qpid/cpp/include/qpid/client/Handle.h b/qpid/cpp/include/qpid/client/Handle.h index b8315481a9..9e7ef817eb 100644 --- a/qpid/cpp/include/qpid/client/Handle.h +++ b/qpid/cpp/include/qpid/client/Handle.h @@ -63,7 +63,7 @@ template <class T> class Handle { Impl* impl; - friend class PrivateImplRef<T>; // FIXME aconway 2009-04-30: Specify + friend class PrivateImplRef<T>; }; }} // namespace qpid::client diff --git a/qpid/cpp/include/qpid/client/Message.h b/qpid/cpp/include/qpid/client/Message.h index ba50dda9ba..3033b3e8d8 100644 --- a/qpid/cpp/include/qpid/client/Message.h +++ b/qpid/cpp/include/qpid/client/Message.h @@ -31,7 +31,7 @@ namespace qpid { namespace framing { class FieldTable; -class SequenceNumber; // FIXME aconway 2009-04-17: remove with getID? +class SequenceNumber; } namespace client { @@ -161,7 +161,6 @@ public: /** Get a non-modifyable reference to the message headers. */ QPID_CLIENT_EXTERN const framing::FieldTable& getHeaders() const; - // FIXME aconway 2009-04-17: does this need to be in public API? ///@internal QPID_CLIENT_EXTERN const framing::SequenceNumber& getId() const; diff --git a/qpid/cpp/rubygen/amqpgen.rb b/qpid/cpp/rubygen/amqpgen.rb index 88720cad5f..1ebfa4e565 100755 --- a/qpid/cpp/rubygen/amqpgen.rb +++ b/qpid/cpp/rubygen/amqpgen.rb @@ -394,12 +394,10 @@ class AmqpClass < AmqpElement @methods_on[chassis] ||= methods_.select { |m| m.on_chassis? chassis } end - # FIXME aconway 2008-04-11: def l4?() # preview !["connection", "session", "execution"].include?(name) && !control? end - # FIXME aconway 2008-04-11: def control?() ["connection", "session"].include?(name) end diff --git a/qpid/cpp/rubygen/framing.0-10/Session.rb b/qpid/cpp/rubygen/framing.0-10/Session.rb index e800df9b2e..2b79f8352d 100755 --- a/qpid/cpp/rubygen/framing.0-10/Session.rb +++ b/qpid/cpp/rubygen/framing.0-10/Session.rb @@ -18,7 +18,7 @@ # under the License. # # Usage: output_directory xml_spec_file [xml_spec_file...] -# +# $: << '..' require 'cppgen' @@ -31,7 +31,7 @@ class CppGen gen_methods.each { |m| m.set_sync_default(sync_default) } end - + # Generates a doxygen comment for AmqpMethod m. def doxygen(m) doxygen_comment { @@ -125,7 +125,7 @@ end class SessionNoKeywordGen < CppGen include SyncAsync - + def initialize(outdir, amqp, async) super(outdir, amqp) @async=async @@ -140,11 +140,10 @@ class SessionNoKeywordGen < CppGen h_file(@file) { include "qpid/client/#{@version_base}.h" include "qpid/client/ClientImportExport.h" - namespace(@namespace) { + namespace(@namespace) { doxygen_comment { genl "AMQP #{@amqp.version} #{sync_adjective} session API." genl @amqp.class_("session").doc - # FIXME aconway 2008-05-23: additional doc on sync/async use. } cpp_class(@classname, "public #{@version_base}") { public @@ -152,13 +151,13 @@ class SessionNoKeywordGen < CppGen session_methods(sync_default).each { |m| genl doxygen(m) - args=m.sig_c_default.join(", ") - genl "QPID_CLIENT_EXTERN #{m.return_type(@async)} #{m.session_function}(#{args});" + args=m.sig_c_default.join(", ") + genl "QPID_CLIENT_EXTERN #{m.return_type(@async)} #{m.session_function}(#{args});" } } }} - cpp_file(@file) { + cpp_file(@file) { include "qpid/client/#{@classname}" include "qpid/framing/all_method_bodies.h" include "qpid/client/SessionImpl.h" @@ -228,11 +227,11 @@ class SessionGen < CppGen # Generate keyword tag declarations. genl "#define BOOST_PARAMETER_MAX_ARITY #{max_arity}" include "<boost/parameter.hpp>" - namespace("qpid::client::arg") { + namespace("qpid::client::arg") { keyword_methods.map{ |m| m.param_names_c }.flatten.uniq.each { |k| genl "BOOST_PARAMETER_KEYWORD(keyword_tags, #{k})" }} - } + } public_api("#{@fqclass.file}.h") h_file(@fqclass.file) { include @fqbase.file @@ -263,7 +262,7 @@ declarations. \\ingroup clientapi -\\details +\\details <h2>Publishing Messages</h2> <ul> @@ -274,7 +273,7 @@ declarations. for (int i=0; i<10; i++) { message.setData(message_data.str()); - async(session).messageTransfer(arg::content=message, arg::destination="amq.direct"); + async(session).messageTransfer(arg::content=message, arg::destination="amq.direct"); } session.sync(); @@ -359,23 +358,23 @@ session.sync(); <h2>Accepting, Acquiring, Rejecting, or Releasing Messages</h2> <ul> <li><p>messageAccept() — acknowledges messages</p> -<pre>SequenceSet tobeAccepted; -toAccepted.add(msg.getId()); +<pre>SequenceSet tobeAccepted; +toAccepted.add(msg.getId()); session.messageAccept(toBeAccepted);</pre> </li> <li><p>messageAcquire()</p> <pre>SequenceSet tobeAcquired; -toBeAcquired.add(msg.getId()); +toBeAcquired.add(msg.getId()); session.messageAcquire(toBeAcquired);</pre> </li> <li><p>messageReject()</p> -<pre>SequenceSet tobeRejected; -toRejected.add(msg.getId()); +<pre>SequenceSet tobeRejected; +toRejected.add(msg.getId()); session.messageReject(toBeRejected);</pre> </li> <li><p>messageRelease()</p> -<pre>SequenceSet tobeReleased; -toReleased.add(msg.getId()); +<pre>SequenceSet tobeReleased; +toReleased.add(msg.getId()); session.messageRelease(toBeReleased);</pre></li> </ul> diff --git a/qpid/cpp/rubygen/framing.0-10/constants.rb b/qpid/cpp/rubygen/framing.0-10/constants.rb index 85bfb96ac0..98b24489dd 100755 --- a/qpid/cpp/rubygen/framing.0-10/constants.rb +++ b/qpid/cpp/rubygen/framing.0-10/constants.rb @@ -187,7 +187,7 @@ EOS include "<assert.h>" namespace("qpid::framing") { create_exception("execution", "error-code", "SessionException", "InvalidArgumentException") - # FIXME aconway 2008-10-07: there are no good exception codes in 0-10 for an invalid code. + # There are no good exception codes in 0-10 for an invalid code. # The following choices are arbitrary. create_exception("connection", "close-code", "ConnectionException", "FramingErrorException") create_exception("session", "detach-code", "ChannelException", "NotAttachedException") diff --git a/qpid/cpp/src/qpid/Serializer.h b/qpid/cpp/src/qpid/Serializer.h index a8ded9f5e0..40f315b5e4 100644 --- a/qpid/cpp/src/qpid/Serializer.h +++ b/qpid/cpp/src/qpid/Serializer.h @@ -10,9 +10,9 @@ * to you 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 @@ -24,7 +24,7 @@ #include <limits> #include <algorithm> -#include "qpid/Exception.h" // FIXME aconway 2008-04-03: proper exception class. +#include "qpid/Exception.h" namespace qpid { @@ -59,18 +59,18 @@ template <class Derived> class Serializer { public: ScopedLimit(Serializer& s, size_t l) : serializer(s), save(serializer.setLimit(l)) {} - + ~ScopedLimit() { serializer.setAbsLimit(save); } - + private: Serializer& serializer; size_t save; }; static size_t maxLimit() { return std::numeric_limits<size_t>::max(); } - + Serializer() : bytes(0), limit(maxLimit()) {} - + typedef Derived& result_type; // unary functor requirement. /** Wrapper functor to pass serializer functors by reference. */ @@ -112,7 +112,7 @@ template <class Derived> class Serializer { void setAbsLimit(size_t n) { limit = n; if (bytes > limit) - throw Exception("Framing error: data overrun"); // FIXME aconway 2008-04-03: proper exception. + throw Exception("Framing error: data overrun"); } protected: @@ -120,14 +120,14 @@ template <class Derived> class Serializer { void addBytes(size_t n) { size_t newBytes=bytes+n; if (newBytes > limit) - throw Exception("Framing error: data overrun"); // FIXME aconway 2008-04-03: proper exception. + throw Exception("Framing error: data overrun"); // bytes = newBytes; } - + private: void checkLimit() { } - + size_t bytes; // how many bytes serialized. size_t limit; // bytes may not exceed this limit. }; @@ -142,7 +142,7 @@ template <class Derived> class EncoderBase : public Serializer<Derived> { public: using Serializer<Derived>::operator(); using Serializer<Derived>::self; - + /** Default op() for non-primitive types. */ template <class T> Derived& operator()(const T& t) { serializable(const_cast<T&>(t)).serialize(self()); return self(); @@ -180,7 +180,7 @@ template <class Derived> class DecoderBase : public Serializer<Derived> { /** Serialize a type by converting it to/from another type. * To serialize type Foo by converting to/from type Bar create * a serializable() overload like this: - * + * * SerializeAs<Foo,Bar> serializable(Foo& t) { return SerializeAs<Foo,Bar>(t); } */ template <class Type, class AsType> diff --git a/qpid/cpp/src/qpid/amqp_0_10/Array.h b/qpid/cpp/src/qpid/amqp_0_10/Array.h index 6e8a419df7..2e606b2dbe 100644 --- a/qpid/cpp/src/qpid/amqp_0_10/Array.h +++ b/qpid/cpp/src/qpid/amqp_0_10/Array.h @@ -108,9 +108,9 @@ template<> class ArrayDomain<UnknownType> : public std::vector<UnknownType> { std::ostream& operator<<(std::ostream& o, const Array& a); -// FIXME aconway 2008-04-08: hack to supress encoding of -// command-fragments and in-doubt as there is a problem with the spec -// (command-fragments does not have a one byte type code.) +// Hack to supress encoding of command-fragments and in-doubt as there +// is a problem with the spec (command-fragments does not have a one +// byte type code.) namespace session { class CommandFragment; } namespace dtx { class Xid; } diff --git a/qpid/cpp/src/qpid/amqp_0_10/Codec.h b/qpid/cpp/src/qpid/amqp_0_10/Codec.h index fd006a348e..155697bdf3 100644 --- a/qpid/cpp/src/qpid/amqp_0_10/Codec.h +++ b/qpid/cpp/src/qpid/amqp_0_10/Codec.h @@ -115,7 +115,7 @@ struct Codec { using DecoderBase<Decoder<InIter> >::operator(); - // FIXME aconway 2008-03-10: wrong encoding, need packing support + // Wrong encoding, need packing support Decoder& operator()(bool& x) { raw((char&)x); return *this; } Decoder& operator()(char& x) { raw((char&)x); return *this; } @@ -165,7 +165,7 @@ struct Codec { using EncoderBase<Size>::operator(); - // FIXME aconway 2008-03-10: wrong encoding, need packing support + // Wrong encoding, need packing support Size& operator()(bool x) { size += sizeof(x); return *this; } Size& operator()(char x) { size += sizeof(x); return *this; } @@ -183,10 +183,6 @@ struct Codec { Size& operator()(float x) { size += sizeof(x); return *this; } Size& operator()(double x) { size += sizeof(x); return *this; } - // FIXME aconway 2008-04-03: optimize op()(Iter,Iter) - // for Iter with fixed-size value_type: - // distance(begin,end)*sizeof(value_type) - void raw(const void*, size_t n){ size += n; } template <class T> Size& littleEnd(T) { size+= sizeof(T); return *this; } @@ -195,7 +191,6 @@ struct Codec { size_t size; }; - // FIXME aconway 2008-03-11: rename to encoder(), decoder() template <class InIter> static Decoder<InIter> decode(const InIter &i) { return Decoder<InIter>(i); } diff --git a/qpid/cpp/src/qpid/amqp_0_10/Connection.h b/qpid/cpp/src/qpid/amqp_0_10/Connection.h index 39c30eb207..3e278b3837 100644 --- a/qpid/cpp/src/qpid/amqp_0_10/Connection.h +++ b/qpid/cpp/src/qpid/amqp_0_10/Connection.h @@ -76,7 +76,6 @@ class Connection : public sys::ConnectionCodec, size_t getBuffered() const; /** Used by cluster code to set a special version on "update" connections. */ - // FIXME aconway 2009-07-30: find a cleaner mechanism for this. void setVersion(const framing::ProtocolVersion&); }; diff --git a/qpid/cpp/src/qpid/amqp_0_10/Exception.h b/qpid/cpp/src/qpid/amqp_0_10/Exception.h index 6d526c1706..a65e66734c 100644 --- a/qpid/cpp/src/qpid/amqp_0_10/Exception.h +++ b/qpid/cpp/src/qpid/amqp_0_10/Exception.h @@ -33,8 +33,6 @@ namespace amqp_0_10 { * non-0 timeout may be available for re-attachment on another connection. */ struct ConnectionException : public qpid::Exception { - // FIXME aconway 2008-04-04: Merge qpid::ConnectionException - // into this when the old code is removed. typedef connection::CloseCode Code; ConnectionException(Code c, const std::string m) : qpid::Exception(m), code(c) {} @@ -46,15 +44,11 @@ struct ConnectionException : public qpid::Exception { * if an attempt is made to use a session that is not attached. */ struct SessionException : public qpid::Exception { - // FIXME aconway 2008-04-04: should not have a code at this level. - // Leave in place till old preview code is gone. SessionException(int /*code*/, const std::string& msg) : qpid::Exception(msg) {} }; /** Raised when the state of a session has been destroyed */ struct SessionDestroyedException : public SessionException { - // FIXME aconway 2008-04-04: should not have a code at this level. - // Leave in place till old preview code is gone. SessionDestroyedException(int code, const std::string& msg) : SessionException(code, msg){} }; diff --git a/qpid/cpp/src/qpid/amqp_0_10/Map.cpp b/qpid/cpp/src/qpid/amqp_0_10/Map.cpp index af3b302d25..f12584aebc 100644 --- a/qpid/cpp/src/qpid/amqp_0_10/Map.cpp +++ b/qpid/cpp/src/qpid/amqp_0_10/Map.cpp @@ -31,7 +31,7 @@ MapValue::MapValue() : code(codeFor(uint8_t(0))), blob(in_place<uint8_t>(0)) {} MapValue::MapValue(const MapValue& x) : code(x.code), blob(x.blob) {} bool MapValue::operator==(const MapValue& x) const { - return code == x.code; // FIXME aconway 2008-04-01: incomplete + return code == x.code; } struct OstreamVisitor : public MapValue::Visitor<std::ostream&> { @@ -59,7 +59,6 @@ std::ostream& operator<<(std::ostream& o, const Map& map) { } uint32_t Map::contentSize() const { - // FIXME aconway 2008-04-03: preview to 0-10 mapping: +4 for count. return /*4 +*/ Codec::Size()(begin(), end()); } diff --git a/qpid/cpp/src/qpid/amqp_0_10/Map.h b/qpid/cpp/src/qpid/amqp_0_10/Map.h index 4093b1a0aa..d421e101f1 100644 --- a/qpid/cpp/src/qpid/amqp_0_10/Map.h +++ b/qpid/cpp/src/qpid/amqp_0_10/Map.h @@ -159,8 +159,6 @@ template <class V> typename V::result_type MapValue::apply_visitor(const V& v) { } template <class S> void Map::encode(S& s) const { - // FIXME aconway 2008-04-03: replace preview mapping with 0-10 mapping: - // s(contentSize())(uint32_t(size())); // size, count s(contentSize()); for (const_iterator i = begin(); i != end(); ++i) s(i->first)(i->second); // key (type value) @@ -168,12 +166,12 @@ template <class S> void Map::encode(S& s) const { template <class S> void Map::decode(S& s) { uint32_t decodedSize /*, count*/; - // FIXME aconway 2008-04-03: replace preview mapping with 0-10 mapping: + // FIXME: replace preview mapping with 0-10 mapping: // s(contentSize())(uint32_t(size())); // size, count // s(decodedSize)(count); s(decodedSize); typename S::ScopedLimit l(s, decodedSize); // Make sure we don't overrun. - // FIXME aconway 2008-04-03: replace preview with 0-10: + // FIXME: replace preview with 0-10: // for ( ; count > 0; --count) { while (s.bytesRemaining() > 0) { key_type k; MapValue v; diff --git a/qpid/cpp/src/qpid/amqp_0_10/Packer.h b/qpid/cpp/src/qpid/amqp_0_10/Packer.h index c38e3a7efa..defc28dd04 100644 --- a/qpid/cpp/src/qpid/amqp_0_10/Packer.h +++ b/qpid/cpp/src/qpid/amqp_0_10/Packer.h @@ -99,9 +99,9 @@ class PackedDecoder { decode(t); else t = T(); - // FIXME aconway 2008-04-10: When we have all optionals - // represented by boost::optional the line above should be: - // throw CommandInvalidException("A required value was omitted."); + // When we have all optionals represented by boost::optional + // the line above should be: throw CommandInvalidException("A + // required value was omitted."); bits >>= 1; return *this; } diff --git a/qpid/cpp/src/qpid/amqp_0_10/Struct32.cpp b/qpid/cpp/src/qpid/amqp_0_10/Struct32.cpp index 2d38c09c21..0d871a8e0a 100644 --- a/qpid/cpp/src/qpid/amqp_0_10/Struct32.cpp +++ b/qpid/cpp/src/qpid/amqp_0_10/Struct32.cpp @@ -24,8 +24,6 @@ namespace qpid { namespace amqp_0_10 { Struct32::Struct32() { - // FIXME aconway 2008-04-16: this is only here to force a valid - // default-constructed Struct32 for serialize tests, clean up. *this = in_place<message::MessageResumeResult>(); } diff --git a/qpid/cpp/src/qpid/amqp_0_10/Unit.cpp b/qpid/cpp/src/qpid/amqp_0_10/Unit.cpp index 381de76dcc..697abe4015 100644 --- a/qpid/cpp/src/qpid/amqp_0_10/Unit.cpp +++ b/qpid/cpp/src/qpid/amqp_0_10/Unit.cpp @@ -30,7 +30,7 @@ void Unit::updateVariant() { case COMMAND: variant=CommandHolder(); break; case HEADER: variant=Header(); break; case BODY: variant=Body(header.getDataSize()); break; - default: assert(0); // FIXME aconway 2008-04-14: exception? + default: assert(0); } } diff --git a/qpid/cpp/src/qpid/amqp_0_10/built_in_types.h b/qpid/cpp/src/qpid/amqp_0_10/built_in_types.h index e95d1cf3e9..d04ed68be6 100644 --- a/qpid/cpp/src/qpid/amqp_0_10/built_in_types.h +++ b/qpid/cpp/src/qpid/amqp_0_10/built_in_types.h @@ -150,11 +150,10 @@ class UnknownType; template <class T> struct ArrayDomain; typedef ArrayDomain<UnknownType> Array; -// FIXME aconway 2008-04-08: TODO struct ByteRanges { template <class S> void serialize(S&) {} }; struct List { template <class S> void serialize(S&) {} }; -// FIXME aconway 2008-03-10: dummy ostream operators +// Dummy ostream operators inline std::ostream& operator<<(std::ostream& o, const ByteRanges&) { return o; } inline std::ostream& operator<<(std::ostream& o, const SequenceSet&) { return o; } inline std::ostream& operator<<(std::ostream& o, const List&) { return o; } diff --git a/qpid/cpp/src/qpid/broker/SemanticState.cpp b/qpid/cpp/src/qpid/broker/SemanticState.cpp index 37d981d6c4..0f28719102 100644 --- a/qpid/cpp/src/qpid/broker/SemanticState.cpp +++ b/qpid/cpp/src/qpid/broker/SemanticState.cpp @@ -350,11 +350,8 @@ bool SemanticState::ConsumerImpl::filter(intrusive_ptr<Message>) bool SemanticState::ConsumerImpl::accept(intrusive_ptr<Message> msg) { assertClusterSafe(); - // FIXME aconway 2009-06-08: if we have byte & message credit but - // checkCredit fails because the message is to big, we should - // remain on queue's listener list for possible smaller messages - // in future. - // + // FIXME: QPID-1909: Consumer with byte credit can get ignored if + // a large message "eclipses" a small one. blocked = !(filter(msg) && checkCredit(msg)); return !blocked; } diff --git a/qpid/cpp/src/qpid/broker/SessionAdapter.cpp b/qpid/cpp/src/qpid/broker/SessionAdapter.cpp index 63c4b660b2..641a59b42a 100644 --- a/qpid/cpp/src/qpid/broker/SessionAdapter.cpp +++ b/qpid/cpp/src/qpid/broker/SessionAdapter.cpp @@ -491,7 +491,6 @@ void SessionAdapter::MessageHandlerImpl::accept(const framing::SequenceSet& comm framing::MessageAcquireResult SessionAdapter::MessageHandlerImpl::acquire(const framing::SequenceSet& transfers) { - // FIXME aconway 2008-05-12: create SequenceSet directly, no need for intermediate results vector. SequenceNumberSet results; RangedOperation f = boost::bind(&SemanticState::acquire, &state, _1, _2, boost::ref(results)); transfers.for_each(f); diff --git a/qpid/cpp/src/qpid/broker/SessionManager.cpp b/qpid/cpp/src/qpid/broker/SessionManager.cpp index 8cc58571af..d5a58b5f04 100644 --- a/qpid/cpp/src/qpid/broker/SessionManager.cpp +++ b/qpid/cpp/src/qpid/broker/SessionManager.cpp @@ -62,7 +62,7 @@ std::auto_ptr<SessionState> SessionManager::attach(SessionHandler& h, const Ses state->attach(h); } return state; - // FIXME aconway 2008-04-29: implement force + // FIXME: implement force } void SessionManager::detach(std::auto_ptr<SessionState> session) { diff --git a/qpid/cpp/src/qpid/client/ConnectionImpl.cpp b/qpid/cpp/src/qpid/client/ConnectionImpl.cpp index db97f1e0f4..663eae67bb 100644 --- a/qpid/cpp/src/qpid/client/ConnectionImpl.cpp +++ b/qpid/cpp/src/qpid/client/ConnectionImpl.cpp @@ -405,13 +405,10 @@ void ConnectionImpl::failedConnection() { std::ostringstream msg; msg << *this << " closed"; - - // FIXME aconway 2008-06-06: exception use, amqp0-10 does not seem to have - // an appropriate close-code. connection-forced is not right. - handler.fail(msg.str());//ensure connection is marked as failed before notifying sessions - - // At this point if the object isn't open and isn't closing it must have failed to open - // so we can't do the rest of the cleanup + // Ensure connection is marked as failed before notifying sessions + handler.fail(msg.str()); + // At this point if the object isn't open and isn't closing it + // must have failed to open so we can't do the rest of the cleanup if (!isClosing && !isOpen) return; Mutex::ScopedLock l(lock); diff --git a/qpid/cpp/src/qpid/client/PrivateImplRef.h b/qpid/cpp/src/qpid/client/PrivateImplRef.h index 503a383c31..304528f29a 100644 --- a/qpid/cpp/src/qpid/client/PrivateImplRef.h +++ b/qpid/cpp/src/qpid/client/PrivateImplRef.h @@ -29,7 +29,6 @@ namespace qpid { namespace client { -// FIXME aconway 2009-04-24: details! /** @file * * Helper class to implement a class with a private, reference counted diff --git a/qpid/cpp/src/qpid/cluster/Connection.cpp b/qpid/cpp/src/qpid/cluster/Connection.cpp index 0feb4c19ff..71ad2273ad 100644 --- a/qpid/cpp/src/qpid/cluster/Connection.cpp +++ b/qpid/cpp/src/qpid/cluster/Connection.cpp @@ -547,7 +547,7 @@ void Connection::deliveryRecord(const string& qname, } else { // Message at original position in original queue m = queue->find(position); } - // FIXME aconway 2011-08-19: removed: + // Removed this line: // if (!m.payload) // throw Exception(QPID_MSG("deliveryRecord no update message")); // diff --git a/qpid/cpp/src/qpid/cluster/Cpg.cpp b/qpid/cpp/src/qpid/cluster/Cpg.cpp index 59c3d0714c..b7d65781da 100644 --- a/qpid/cpp/src/qpid/cluster/Cpg.cpp +++ b/qpid/cpp/src/qpid/cluster/Cpg.cpp @@ -128,7 +128,7 @@ Cpg::Cpg(Handler& h) : IOHandle(new sys::IOHandlePrivate), handler(h), isShutdow QPID_LOG(debug, "Initializing CPG"); cpg_error_t err = cpg_initialize(&handle, &callbacks); - int retries = 6; // FIXME aconway 2009-08-06: make this configurable. + int retries = 6; while (err == CPG_ERR_TRY_AGAIN && --retries) { QPID_LOG(notice, "Re-trying CPG initialization."); sys::sleep(5); diff --git a/qpid/cpp/src/qpid/cluster/exp/BrokerContext.cpp b/qpid/cpp/src/qpid/cluster/exp/BrokerContext.cpp index 13e9ae3db2..e165ba405e 100644 --- a/qpid/cpp/src/qpid/cluster/exp/BrokerContext.cpp +++ b/qpid/cpp/src/qpid/cluster/exp/BrokerContext.cpp @@ -58,8 +58,6 @@ const ProtocolVersion pv; // shorthand QPID_TSS bool tssReplicate = true; } -// FIXME aconway 2011-09-26: de-const the broker::Cluster interface, -// then de-const here. Multicaster& BrokerContext::mcaster(const broker::QueuedMessage& qm) { return core.getGroup(hashof(qm)).getMulticaster(); } @@ -96,7 +94,6 @@ void sendFrame(Multicaster& mcaster, const AMQFrame& frame, uint16_t channel) { bool BrokerContext::enqueue(Queue& queue, const boost::intrusive_ptr<Message>& msg) { - // FIXME aconway 2011-10-03: pass shared ptr on broker::Cluster interface. if (!tssReplicate) return true; Group& group = core.getGroup(hashof(queue)); MessageHolder::Channel channel = @@ -135,7 +132,6 @@ void BrokerContext::requeue(const broker::QueuedMessage& qm) { qm.payload->getRedelivered())); } -// FIXME aconway 2011-06-08: should be be using shared_ptr to q here? void BrokerContext::create(broker::Queue& q) { if (!tssReplicate) return; assert(!QueueContext::get(q)); diff --git a/qpid/cpp/src/qpid/cluster/exp/Core.cpp b/qpid/cpp/src/qpid/cluster/exp/Core.cpp index bde27fddd6..d3ee6133c9 100644 --- a/qpid/cpp/src/qpid/cluster/exp/Core.cpp +++ b/qpid/cpp/src/qpid/cluster/exp/Core.cpp @@ -59,10 +59,9 @@ Core::Core(const Settings& s, broker::Broker& b) : broker(b), settings(s) brokerHandler = bh.get(); // BrokerContext belongs to Broker broker.setCluster(std::auto_ptr<broker::Cluster>(bh)); - // FIXME aconway 2011-09-26: multi-group eh.start(); eh.getCpg().join(groupName); - // TODO aconway 2010-11-18: logging standards // FIXME aconway 2011-09-26: multi-group + // TODO aconway 2010-11-18: logging standards QPID_LOG(debug, "cluster: joined CPG group " << groupName << ", member-id=" << eh.getSelf()); } QPID_LOG(notice, "cluster: joined cluster " << s.name diff --git a/qpid/cpp/src/qpid/cluster/exp/CountdownTimer.h b/qpid/cpp/src/qpid/cluster/exp/CountdownTimer.h index b065d69e76..2e86949dfd 100644 --- a/qpid/cpp/src/qpid/cluster/exp/CountdownTimer.h +++ b/qpid/cpp/src/qpid/cluster/exp/CountdownTimer.h @@ -23,7 +23,6 @@ */ #include "qpid/sys/Timer.h" -#include "qpid/log/Statement.h" // FIXME aconway 2011-09-19: remove #include <boost/function.hpp> namespace qpid { diff --git a/qpid/cpp/src/qpid/cluster/exp/EventHandler.cpp b/qpid/cpp/src/qpid/cluster/exp/EventHandler.cpp index a7e514e675..f570a8fe2b 100644 --- a/qpid/cpp/src/qpid/cluster/exp/EventHandler.cpp +++ b/qpid/cpp/src/qpid/cluster/exp/EventHandler.cpp @@ -104,7 +104,6 @@ void EventHandler::configChange ( const cpg_address *left, int nLeft, const cpg_address *joined, int nJoined) { - // FIXME aconway 2010-10-20: TODO QPID_LOG(notice, "cluster: new membership: " << PrintAddrs(members, nMembers)); QPID_LOG_IF(notice, nLeft, "cluster: members left: " << PrintAddrs(left, nLeft)); QPID_LOG_IF(notice, nJoined, "cluster: members joined: " << PrintAddrs(joined, nJoined)); diff --git a/qpid/cpp/src/qpid/cluster/exp/QueueContext.cpp b/qpid/cpp/src/qpid/cluster/exp/QueueContext.cpp index 1de1c1850c..65a0711a84 100644 --- a/qpid/cpp/src/qpid/cluster/exp/QueueContext.cpp +++ b/qpid/cpp/src/qpid/cluster/exp/QueueContext.cpp @@ -69,7 +69,6 @@ void QueueContext::replicaState( if ((before != after || selfDelivered) && isOwner(after)) { QPID_LOG(trace, "cluster start consumers on " << queue.getName() << ", timer " << (after==SHARED_OWNER? "start" : "stop")); - sys::Mutex::ScopedLock l(lock); // FIXME aconway 2011-09-29: REMOVE queue.startConsumers(); if (after == SHARED_OWNER) timer.start(); else timer.stop(); diff --git a/qpid/cpp/src/qpid/cluster/exp/QueueContext.h b/qpid/cpp/src/qpid/cluster/exp/QueueContext.h index d20ed7cce3..691e11ebe7 100644 --- a/qpid/cpp/src/qpid/cluster/exp/QueueContext.h +++ b/qpid/cpp/src/qpid/cluster/exp/QueueContext.h @@ -30,9 +30,6 @@ #include "qpid/cluster/types.h" #include <boost/intrusive_ptr.hpp> -// FIXME aconway 2011-06-08: refactor broker::Cluster to put queue ups on -// class broker::Cluster::Queue. This becomes the cluster context. - namespace qpid { namespace broker { class Queue; @@ -97,7 +94,7 @@ class QueueContext : public RefCounted { private: sys::Mutex lock; CountdownTimer timer; - broker::Queue& queue; // FIXME aconway 2011-06-08: should be shared/weak ptr? + broker::Queue& queue; // FIXME aconway 2011-06-08: should be shared/weak ptr? Multicaster& mcast; size_t consumers; size_t hash; diff --git a/qpid/cpp/src/qpid/cluster/exp/QueueHandler.cpp b/qpid/cpp/src/qpid/cluster/exp/QueueHandler.cpp index a3575ca257..4e5820e295 100644 --- a/qpid/cpp/src/qpid/cluster/exp/QueueHandler.cpp +++ b/qpid/cpp/src/qpid/cluster/exp/QueueHandler.cpp @@ -59,16 +59,10 @@ void QueueHandler::left(const MemberId& member) { i->second->unsubscribe(member); } -// FIXME aconway 2011-06-08: do we need to hold on to the shared pointer for lifecycle? -// FIXME aconway 2011-09-13: called from wiring handler, need to consider for multi-cpg. void QueueHandler::add(boost::shared_ptr<broker::Queue> q) { - // FIXME aconway 2011-06-08: move create operation from Wiring to Queue handler. - // FIXME aconway 2011-05-10: assert not already in map. - // Local queues already have a context, remote queues need one. if (!QueueContext::get(*q)) - new QueueContext(*q, consumeLock, multicaster); // Context attaches itself to the Queue - // FIXME aconway 2011-09-15: thread safety: called from wiring handler.. + new QueueContext(*q, consumeLock, multicaster); // Context attaches to the Queue queues[q->getName()] = boost::intrusive_ptr<QueueReplica>( new QueueReplica(q, self())); } diff --git a/qpid/cpp/src/qpid/cluster/exp/WiringHandler.cpp b/qpid/cpp/src/qpid/cluster/exp/WiringHandler.cpp index ab1af35a72..da110fed8f 100644 --- a/qpid/cpp/src/qpid/cluster/exp/WiringHandler.cpp +++ b/qpid/cpp/src/qpid/cluster/exp/WiringHandler.cpp @@ -72,9 +72,6 @@ void WiringHandler::createQueue(const std::string& data) { } boost::shared_ptr<broker::Queue> q = broker.getQueues().find(name); assert(q); // FIXME aconway 2011-05-10: error handling. - // TODO aconway 2011-05-10: if we implement multi-group for queues - // then this call is a potential problem: comes from wiring - // delivery thread, not queues. queueHandler->add(q); QPID_LOG(debug, "cluster: create queue " << q->getName()); } diff --git a/qpid/cpp/src/qpid/cluster/exp/hash.h b/qpid/cpp/src/qpid/cluster/exp/hash.h index 298496b22a..90c4043969 100644 --- a/qpid/cpp/src/qpid/cluster/exp/hash.h +++ b/qpid/cpp/src/qpid/cluster/exp/hash.h @@ -39,7 +39,6 @@ class QueueContext; /**@file hash functions */ // The following all uses the cached hash value on the Queue::getContext() -// FIXME aconway 2011-09-26: de-const broker::Cluster interface then de-const here. size_t hashof(const broker::Queue& q); size_t hashof(const QueueContext& qc); size_t hashof(const broker::QueuedMessage& qm); diff --git a/qpid/cpp/src/qpid/framing/Array.cpp b/qpid/cpp/src/qpid/framing/Array.cpp index 454e8e298f..f25db326ad 100644 --- a/qpid/cpp/src/qpid/framing/Array.cpp +++ b/qpid/cpp/src/qpid/framing/Array.cpp @@ -119,7 +119,6 @@ bool Array::operator==(const Array& x) const { void Array::insert(iterator i, ValuePtr value) { if (type != value->getType()) { - // FIXME aconway 2008-10-31: put meaningful strings in this message. throw Exception(QPID_MSG("Wrong type of value in Array, expected " << type << " but found " << TypeCode(value->getType()))); } diff --git a/qpid/cpp/src/qpid/sys/Activity.h b/qpid/cpp/src/qpid/sys/Activity.h index 36db9da216..600ca4be1e 100644 --- a/qpid/cpp/src/qpid/sys/Activity.h +++ b/qpid/cpp/src/qpid/sys/Activity.h @@ -62,8 +62,6 @@ class Activity { friend class Scope; - // FIXME aconway 2011-09-30: fix pre-conditions with asserts, don't allow - // multiple stops/starts. /** * Set state to "stopped", so no new threads can enter. * Notify function will be called when all busy threads have left. diff --git a/qpid/cpp/src/qpid/sys/AsynchIOHandler.cpp b/qpid/cpp/src/qpid/sys/AsynchIOHandler.cpp index 30a87d9d44..e7aee73add 100644 --- a/qpid/cpp/src/qpid/sys/AsynchIOHandler.cpp +++ b/qpid/cpp/src/qpid/sys/AsynchIOHandler.cpp @@ -112,9 +112,8 @@ void AsynchIOHandler::readbuff(AsynchIO& , AsynchIO::BufferBase* buff) { // Check here for read credit if (readCredit.get() != InfiniteCredit) { if (readCredit.get() == 0) { - // FIXME aconway 2009-10-01: Workaround to avoid "false wakeups". - // readbuff is sometimes called with no credit. - // This should be fixed somewhere else to avoid such calls. + // Avoid "false wakeups" if readbuff is called with no + // credit. aio->unread(buff); return; } diff --git a/qpid/cpp/src/qpid/sys/PollableQueue.h b/qpid/cpp/src/qpid/sys/PollableQueue.h index 03b9d0084d..14f2bb0181 100644 --- a/qpid/cpp/src/qpid/sys/PollableQueue.h +++ b/qpid/cpp/src/qpid/sys/PollableQueue.h @@ -29,7 +29,6 @@ #include <boost/bind.hpp> #include <algorithm> #include <deque> -#include "qpid/log/Statement.h" // FIXME aconway 2011-08-05: namespace qpid { namespace sys { diff --git a/qpid/cpp/src/tests/PartialFailure.cpp b/qpid/cpp/src/tests/PartialFailure.cpp index 63ee28017a..ae2ecda34b 100644 --- a/qpid/cpp/src/tests/PartialFailure.cpp +++ b/qpid/cpp/src/tests/PartialFailure.cpp @@ -111,11 +111,6 @@ QPID_AUTO_TEST_CASE(testCoincidentErrors) { // Verify normal cluster-wide errors. QPID_AUTO_TEST_CASE(testNormalErrors) { - // FIXME aconway 2009-04-10: Would like to put a scope just around - // the statements expected to fail (in BOOST_CHECK_yTHROW) but that - // sproadically lets out messages, possibly because they're in - // Connection thread. - ClusterFixture cluster(3, updateArgs, -1); Client c0(cluster[0], "c0"); Client c1(cluster[1], "c1"); @@ -240,9 +235,6 @@ QPID_AUTO_TEST_CASE(testMultiPartialFailure) { c0.session.messageTransfer(content=pMessage("b", "q")); c3.session.messageTransfer(content=pMessage("c", "q")); BOOST_CHECK_EQUAL(c3.session.queueQuery("q").getMessageCount(), 4u); - // FIXME aconway 2009-06-30: This check fails sporadically with 2 != 3. - // It should pass reliably. - // BOOST_CHECK_EQUAL(2u, knownBrokerPorts(c0.connection, 2).size()); // Close inside ScopedSuppressLogging to avoid warnings c0.close(); diff --git a/qpid/cpp/src/tests/ReplicationTest.cpp b/qpid/cpp/src/tests/ReplicationTest.cpp index 1219a6b59e..7580e35c7a 100644 --- a/qpid/cpp/src/tests/ReplicationTest.cpp +++ b/qpid/cpp/src/tests/ReplicationTest.cpp @@ -48,7 +48,6 @@ namespace tests { QPID_AUTO_TEST_SUITE(ReplicationTestSuite) -// FIXME aconway 2009-11-26: clean this up. // The CMake-based build passes in the module suffix; if it's not there, this // is a Linux/UNIX libtool-based build. #if defined (QPID_MODULE_PREFIX) && defined (QPID_MODULE_SUFFIX) diff --git a/qpid/cpp/src/tests/amqp_0_10/serialize.cpp b/qpid/cpp/src/tests/amqp_0_10/serialize.cpp index 975d6206ec..2c171dc68c 100644 --- a/qpid/cpp/src/tests/amqp_0_10/serialize.cpp +++ b/qpid/cpp/src/tests/amqp_0_10/serialize.cpp @@ -7,9 +7,9 @@ * to you 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 @@ -106,7 +106,7 @@ QPID_AUTO_TEST_CASE(testSetLimit) { try { encode('4'); BOOST_FAIL("Expected exception"); - } catch (...) {} // FIXME aconway 2008-04-03: catch proper exception + } catch (...) {} BOOST_CHECK_EQUAL(data, "123"); } @@ -121,14 +121,14 @@ QPID_AUTO_TEST_CASE(testScopedLimit) { try { encode('d'); BOOST_FAIL("Expected exception"); - } catch(...) {} // FIXME aconway 2008-04-03: catch proper exception + } catch(...) {} } BOOST_CHECK_EQUAL(data, "\003123abc"); encode('x')('y')('z'); try { encode('!'); BOOST_FAIL("Expected exception"); - } catch(...) {} // FIXME aconway 2008-04-03: catch proper exception + } catch(...) {} BOOST_CHECK_EQUAL(data.size(), 10u); } @@ -197,7 +197,7 @@ QPID_AUTO_TEST_CASE(testControlEncodeDecode) { string data; Control::Holder h(in_place<connection::Tune>(1,2,3,4)); Codec::encode(std::back_inserter(data))(h); - + BOOST_CHECK_EQUAL(data.size(), Codec::size(h)); Codec::Decoder<string::iterator> decode(data.begin()); @@ -226,7 +226,7 @@ QPID_AUTO_TEST_CASE(testStruct32) { Codec::decode(data.begin())(structSize); BOOST_CHECK_EQUAL(structSize, Codec::size(dp) + 2); // +2 for code BOOST_CHECK_EQUAL(structSize, data.size()-4); // encoded body - + BOOST_CHECK_EQUAL(data.size(), Codec::size(s)); Struct32 s2; Codec::decode(data.begin())(s2); @@ -276,7 +276,7 @@ QPID_AUTO_TEST_CASE(testPacked) { Codec::encode(back_inserter(data))('a')(boost::optional<char>('b'))(boost::optional<char>())('c'); BOOST_CHECK_EQUAL(data, "abc"); data.clear(); - + DummyPacked dummy('a','b','c'); Codec::encode(back_inserter(data))(dummy); @@ -309,7 +309,7 @@ QPID_AUTO_TEST_CASE(testUnitControl) { string data2; Codec::encode(back_inserter(data2))(unit); - + BOOST_CHECK_EQUAL(data, data2); } @@ -325,7 +325,7 @@ QPID_AUTO_TEST_CASE(testArray) { string data3; Codec::encode(back_inserter(data3))(a); BOOST_CHECK_EQUAL(data, data3); - + Array x; Codec::decode(data.begin())(x); BOOST_CHECK_EQUAL(x.size(), 3u); @@ -354,10 +354,10 @@ QPID_AUTO_TEST_CASE(testStruct) { encodedBits <<= 8; encodedBits += uint8_t(data[4]); BOOST_CHECK_EQUAL(encodedBits, packBits(dp)); - + data.clear(); Struct32 h(dp); - Codec::encode(back_inserter(data))(h); + Codec::encode(back_inserter(data))(h); Struct32 h2; Codec::decode(data.begin())(h2); @@ -403,7 +403,6 @@ struct RecodeUnit { BOOST_CHECK_MESSAGE(data == data2, BOOST_CURRENT_FUNCTION); // Decode unit - // FIXME aconway 2008-04-15: must set limit to decode a header. Codec::Decoder<string::iterator> decode(data2.begin(), data2.size()-1); FrameHeader h; @@ -414,7 +413,7 @@ struct RecodeUnit { // Re-encode unit string data3; - Codec::encode(back_inserter(data3))(u2.getHeader())(u2); + Codec::encode(back_inserter(data3))(u2.getHeader())(u2); data3.push_back(char(0xCE)); // Preview end-of-frame BOOST_CHECK_MESSAGE(data3 == data2, BOOST_CURRENT_FUNCTION); diff --git a/qpid/cpp/src/tests/cluster2_tests.py b/qpid/cpp/src/tests/cluster2_tests.py index 3c4af6d83b..d5c9ffb61d 100755 --- a/qpid/cpp/src/tests/cluster2_tests.py +++ b/qpid/cpp/src/tests/cluster2_tests.py @@ -98,7 +98,6 @@ class Cluster2Tests(BrokerTest): content = ["a","b","c"] for m in content: s0.send(Message(m)) # Verify enqueued on members 0 and 1 - # FIXME aconway 2011-05-13: self.verify_content(content, sn0.receiver("q;{mode:browse}")) self.verify_content(content, sn1.receiver("q;{mode:browse}")) diff --git a/qpid/cpp/src/tests/exception_test.cpp b/qpid/cpp/src/tests/exception_test.cpp index 3e844b4e58..05d7c9850b 100644 --- a/qpid/cpp/src/tests/exception_test.cpp +++ b/qpid/cpp/src/tests/exception_test.cpp @@ -33,10 +33,6 @@ namespace tests { QPID_AUTO_TEST_SUITE(exception_test) -// FIXME aconway 2008-06-12: need to update our exception handling to -// 0-10 handling and extend this test to provoke all the exceptional -// conditions we know of and verify the correct exception is thrown. - using namespace std; using namespace qpid; using namespace sys; @@ -88,7 +84,7 @@ QPID_AUTO_TEST_CASE(TestSessionBusy) { ScopedSuppressLogging sl; // Suppress messages for expected errors. f.connection.newSession(f.session.getId().getName()); BOOST_FAIL("Expected SessionBusyException for " << f.session.getId().getName()); - } catch (const SessionBusyException&) {} // FIXME aconway 2008-09-22: client is not throwing correct exception. + } catch (const SessionBusyException&) {} } QPID_AUTO_TEST_CASE(DisconnectedPop) { diff --git a/qpid/cpp/src/tests/topictest b/qpid/cpp/src/tests/topictest index 257c24bd81..64f6de0ce8 100755 --- a/qpid/cpp/src/tests/topictest +++ b/qpid/cpp/src/tests/topictest @@ -56,6 +56,6 @@ publish() { for ((i=$SUBSCRIBERS ; i--; )); do subscribe $i & done -# FIXME aconway 2007-03-27: Hack around startup race. Fix topic test. + sleep 2 publish 2>&1 || exit 1 diff --git a/qpid/cpp/src/tests/topictest.ps1 b/qpid/cpp/src/tests/topictest.ps1 index 59a483c2d5..090e4dd631 100644 --- a/qpid/cpp/src/tests/topictest.ps1 +++ b/qpid/cpp/src/tests/topictest.ps1 @@ -67,7 +67,6 @@ while ($i -gt 0) { $i-- } -# FIXME aconway 2007-03-27: Hack around startup race. Fix topic test. Start-Sleep 2 publish $sub exit $LastExitCode |