X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-common-util%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Fcommon%2Futil%2FNoopAutoCloseable.java;fp=opendaylight%2Fmd-sal%2Fsal-common-util%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Fcommon%2Futil%2FNoopAutoCloseable.java;h=7f95f9632c24d2148cb3562653eeb45bee3c79c0;hb=dceb9db7853dabfbd4abdfb3d886a79871097831;hp=0000000000000000000000000000000000000000;hpb=2608b7032d0d019f5125704609eaaa0590c4598a;p=controller.git diff --git a/opendaylight/md-sal/sal-common-util/src/main/java/org/opendaylight/controller/sal/common/util/NoopAutoCloseable.java b/opendaylight/md-sal/sal-common-util/src/main/java/org/opendaylight/controller/sal/common/util/NoopAutoCloseable.java new file mode 100644 index 0000000000..7f95f9632c --- /dev/null +++ b/opendaylight/md-sal/sal-common-util/src/main/java/org/opendaylight/controller/sal/common/util/NoopAutoCloseable.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2016 Brocade Communications Systems, Inc. and others. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ +package org.opendaylight.controller.sal.common.util; + +/** + * An AutoCloseable that does nothing. + * + * @author Thomas Pantelis + */ +public final class NoopAutoCloseable implements AutoCloseable { + public static final NoopAutoCloseable INSTANCE = new NoopAutoCloseable(); + + private NoopAutoCloseable() { + } + + @Override + public void close() { + } +}