From f8394ac82ab955e65d69ac156e3b2b85f208db79 Mon Sep 17 00:00:00 2001 From: zzz Date: Tue, 25 Jun 2024 12:28:30 -0400 Subject: [PATCH] Data: Add LeaseSet2.getOptions() Currently unused but useful for testing. Remove useless null check. --- core/java/src/net/i2p/data/LeaseSet2.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/core/java/src/net/i2p/data/LeaseSet2.java b/core/java/src/net/i2p/data/LeaseSet2.java index 561803442..c402c11e6 100644 --- a/core/java/src/net/i2p/data/LeaseSet2.java +++ b/core/java/src/net/i2p/data/LeaseSet2.java @@ -134,6 +134,14 @@ public class LeaseSet2 extends LeaseSet { return _options.getProperty(opt); } + /** + * @return not a copy, do not modify, or null + * @since 0.9.63 + */ + public Properties getOptions() { + return _options; + } + /** * If more than one key, return the first supported one. * If none supported, return the first one. @@ -237,8 +245,7 @@ public class LeaseSet2 extends LeaseSet { _options.clear(); else _options = new OrderedProperties(); - if (options != null) - _options.putAll(options); + _options.putAll(options); } public boolean isOffline() {