Return-Path: X-Original-To: apmail-brooklyn-dev-archive@minotaur.apache.org Delivered-To: apmail-brooklyn-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 928F819021 for ; Tue, 22 Mar 2016 16:47:00 +0000 (UTC) Received: (qmail 42692 invoked by uid 500); 22 Mar 2016 16:47:00 -0000 Delivered-To: apmail-brooklyn-dev-archive@brooklyn.apache.org Received: (qmail 42668 invoked by uid 500); 22 Mar 2016 16:47:00 -0000 Mailing-List: contact dev-help@brooklyn.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@brooklyn.apache.org Delivered-To: mailing list dev@brooklyn.apache.org Received: (qmail 42653 invoked by uid 99); 22 Mar 2016 16:46:59 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Mar 2016 16:46:59 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 7603EDFC6F; Tue, 22 Mar 2016 16:46:59 +0000 (UTC) From: neykov To: dev@brooklyn.apache.org Reply-To: dev@brooklyn.apache.org References: In-Reply-To: Subject: [GitHub] brooklyn-server pull request: Test clocker Content-Type: text/plain Message-Id: <20160322164659.7603EDFC6F@git1-us-west.apache.org> Date: Tue, 22 Mar 2016 16:46:59 +0000 (UTC) Github user neykov commented on a diff in the pull request: https://github.com/apache/brooklyn-server/pull/59#discussion_r57022541 --- Diff: core/src/main/java/org/apache/brooklyn/core/mgmt/persist/XmlMementoSerializer.java --- @@ -454,25 +460,25 @@ public Object unmarshal(HierarchicalStreamReader reader, UnmarshallingContext co result.catalogItemId(catalogItemId); return result; } finally { - instance = null; + SpecConverterLocalInstance.remove(); if (customLoaderSet) { popXstreamCustomClassLoader(); } } } - Object instance; - @Override protected Object instantiateNewInstance(HierarchicalStreamReader reader, UnmarshallingContext context) { // the super calls getAttribute which requires that we have not yet done moveDown, // so we do this earlier and cache it for when we call super.unmarshal + Object instance = SpecConverterLocalInstance.get(); --- End diff -- I believe you can put arbitrary objects in the `context`, just for cases like this. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastructure@apache.org or file a JIRA ticket with INFRA. ---