SWEEP: Implemented ICloneable consistently and added interface to Support/Compatibility for .NET Standard 1.x
Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/32849301 Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/32849301 Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/32849301 Branch: refs/heads/master Commit: 32849301de3b17796367197d62b2396381a22488 Parents: ebe46c9 Author: Shad Storhaug <[email protected]> Authored: Wed Sep 6 21:18:49 2017 +0700 Committer: Shad Storhaug <[email protected]> Committed: Wed Sep 6 21:18:49 2017 +0700 ---------------------------------------------------------------------- .../Analysis/Compound/Hyphenation/CharVector.cs | 5 +--- .../Compound/Hyphenation/TernaryTree.cs | 10 ++------ .../Lucene.Net.Analysis.Common.csproj | 4 +-- .../ICU/TokenAttributes/ScriptAttributeImpl.cs | 2 +- .../TokenAttributes/BaseFormAttribute.cs | 2 +- .../TokenAttributes/BaseFormAttributeImpl.cs | 2 +- .../TokenAttributes/InflectionAttributeImpl.cs | 2 +- .../PartOfSpeechAttributeImpl.cs | 2 +- .../TokenAttributes/ReadingAttributeImpl.cs | 2 +- .../ByTask/Stats/TaskStats.cs | 4 +-- .../ByTask/Tasks/PerfTask.cs | 2 +- .../Lucene.Net.Benchmark.csproj | 6 ++--- src/Lucene.Net.Facet/Lucene.Net.Facet.csproj | 1 - .../Taxonomy/WriterCache/CharBlockArray.cs | 2 +- .../Flexible/Core/Nodes/PathQueryNode.cs | 5 +--- .../Flexible/Core/Nodes/QueryNodeImpl.cs | 5 +--- .../Lucene.Net.QueryParser.csproj | 4 +-- .../Surround/Query/SrndQuery.cs | 5 +--- .../TokenAttributes/CharTermAttribute.cs | 5 +--- .../Analysis/TokenAttributes/FlagsAttribute.cs | 5 +--- .../TokenAttributes/ICharTermAttribute.cs | 3 --- .../Analysis/TokenAttributes/OffsetAttribute.cs | 2 +- .../TokenAttributes/PayloadAttribute.cs | 2 +- .../PositionIncrementAttribute.cs | 2 +- .../TokenAttributes/PositionLengthAttribute.cs | 2 +- .../Analysis/TokenAttributes/TypeAttribute.cs | 5 +--- .../CompressingStoredFieldsIndexReader.cs | 3 ++- .../Codecs/Compressing/Decompressor.cs | 3 ++- .../Lucene3x/Lucene3xStoredFieldsReader.cs | 2 +- .../Codecs/Lucene3x/SegmentTermEnum.cs | 2 +- src/Lucene.Net/Codecs/Lucene3x/TermBuffer.cs | 2 +- src/Lucene.Net/Codecs/Lucene40/BitVector.cs | 2 +- .../Lucene40/Lucene40StoredFieldsReader.cs | 2 +- src/Lucene.Net/Codecs/StoredFieldsReader.cs | 2 +- src/Lucene.Net/Codecs/TermVectorsReader.cs | 2 +- .../Index/ConcurrentMergeScheduler.cs | 2 +- .../Index/DocumentsWriterPerThreadPool.cs | 2 +- src/Lucene.Net/Index/FlushPolicy.cs | 3 ++- src/Lucene.Net/Index/IMergeScheduler.cs | 4 +-- src/Lucene.Net/Index/IndexDeletionPolicy.cs | 2 +- src/Lucene.Net/Index/IndexWriterConfig.cs | 4 +-- src/Lucene.Net/Index/MergePolicy.cs | 2 +- src/Lucene.Net/Index/MergeScheduler.cs | 4 +-- src/Lucene.Net/Index/NoMergeScheduler.cs | 2 +- src/Lucene.Net/Index/SegmentInfos.cs | 2 +- src/Lucene.Net/Index/TaskMergeScheduler.cs | 2 +- src/Lucene.Net/Index/TermState.cs | 2 +- src/Lucene.Net/Search/Query.cs | 2 +- src/Lucene.Net/Search/Spans/SpanNearQuery.cs | 2 +- src/Lucene.Net/Search/Spans/SpanNotQuery.cs | 2 +- src/Lucene.Net/Search/Spans/SpanOrQuery.cs | 2 +- .../Search/Spans/SpanPositionCheckQuery.cs | 3 ++- src/Lucene.Net/Store/DataInput.cs | 2 +- src/Lucene.Net/Store/IndexInput.cs | 2 +- src/Lucene.Net/Store/RAMInputStream.cs | 3 ++- .../Support/Compatibility/ICloneable.cs | 26 ++++++++++++++++++++ src/Lucene.Net/Support/EquatableList.cs | 5 +--- src/Lucene.Net/Support/EquatableSet.cs | 5 +--- src/Lucene.Net/Util/AttributeImpl.cs | 5 +--- src/Lucene.Net/Util/AttributeSource.cs | 2 +- src/Lucene.Net/Util/Automaton/Automaton.cs | 2 +- src/Lucene.Net/Util/Automaton/Transition.cs | 3 ++- src/Lucene.Net/Util/BytesRef.cs | 2 +- src/Lucene.Net/Util/CharsRef.cs | 2 +- src/Lucene.Net/Util/InfoStream.cs | 2 +- src/Lucene.Net/Util/IntsRef.cs | 2 +- src/Lucene.Net/Util/LongsRef.cs | 2 +- src/Lucene.Net/Util/OpenBitSet.cs | 2 +- src/Lucene.Net/Util/SetOnce.cs | 3 ++- src/dotnet/Lucene.Net.ICU/Lucene.Net.ICU.csproj | 6 ++--- .../Lucene.Net.ICU/Support/BreakIterator.cs | 5 +--- 71 files changed, 110 insertions(+), 124 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/lucenenet/blob/32849301/src/Lucene.Net.Analysis.Common/Analysis/Compound/Hyphenation/CharVector.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Compound/Hyphenation/CharVector.cs b/src/Lucene.Net.Analysis.Common/Analysis/Compound/Hyphenation/CharVector.cs index 2e67343..c7982a8 100644 --- a/src/Lucene.Net.Analysis.Common/Analysis/Compound/Hyphenation/CharVector.cs +++ b/src/Lucene.Net.Analysis.Common/Analysis/Compound/Hyphenation/CharVector.cs @@ -27,10 +27,7 @@ namespace Lucene.Net.Analysis.Compound.Hyphenation /// /// This class has been taken from the Apache FOP project (http://xmlgraphics.apache.org/fop/). They have been slightly modified. /// </summary> - public class CharVector -#if FEATURE_CLONEABLE - : ICloneable -#endif + public class CharVector : ICloneable { /// <summary> /// Capacity increment size http://git-wip-us.apache.org/repos/asf/lucenenet/blob/32849301/src/Lucene.Net.Analysis.Common/Analysis/Compound/Hyphenation/TernaryTree.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Compound/Hyphenation/TernaryTree.cs b/src/Lucene.Net.Analysis.Common/Analysis/Compound/Hyphenation/TernaryTree.cs index d3758df..07b3772 100644 --- a/src/Lucene.Net.Analysis.Common/Analysis/Compound/Hyphenation/TernaryTree.cs +++ b/src/Lucene.Net.Analysis.Common/Analysis/Compound/Hyphenation/TernaryTree.cs @@ -65,10 +65,7 @@ namespace Lucene.Net.Analysis.Compound.Hyphenation /// This class has been taken from the Apache FOP project (http://xmlgraphics.apache.org/fop/). They have been slightly modified. /// </summary> - public class TernaryTree -#if FEATURE_CLONEABLE - : ICloneable -#endif + public class TernaryTree : ICloneable { // We use 4 arrays to represent a node.I guess I should have created a proper // node class, but somehow Knuth's pascal code made me forget we now have a @@ -553,10 +550,7 @@ namespace Lucene.Net.Analysis.Compound.Hyphenation /// </summary> private string curkey; - private class Item -#if FEATURE_CLONEABLE - : ICloneable -#endif + private class Item : ICloneable { internal char parent; internal char child; http://git-wip-us.apache.org/repos/asf/lucenenet/blob/32849301/src/Lucene.Net.Analysis.Common/Lucene.Net.Analysis.Common.csproj ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.Analysis.Common/Lucene.Net.Analysis.Common.csproj b/src/Lucene.Net.Analysis.Common/Lucene.Net.Analysis.Common.csproj index 8a3dfb6..16a344d 100644 --- a/src/Lucene.Net.Analysis.Common/Lucene.Net.Analysis.Common.csproj +++ b/src/Lucene.Net.Analysis.Common/Lucene.Net.Analysis.Common.csproj @@ -55,7 +55,7 @@ </ItemGroup> <PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' "> - <DefineConstants>$(DefineConstants);FEATURE_CLONEABLE;FEATURE_DTD_PROCESSING</DefineConstants> + <DefineConstants>$(DefineConstants);FEATURE_DTD_PROCESSING</DefineConstants> <DebugType>portable</DebugType> </PropertyGroup> @@ -68,7 +68,7 @@ </ItemGroup> <PropertyGroup Condition=" '$(TargetFramework)' == 'net451' "> - <DefineConstants>$(DefineConstants);FEATURE_CLONEABLE;FEATURE_DTD_PROCESSING</DefineConstants> + <DefineConstants>$(DefineConstants);FEATURE_DTD_PROCESSING</DefineConstants> <DebugType>full</DebugType> </PropertyGroup> http://git-wip-us.apache.org/repos/asf/lucenenet/blob/32849301/src/Lucene.Net.Analysis.ICU/Analysis/ICU/TokenAttributes/ScriptAttributeImpl.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.Analysis.ICU/Analysis/ICU/TokenAttributes/ScriptAttributeImpl.cs b/src/Lucene.Net.Analysis.ICU/Analysis/ICU/TokenAttributes/ScriptAttributeImpl.cs index 6fa4512..f97ccf1 100644 --- a/src/Lucene.Net.Analysis.ICU/Analysis/ICU/TokenAttributes/ScriptAttributeImpl.cs +++ b/src/Lucene.Net.Analysis.ICU/Analysis/ICU/TokenAttributes/ScriptAttributeImpl.cs @@ -14,7 +14,7 @@ // /// <para/> // /// @lucene.experimental // /// </summary> -// public class ScriptAttribute : Attribute, IScriptAttribute +// public class ScriptAttribute : Attribute, IScriptAttribute, System.ICloneable // { // private int code = UScript.COMMON; http://git-wip-us.apache.org/repos/asf/lucenenet/blob/32849301/src/Lucene.Net.Analysis.Kuromoji/TokenAttributes/BaseFormAttribute.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.Analysis.Kuromoji/TokenAttributes/BaseFormAttribute.cs b/src/Lucene.Net.Analysis.Kuromoji/TokenAttributes/BaseFormAttribute.cs index e3a06b3..70e1cb2 100644 --- a/src/Lucene.Net.Analysis.Kuromoji/TokenAttributes/BaseFormAttribute.cs +++ b/src/Lucene.Net.Analysis.Kuromoji/TokenAttributes/BaseFormAttribute.cs @@ -20,7 +20,7 @@ namespace Lucene.Net.Analysis.Ja.TokenAttributes */ /// <summary> - /// Attribute for <see cref="Token.BaseForm"/> + /// Attribute for <see cref="Token.GetBaseForm()"/> /// <para/> /// Note: depending on part of speech, this value may not be applicable, /// and will be null. http://git-wip-us.apache.org/repos/asf/lucenenet/blob/32849301/src/Lucene.Net.Analysis.Kuromoji/TokenAttributes/BaseFormAttributeImpl.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.Analysis.Kuromoji/TokenAttributes/BaseFormAttributeImpl.cs b/src/Lucene.Net.Analysis.Kuromoji/TokenAttributes/BaseFormAttributeImpl.cs index 7121c73..fe55aff 100644 --- a/src/Lucene.Net.Analysis.Kuromoji/TokenAttributes/BaseFormAttributeImpl.cs +++ b/src/Lucene.Net.Analysis.Kuromoji/TokenAttributes/BaseFormAttributeImpl.cs @@ -22,7 +22,7 @@ namespace Lucene.Net.Analysis.Ja.TokenAttributes /// <summary> /// Attribute for <see cref="Token.GetBaseForm()"/>. /// </summary> - public class BaseFormAttribute : Attribute, IBaseFormAttribute + public class BaseFormAttribute : Attribute, IBaseFormAttribute, System.ICloneable { private Token token; http://git-wip-us.apache.org/repos/asf/lucenenet/blob/32849301/src/Lucene.Net.Analysis.Kuromoji/TokenAttributes/InflectionAttributeImpl.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.Analysis.Kuromoji/TokenAttributes/InflectionAttributeImpl.cs b/src/Lucene.Net.Analysis.Kuromoji/TokenAttributes/InflectionAttributeImpl.cs index db96130..0554583 100644 --- a/src/Lucene.Net.Analysis.Kuromoji/TokenAttributes/InflectionAttributeImpl.cs +++ b/src/Lucene.Net.Analysis.Kuromoji/TokenAttributes/InflectionAttributeImpl.cs @@ -23,7 +23,7 @@ namespace Lucene.Net.Analysis.Ja.TokenAttributes /// <summary> /// Attribute for Kuromoji inflection data. /// </summary> - public class InflectionAttribute : Attribute, IInflectionAttribute + public class InflectionAttribute : Attribute, IInflectionAttribute, System.ICloneable { private Token token; http://git-wip-us.apache.org/repos/asf/lucenenet/blob/32849301/src/Lucene.Net.Analysis.Kuromoji/TokenAttributes/PartOfSpeechAttributeImpl.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.Analysis.Kuromoji/TokenAttributes/PartOfSpeechAttributeImpl.cs b/src/Lucene.Net.Analysis.Kuromoji/TokenAttributes/PartOfSpeechAttributeImpl.cs index 9d0451d..fa3376d 100644 --- a/src/Lucene.Net.Analysis.Kuromoji/TokenAttributes/PartOfSpeechAttributeImpl.cs +++ b/src/Lucene.Net.Analysis.Kuromoji/TokenAttributes/PartOfSpeechAttributeImpl.cs @@ -23,7 +23,7 @@ namespace Lucene.Net.Analysis.Ja.TokenAttributes /// <summary> /// Attribute for <see cref="Token.GetPartOfSpeech()"/>. /// </summary> - public class PartOfSpeechAttribute : Attribute, IPartOfSpeechAttribute + public class PartOfSpeechAttribute : Attribute, IPartOfSpeechAttribute, System.ICloneable { private Token token; http://git-wip-us.apache.org/repos/asf/lucenenet/blob/32849301/src/Lucene.Net.Analysis.Kuromoji/TokenAttributes/ReadingAttributeImpl.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.Analysis.Kuromoji/TokenAttributes/ReadingAttributeImpl.cs b/src/Lucene.Net.Analysis.Kuromoji/TokenAttributes/ReadingAttributeImpl.cs index bfb8a93..c78e867 100644 --- a/src/Lucene.Net.Analysis.Kuromoji/TokenAttributes/ReadingAttributeImpl.cs +++ b/src/Lucene.Net.Analysis.Kuromoji/TokenAttributes/ReadingAttributeImpl.cs @@ -23,7 +23,7 @@ namespace Lucene.Net.Analysis.Ja.TokenAttributes /// <summary> /// Attribute for Kuromoji reading data /// </summary> - public class ReadingAttribute : Attribute, IReadingAttribute + public class ReadingAttribute : Attribute, IReadingAttribute, System.ICloneable { private Token token; http://git-wip-us.apache.org/repos/asf/lucenenet/blob/32849301/src/Lucene.Net.Benchmark/ByTask/Stats/TaskStats.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.Benchmark/ByTask/Stats/TaskStats.cs b/src/Lucene.Net.Benchmark/ByTask/Stats/TaskStats.cs index 4d32c7b..2d5ff3b 100644 --- a/src/Lucene.Net.Benchmark/ByTask/Stats/TaskStats.cs +++ b/src/Lucene.Net.Benchmark/ByTask/Stats/TaskStats.cs @@ -29,7 +29,7 @@ namespace Lucene.Net.Benchmarks.ByTask.Stats /// The same task can run more than once, but, if that task records statistics, /// each run would create its own TaskStats. /// </summary> - public class TaskStats + public class TaskStats : ICloneable { /// <summary>Task for which data was collected.</summary> private PerfTask task; @@ -215,9 +215,7 @@ namespace Lucene.Net.Benchmarks.ByTask.Stats } } -#if FEATURE_CLONEABLE /// <seealso cref="ICloneable.Clone()"/> -#endif public virtual object Clone() { TaskStats c = (TaskStats)base.MemberwiseClone(); http://git-wip-us.apache.org/repos/asf/lucenenet/blob/32849301/src/Lucene.Net.Benchmark/ByTask/Tasks/PerfTask.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.Benchmark/ByTask/Tasks/PerfTask.cs b/src/Lucene.Net.Benchmark/ByTask/Tasks/PerfTask.cs index 0ae9dac..2a9b65a 100644 --- a/src/Lucene.Net.Benchmark/ByTask/Tasks/PerfTask.cs +++ b/src/Lucene.Net.Benchmark/ByTask/Tasks/PerfTask.cs @@ -58,7 +58,7 @@ namespace Lucene.Net.Benchmarks.ByTask.Tasks /// </description></item> /// </list> /// </remarks> - public abstract class PerfTask + public abstract class PerfTask : ICloneable { internal static readonly int DEFAULT_LOG_STEP = 1000; http://git-wip-us.apache.org/repos/asf/lucenenet/blob/32849301/src/Lucene.Net.Benchmark/Lucene.Net.Benchmark.csproj ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.Benchmark/Lucene.Net.Benchmark.csproj b/src/Lucene.Net.Benchmark/Lucene.Net.Benchmark.csproj index e9e0bc1..a0f7cda 100644 --- a/src/Lucene.Net.Benchmark/Lucene.Net.Benchmark.csproj +++ b/src/Lucene.Net.Benchmark/Lucene.Net.Benchmark.csproj @@ -24,7 +24,7 @@ <Import Project="..\..\Version.proj" /> <PropertyGroup> - <TargetFrameworks>netstandard1.5;net451</TargetFrameworks> + <TargetFrameworks>netstandard2.0;netstandard1.5;net451</TargetFrameworks> <PackageTargetFallback Condition=" '$(TargetFramework)' == 'netstandard1.5' ">$(PackageTargetFallback);dnxcore50</PackageTargetFallback> <!--<NetStandardImplicitPackageVersion Condition=" '$(TargetFramework)' == 'netstandard1.5' ">1.6.0</NetStandardImplicitPackageVersion>--> @@ -65,13 +65,13 @@ <PackageReference Include="Spatial4n.Core" Version="0.4.1-beta00007" /> </ItemGroup> - <!--<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' "> + <ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' "> <PackageReference Include="SharpZipLib.NETStandard" Version="0.86.0.1" /> </ItemGroup> <PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' "> <DebugType>portable</DebugType> - </PropertyGroup>--> + </PropertyGroup> <ItemGroup Condition=" '$(TargetFramework)' == 'netstandard1.5' "> <PackageReference Include="SharpZipLib.NETStandard" Version="0.86.0.1" /> http://git-wip-us.apache.org/repos/asf/lucenenet/blob/32849301/src/Lucene.Net.Facet/Lucene.Net.Facet.csproj ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.Facet/Lucene.Net.Facet.csproj b/src/Lucene.Net.Facet/Lucene.Net.Facet.csproj index 996903c..962001a 100644 --- a/src/Lucene.Net.Facet/Lucene.Net.Facet.csproj +++ b/src/Lucene.Net.Facet/Lucene.Net.Facet.csproj @@ -67,7 +67,6 @@ </PropertyGroup> <PropertyGroup Condition=" '$(TargetFramework)' == 'net451' "> - <DefineConstants>$(DefineConstants);FEATURE_SERIALIZABLE</DefineConstants> <DebugType>full</DebugType> </PropertyGroup> http://git-wip-us.apache.org/repos/asf/lucenenet/blob/32849301/src/Lucene.Net.Facet/Taxonomy/WriterCache/CharBlockArray.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.Facet/Taxonomy/WriterCache/CharBlockArray.cs b/src/Lucene.Net.Facet/Taxonomy/WriterCache/CharBlockArray.cs index b27532d..a0f35d0 100644 --- a/src/Lucene.Net.Facet/Taxonomy/WriterCache/CharBlockArray.cs +++ b/src/Lucene.Net.Facet/Taxonomy/WriterCache/CharBlockArray.cs @@ -39,7 +39,7 @@ namespace Lucene.Net.Facet.Taxonomy.WriterCache private const int DEFAULT_BLOCK_SIZE = 32 * 1024; // 32 KB default size - internal sealed class Block + internal sealed class Block : ICloneable { //internal const long serialVersionUID = 1L; // LUCENENET: Not used http://git-wip-us.apache.org/repos/asf/lucenenet/blob/32849301/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/PathQueryNode.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/PathQueryNode.cs b/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/PathQueryNode.cs index 360124a..00302f3 100644 --- a/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/PathQueryNode.cs +++ b/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/PathQueryNode.cs @@ -44,10 +44,7 @@ namespace Lucene.Net.QueryParsers.Flexible.Core.Nodes /// <summary> /// Term text with a beginning and end position /// </summary> - public class QueryText -#if FEATURE_CLONEABLE - : ICloneable -#endif + public class QueryText : ICloneable { private string value = null; http://git-wip-us.apache.org/repos/asf/lucenenet/blob/32849301/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/QueryNodeImpl.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/QueryNodeImpl.cs b/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/QueryNodeImpl.cs index e066c8d..0b13aa9 100644 --- a/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/QueryNodeImpl.cs +++ b/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/QueryNodeImpl.cs @@ -30,10 +30,7 @@ namespace Lucene.Net.QueryParsers.Flexible.Core.Nodes /// A <see cref="QueryNode"/> is the default implementation of the interface /// <see cref="IQueryNode"/> /// </summary> - public abstract class QueryNode : IQueryNode -#if FEATURE_CLONEABLE - , ICloneable -#endif + public abstract class QueryNode : IQueryNode, ICloneable { /// <summary> /// index default field http://git-wip-us.apache.org/repos/asf/lucenenet/blob/32849301/src/Lucene.Net.QueryParser/Lucene.Net.QueryParser.csproj ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.QueryParser/Lucene.Net.QueryParser.csproj b/src/Lucene.Net.QueryParser/Lucene.Net.QueryParser.csproj index 5b28210..641a746 100644 --- a/src/Lucene.Net.QueryParser/Lucene.Net.QueryParser.csproj +++ b/src/Lucene.Net.QueryParser/Lucene.Net.QueryParser.csproj @@ -55,7 +55,7 @@ </ItemGroup> <PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' "> - <DefineConstants>$(DefineConstants);FEATURE_CLONEABLE;FEATURE_XSLT;FEATURE_SERIALIZABLE</DefineConstants> + <DefineConstants>$(DefineConstants);FEATURE_XSLT;FEATURE_SERIALIZABLE</DefineConstants> <DebugType>portable</DebugType> </PropertyGroup> @@ -68,7 +68,7 @@ </PropertyGroup> <PropertyGroup Condition=" '$(TargetFramework)' == 'net451' "> - <DefineConstants>$(DefineConstants);FEATURE_CLONEABLE;FEATURE_XSLT;FEATURE_SERIALIZABLE;FEATURE_SERIALIZABLE_EXCEPTIONS</DefineConstants> + <DefineConstants>$(DefineConstants);FEATURE_XSLT;FEATURE_SERIALIZABLE;FEATURE_SERIALIZABLE_EXCEPTIONS</DefineConstants> <DebugType>full</DebugType> </PropertyGroup> http://git-wip-us.apache.org/repos/asf/lucenenet/blob/32849301/src/Lucene.Net.QueryParser/Surround/Query/SrndQuery.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.QueryParser/Surround/Query/SrndQuery.cs b/src/Lucene.Net.QueryParser/Surround/Query/SrndQuery.cs index bd8c63f..cbbd027 100644 --- a/src/Lucene.Net.QueryParser/Surround/Query/SrndQuery.cs +++ b/src/Lucene.Net.QueryParser/Surround/Query/SrndQuery.cs @@ -25,10 +25,7 @@ namespace Lucene.Net.QueryParsers.Surround.Query /// <summary> /// Lowest level base class for surround queries /// </summary> - public abstract class SrndQuery -#if FEATURE_CLONEABLE - : ICloneable -#endif + public abstract class SrndQuery : ICloneable { //public SrndQuery() { } http://git-wip-us.apache.org/repos/asf/lucenenet/blob/32849301/src/Lucene.Net/Analysis/TokenAttributes/CharTermAttribute.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Analysis/TokenAttributes/CharTermAttribute.cs b/src/Lucene.Net/Analysis/TokenAttributes/CharTermAttribute.cs index e1e73a9..a243d84 100644 --- a/src/Lucene.Net/Analysis/TokenAttributes/CharTermAttribute.cs +++ b/src/Lucene.Net/Analysis/TokenAttributes/CharTermAttribute.cs @@ -33,10 +33,7 @@ namespace Lucene.Net.Analysis.TokenAttributes /// <summary> /// Default implementation of <see cref="ICharTermAttribute"/>. </summary> - public class CharTermAttribute : Attribute, ICharTermAttribute, ITermToBytesRefAttribute -#if FEATURE_CLONEABLE - , ICloneable -#endif + public class CharTermAttribute : Attribute, ICharTermAttribute, ITermToBytesRefAttribute, ICloneable { private static int MIN_BUFFER_SIZE = 10; http://git-wip-us.apache.org/repos/asf/lucenenet/blob/32849301/src/Lucene.Net/Analysis/TokenAttributes/FlagsAttribute.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Analysis/TokenAttributes/FlagsAttribute.cs b/src/Lucene.Net/Analysis/TokenAttributes/FlagsAttribute.cs index 1f2f7b6..b05a076 100644 --- a/src/Lucene.Net/Analysis/TokenAttributes/FlagsAttribute.cs +++ b/src/Lucene.Net/Analysis/TokenAttributes/FlagsAttribute.cs @@ -24,10 +24,7 @@ namespace Lucene.Net.Analysis.TokenAttributes /// <summary> /// Default implementation of <see cref="IFlagsAttribute"/>. </summary> - public class FlagsAttribute : Attribute, IFlagsAttribute -#if FEATURE_CLONEABLE - , ICloneable -#endif + public class FlagsAttribute : Attribute, IFlagsAttribute, ICloneable { private int flags = 0; http://git-wip-us.apache.org/repos/asf/lucenenet/blob/32849301/src/Lucene.Net/Analysis/TokenAttributes/ICharTermAttribute.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Analysis/TokenAttributes/ICharTermAttribute.cs b/src/Lucene.Net/Analysis/TokenAttributes/ICharTermAttribute.cs index e41404b..412ed97 100644 --- a/src/Lucene.Net/Analysis/TokenAttributes/ICharTermAttribute.cs +++ b/src/Lucene.Net/Analysis/TokenAttributes/ICharTermAttribute.cs @@ -26,9 +26,6 @@ namespace Lucene.Net.Analysis.TokenAttributes /// The term text of a <see cref="Token"/>. /// </summary> public interface ICharTermAttribute : IAttribute, ICharSequence -#if FEATURE_CLONEABLE - , ICloneable -#endif { /// <summary> /// Copies the contents of buffer, starting at offset for http://git-wip-us.apache.org/repos/asf/lucenenet/blob/32849301/src/Lucene.Net/Analysis/TokenAttributes/OffsetAttribute.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Analysis/TokenAttributes/OffsetAttribute.cs b/src/Lucene.Net/Analysis/TokenAttributes/OffsetAttribute.cs index 20185af..361ac2e 100644 --- a/src/Lucene.Net/Analysis/TokenAttributes/OffsetAttribute.cs +++ b/src/Lucene.Net/Analysis/TokenAttributes/OffsetAttribute.cs @@ -22,7 +22,7 @@ namespace Lucene.Net.Analysis.TokenAttributes /// <summary> /// Default implementation of <see cref="IOffsetAttribute"/>. </summary> - public class OffsetAttribute : Attribute, IOffsetAttribute + public class OffsetAttribute : Attribute, IOffsetAttribute, System.ICloneable { private int startOffset; private int endOffset; http://git-wip-us.apache.org/repos/asf/lucenenet/blob/32849301/src/Lucene.Net/Analysis/TokenAttributes/PayloadAttribute.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Analysis/TokenAttributes/PayloadAttribute.cs b/src/Lucene.Net/Analysis/TokenAttributes/PayloadAttribute.cs index 4ba1e5a..3806cd2 100644 --- a/src/Lucene.Net/Analysis/TokenAttributes/PayloadAttribute.cs +++ b/src/Lucene.Net/Analysis/TokenAttributes/PayloadAttribute.cs @@ -23,7 +23,7 @@ namespace Lucene.Net.Analysis.TokenAttributes /// <summary> /// Default implementation of <see cref="IPayloadAttribute"/>. </summary> - public class PayloadAttribute : Attribute, IPayloadAttribute + public class PayloadAttribute : Attribute, IPayloadAttribute, System.ICloneable { private BytesRef payload; http://git-wip-us.apache.org/repos/asf/lucenenet/blob/32849301/src/Lucene.Net/Analysis/TokenAttributes/PositionIncrementAttribute.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Analysis/TokenAttributes/PositionIncrementAttribute.cs b/src/Lucene.Net/Analysis/TokenAttributes/PositionIncrementAttribute.cs index 00a82ba..34222d3 100644 --- a/src/Lucene.Net/Analysis/TokenAttributes/PositionIncrementAttribute.cs +++ b/src/Lucene.Net/Analysis/TokenAttributes/PositionIncrementAttribute.cs @@ -24,7 +24,7 @@ namespace Lucene.Net.Analysis.TokenAttributes /// <summary> /// Default implementation of <see cref="IPositionIncrementAttribute"/>. </summary> - public class PositionIncrementAttribute : Attribute, IPositionIncrementAttribute + public class PositionIncrementAttribute : Attribute, IPositionIncrementAttribute, System.ICloneable { private int positionIncrement = 1; http://git-wip-us.apache.org/repos/asf/lucenenet/blob/32849301/src/Lucene.Net/Analysis/TokenAttributes/PositionLengthAttribute.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Analysis/TokenAttributes/PositionLengthAttribute.cs b/src/Lucene.Net/Analysis/TokenAttributes/PositionLengthAttribute.cs index de2896d..f6cf873 100644 --- a/src/Lucene.Net/Analysis/TokenAttributes/PositionLengthAttribute.cs +++ b/src/Lucene.Net/Analysis/TokenAttributes/PositionLengthAttribute.cs @@ -24,7 +24,7 @@ namespace Lucene.Net.Analysis.TokenAttributes /// <summary> /// Default implementation of <see cref="IPositionLengthAttribute"/>. </summary> - public class PositionLengthAttribute : Attribute, IPositionLengthAttribute + public class PositionLengthAttribute : Attribute, IPositionLengthAttribute, System.ICloneable { private int positionLength = 1; http://git-wip-us.apache.org/repos/asf/lucenenet/blob/32849301/src/Lucene.Net/Analysis/TokenAttributes/TypeAttribute.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Analysis/TokenAttributes/TypeAttribute.cs b/src/Lucene.Net/Analysis/TokenAttributes/TypeAttribute.cs index 86ebc5d..4e2f7a7 100644 --- a/src/Lucene.Net/Analysis/TokenAttributes/TypeAttribute.cs +++ b/src/Lucene.Net/Analysis/TokenAttributes/TypeAttribute.cs @@ -24,10 +24,7 @@ namespace Lucene.Net.Analysis.TokenAttributes /// <summary> /// Default implementation of <see cref="ITypeAttribute"/>. </summary> - public partial class TypeAttribute : Attribute, ITypeAttribute -#if FEATURE_CLONEABLE - , ICloneable -#endif + public partial class TypeAttribute : Attribute, ITypeAttribute, ICloneable { private string type; http://git-wip-us.apache.org/repos/asf/lucenenet/blob/32849301/src/Lucene.Net/Codecs/Compressing/CompressingStoredFieldsIndexReader.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Codecs/Compressing/CompressingStoredFieldsIndexReader.cs b/src/Lucene.Net/Codecs/Compressing/CompressingStoredFieldsIndexReader.cs index fb889e6..ebc9cb2 100644 --- a/src/Lucene.Net/Codecs/Compressing/CompressingStoredFieldsIndexReader.cs +++ b/src/Lucene.Net/Codecs/Compressing/CompressingStoredFieldsIndexReader.cs @@ -1,4 +1,5 @@ using Lucene.Net.Support; +using System; using ArrayUtil = Lucene.Net.Util.ArrayUtil; namespace Lucene.Net.Codecs.Compressing @@ -31,7 +32,7 @@ namespace Lucene.Net.Codecs.Compressing /// <para/> /// @lucene.internal /// </summary> - public sealed class CompressingStoredFieldsIndexReader + public sealed class CompressingStoredFieldsIndexReader : ICloneable { internal static long MoveLowOrderBitToSign(long n) { http://git-wip-us.apache.org/repos/asf/lucenenet/blob/32849301/src/Lucene.Net/Codecs/Compressing/Decompressor.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Codecs/Compressing/Decompressor.cs b/src/Lucene.Net/Codecs/Compressing/Decompressor.cs index 726841d..e5a4249 100644 --- a/src/Lucene.Net/Codecs/Compressing/Decompressor.cs +++ b/src/Lucene.Net/Codecs/Compressing/Decompressor.cs @@ -1,3 +1,4 @@ +using System; using BytesRef = Lucene.Net.Util.BytesRef; namespace Lucene.Net.Codecs.Compressing @@ -24,7 +25,7 @@ namespace Lucene.Net.Codecs.Compressing /// <summary> /// A decompressor. /// </summary> - public abstract class Decompressor + public abstract class Decompressor : ICloneable { /// <summary> /// Sole constructor, typically called from sub-classes. </summary> http://git-wip-us.apache.org/repos/asf/lucenenet/blob/32849301/src/Lucene.Net/Codecs/Lucene3x/Lucene3xStoredFieldsReader.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Codecs/Lucene3x/Lucene3xStoredFieldsReader.cs b/src/Lucene.Net/Codecs/Lucene3x/Lucene3xStoredFieldsReader.cs index c18fc59..103a978 100644 --- a/src/Lucene.Net/Codecs/Lucene3x/Lucene3xStoredFieldsReader.cs +++ b/src/Lucene.Net/Codecs/Lucene3x/Lucene3xStoredFieldsReader.cs @@ -42,7 +42,7 @@ namespace Lucene.Net.Codecs.Lucene3x /// It uses <segment>.fdt and <segment>.fdx; files. /// </summary> [Obsolete("Only for reading existing 3.x indexes")] - internal sealed class Lucene3xStoredFieldsReader : StoredFieldsReader, IDisposable + internal sealed class Lucene3xStoredFieldsReader : StoredFieldsReader, ICloneable, IDisposable { private const int FORMAT_SIZE = 4; http://git-wip-us.apache.org/repos/asf/lucenenet/blob/32849301/src/Lucene.Net/Codecs/Lucene3x/SegmentTermEnum.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Codecs/Lucene3x/SegmentTermEnum.cs b/src/Lucene.Net/Codecs/Lucene3x/SegmentTermEnum.cs index 7782028..7c53a10 100644 --- a/src/Lucene.Net/Codecs/Lucene3x/SegmentTermEnum.cs +++ b/src/Lucene.Net/Codecs/Lucene3x/SegmentTermEnum.cs @@ -30,7 +30,7 @@ namespace Lucene.Net.Codecs.Lucene3x /// @lucene.experimental /// </summary> [Obsolete("(4.0) No longer used with flex indexing, except for reading old segments")] - internal sealed class SegmentTermEnum : IDisposable + internal sealed class SegmentTermEnum : ICloneable, IDisposable { private IndexInput input; internal FieldInfos fieldInfos; http://git-wip-us.apache.org/repos/asf/lucenenet/blob/32849301/src/Lucene.Net/Codecs/Lucene3x/TermBuffer.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Codecs/Lucene3x/TermBuffer.cs b/src/Lucene.Net/Codecs/Lucene3x/TermBuffer.cs index 1c457dc..61f3504 100644 --- a/src/Lucene.Net/Codecs/Lucene3x/TermBuffer.cs +++ b/src/Lucene.Net/Codecs/Lucene3x/TermBuffer.cs @@ -32,7 +32,7 @@ namespace Lucene.Net.Codecs.Lucene3x /// @lucene.experimental /// </summary> [Obsolete("(4.0)")] - internal sealed class TermBuffer + internal sealed class TermBuffer : ICloneable { private string field; private Term term; // cached http://git-wip-us.apache.org/repos/asf/lucenenet/blob/32849301/src/Lucene.Net/Codecs/Lucene40/BitVector.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Codecs/Lucene40/BitVector.cs b/src/Lucene.Net/Codecs/Lucene40/BitVector.cs index a33b95b..e741f66 100644 --- a/src/Lucene.Net/Codecs/Lucene40/BitVector.cs +++ b/src/Lucene.Net/Codecs/Lucene40/BitVector.cs @@ -45,7 +45,7 @@ namespace Lucene.Net.Codecs.Lucene40 /// </summary> // pkg-private: if this thing is generally useful then it can go back in .util, // but the serialization must be here underneath the codec. - internal sealed class BitVector : IMutableBits + internal sealed class BitVector : ICloneable, IMutableBits { private byte[] bits; private int size; http://git-wip-us.apache.org/repos/asf/lucenenet/blob/32849301/src/Lucene.Net/Codecs/Lucene40/Lucene40StoredFieldsReader.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Codecs/Lucene40/Lucene40StoredFieldsReader.cs b/src/Lucene.Net/Codecs/Lucene40/Lucene40StoredFieldsReader.cs index 218a262..821c1e9 100644 --- a/src/Lucene.Net/Codecs/Lucene40/Lucene40StoredFieldsReader.cs +++ b/src/Lucene.Net/Codecs/Lucene40/Lucene40StoredFieldsReader.cs @@ -41,7 +41,7 @@ namespace Lucene.Net.Codecs.Lucene40 /// @lucene.internal /// </summary> /// <seealso cref="Lucene40StoredFieldsFormat"/> - public sealed class Lucene40StoredFieldsReader : StoredFieldsReader, IDisposable + public sealed class Lucene40StoredFieldsReader : StoredFieldsReader, ICloneable, IDisposable { private readonly FieldInfos fieldInfos; private readonly IndexInput fieldsStream; http://git-wip-us.apache.org/repos/asf/lucenenet/blob/32849301/src/Lucene.Net/Codecs/StoredFieldsReader.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Codecs/StoredFieldsReader.cs b/src/Lucene.Net/Codecs/StoredFieldsReader.cs index 969f541..ab9f197 100644 --- a/src/Lucene.Net/Codecs/StoredFieldsReader.cs +++ b/src/Lucene.Net/Codecs/StoredFieldsReader.cs @@ -31,7 +31,7 @@ namespace Lucene.Net.Codecs /// <para/> /// @lucene.experimental /// </summary> - public abstract class StoredFieldsReader : IDisposable + public abstract class StoredFieldsReader : ICloneable, IDisposable { /// <summary> /// Sole constructor. (For invocation by subclass http://git-wip-us.apache.org/repos/asf/lucenenet/blob/32849301/src/Lucene.Net/Codecs/TermVectorsReader.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Codecs/TermVectorsReader.cs b/src/Lucene.Net/Codecs/TermVectorsReader.cs index 1f5d0bd..131e4c9 100644 --- a/src/Lucene.Net/Codecs/TermVectorsReader.cs +++ b/src/Lucene.Net/Codecs/TermVectorsReader.cs @@ -28,7 +28,7 @@ namespace Lucene.Net.Codecs /// <para/> /// @lucene.experimental /// </summary> - public abstract class TermVectorsReader : IDisposable + public abstract class TermVectorsReader : ICloneable, IDisposable { /// <summary> /// Sole constructor. (For invocation by subclass http://git-wip-us.apache.org/repos/asf/lucenenet/blob/32849301/src/Lucene.Net/Index/ConcurrentMergeScheduler.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Index/ConcurrentMergeScheduler.cs b/src/Lucene.Net/Index/ConcurrentMergeScheduler.cs index 9d3255e..d03e891 100644 --- a/src/Lucene.Net/Index/ConcurrentMergeScheduler.cs +++ b/src/Lucene.Net/Index/ConcurrentMergeScheduler.cs @@ -757,7 +757,7 @@ namespace Lucene.Net.Index return sb.ToString(); } - public override IMergeScheduler Clone() + public override object Clone() { ConcurrentMergeScheduler clone = (ConcurrentMergeScheduler)base.Clone(); clone.m_writer = null; http://git-wip-us.apache.org/repos/asf/lucenenet/blob/32849301/src/Lucene.Net/Index/DocumentsWriterPerThreadPool.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Index/DocumentsWriterPerThreadPool.cs b/src/Lucene.Net/Index/DocumentsWriterPerThreadPool.cs index 396c9b1..0a0bf59 100644 --- a/src/Lucene.Net/Index/DocumentsWriterPerThreadPool.cs +++ b/src/Lucene.Net/Index/DocumentsWriterPerThreadPool.cs @@ -36,7 +36,7 @@ namespace Lucene.Net.Index /// is reusing the flushing <see cref="DocumentsWriterPerThread"/>s <see cref="ThreadState"/> with a /// new <see cref="DocumentsWriterPerThread"/> instance. /// </summary> - internal abstract class DocumentsWriterPerThreadPool + internal abstract class DocumentsWriterPerThreadPool : ICloneable { /// <summary> /// <see cref="ThreadState"/> references and guards a http://git-wip-us.apache.org/repos/asf/lucenenet/blob/32849301/src/Lucene.Net/Index/FlushPolicy.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Index/FlushPolicy.cs b/src/Lucene.Net/Index/FlushPolicy.cs index 3a44009..1f9004d 100644 --- a/src/Lucene.Net/Index/FlushPolicy.cs +++ b/src/Lucene.Net/Index/FlushPolicy.cs @@ -1,3 +1,4 @@ +using System; using System.Collections.Generic; using System.Diagnostics; @@ -51,7 +52,7 @@ namespace Lucene.Net.Index /// <seealso cref="DocumentsWriterFlushControl"/> /// <seealso cref="DocumentsWriterPerThread"/> /// <seealso cref="IndexWriterConfig.FlushPolicy"/> - internal abstract class FlushPolicy + internal abstract class FlushPolicy : ICloneable { protected LiveIndexWriterConfig m_indexWriterConfig; protected InfoStream m_infoStream; http://git-wip-us.apache.org/repos/asf/lucenenet/blob/32849301/src/Lucene.Net/Index/IMergeScheduler.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Index/IMergeScheduler.cs b/src/Lucene.Net/Index/IMergeScheduler.cs index 69dfca0..0d2d384 100644 --- a/src/Lucene.Net/Index/IMergeScheduler.cs +++ b/src/Lucene.Net/Index/IMergeScheduler.cs @@ -20,10 +20,8 @@ namespace Lucene.Net.Index */ // LUCENENET specific - public interface IMergeScheduler : IDisposable + public interface IMergeScheduler : ICloneable, IDisposable { void Merge(IndexWriter writer, MergeTrigger trigger, bool newMergesFound); - - IMergeScheduler Clone(); } } http://git-wip-us.apache.org/repos/asf/lucenenet/blob/32849301/src/Lucene.Net/Index/IndexDeletionPolicy.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Index/IndexDeletionPolicy.cs b/src/Lucene.Net/Index/IndexDeletionPolicy.cs index b6d1044..a416cc8 100644 --- a/src/Lucene.Net/Index/IndexDeletionPolicy.cs +++ b/src/Lucene.Net/Index/IndexDeletionPolicy.cs @@ -52,7 +52,7 @@ namespace Lucene.Net.Index /// or <see cref="Store.Directory"/> instance.</para> /// </summary> - public abstract class IndexDeletionPolicy + public abstract class IndexDeletionPolicy : ICloneable { /// <summary> /// Sole constructor, typically called by sub-classes constructors. </summary> http://git-wip-us.apache.org/repos/asf/lucenenet/blob/32849301/src/Lucene.Net/Index/IndexWriterConfig.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Index/IndexWriterConfig.cs b/src/Lucene.Net/Index/IndexWriterConfig.cs index 953b6fd..26dfd8e 100644 --- a/src/Lucene.Net/Index/IndexWriterConfig.cs +++ b/src/Lucene.Net/Index/IndexWriterConfig.cs @@ -66,7 +66,7 @@ namespace Lucene.Net.Index #if FEATURE_SERIALIZABLE [Serializable] #endif - public sealed class IndexWriterConfig : LiveIndexWriterConfig + public sealed class IndexWriterConfig : LiveIndexWriterConfig, ICloneable { // LUCENENET specific: De-nested OpenMode enum from this class to prevent naming conflict @@ -196,7 +196,7 @@ namespace Lucene.Net.Index // such as line numbers, message throughput, ... clone.infoStream = (InfoStream)infoStream.Clone(); clone.mergePolicy = (MergePolicy)mergePolicy.Clone(); - clone.mergeScheduler = mergeScheduler.Clone(); + clone.mergeScheduler = (IMergeScheduler)mergeScheduler.Clone(); return clone; http://git-wip-us.apache.org/repos/asf/lucenenet/blob/32849301/src/Lucene.Net/Index/MergePolicy.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Index/MergePolicy.cs b/src/Lucene.Net/Index/MergePolicy.cs index 66c07f0..f40f264 100644 --- a/src/Lucene.Net/Index/MergePolicy.cs +++ b/src/Lucene.Net/Index/MergePolicy.cs @@ -62,7 +62,7 @@ namespace Lucene.Net.Index /// /// @lucene.experimental /// </summary> - public abstract class MergePolicy : IDisposable + public abstract class MergePolicy : ICloneable, IDisposable { /// <summary> /// A map of doc IDs. </summary> http://git-wip-us.apache.org/repos/asf/lucenenet/blob/32849301/src/Lucene.Net/Index/MergeScheduler.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Index/MergeScheduler.cs b/src/Lucene.Net/Index/MergeScheduler.cs index 2a87084..8e45028 100644 --- a/src/Lucene.Net/Index/MergeScheduler.cs +++ b/src/Lucene.Net/Index/MergeScheduler.cs @@ -29,7 +29,7 @@ namespace Lucene.Net.Index /// instance.</para> /// @lucene.experimental /// </summary> - public abstract class MergeScheduler : IDisposable, IMergeScheduler + public abstract class MergeScheduler : ICloneable, IDisposable, IMergeScheduler { /// <summary> /// Sole constructor. (For invocation by subclass @@ -59,7 +59,7 @@ namespace Lucene.Net.Index /// Dispose this MergeScheduler. </summary> protected abstract void Dispose(bool disposing); - public virtual IMergeScheduler Clone() + public virtual object Clone() { return (MergeScheduler)base.MemberwiseClone(); } http://git-wip-us.apache.org/repos/asf/lucenenet/blob/32849301/src/Lucene.Net/Index/NoMergeScheduler.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Index/NoMergeScheduler.cs b/src/Lucene.Net/Index/NoMergeScheduler.cs index 5ecdcc5..29c7b37 100644 --- a/src/Lucene.Net/Index/NoMergeScheduler.cs +++ b/src/Lucene.Net/Index/NoMergeScheduler.cs @@ -46,7 +46,7 @@ namespace Lucene.Net.Index { } - public override IMergeScheduler Clone() + public override object Clone() { return this; } http://git-wip-us.apache.org/repos/asf/lucenenet/blob/32849301/src/Lucene.Net/Index/SegmentInfos.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Index/SegmentInfos.cs b/src/Lucene.Net/Index/SegmentInfos.cs index 64ee3a0..6b5de9b 100644 --- a/src/Lucene.Net/Index/SegmentInfos.cs +++ b/src/Lucene.Net/Index/SegmentInfos.cs @@ -110,7 +110,7 @@ namespace Lucene.Net.Index /// @lucene.experimental /// </summary> - public sealed class SegmentInfos : IEnumerable<SegmentCommitInfo> + public sealed class SegmentInfos : ICloneable, IEnumerable<SegmentCommitInfo> { /// <summary> /// The file format version for the segments_N codec header, up to 4.5. </summary> http://git-wip-us.apache.org/repos/asf/lucenenet/blob/32849301/src/Lucene.Net/Index/TaskMergeScheduler.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Index/TaskMergeScheduler.cs b/src/Lucene.Net/Index/TaskMergeScheduler.cs index 48733f4..62ea4fc 100644 --- a/src/Lucene.Net/Index/TaskMergeScheduler.cs +++ b/src/Lucene.Net/Index/TaskMergeScheduler.cs @@ -410,7 +410,7 @@ namespace Lucene.Net.Index return sb.ToString(); } - public override IMergeScheduler Clone() + public override object Clone() { TaskMergeScheduler clone = (TaskMergeScheduler)base.Clone(); clone._writer = null; http://git-wip-us.apache.org/repos/asf/lucenenet/blob/32849301/src/Lucene.Net/Index/TermState.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Index/TermState.cs b/src/Lucene.Net/Index/TermState.cs index 3648fb4..5a52492 100644 --- a/src/Lucene.Net/Index/TermState.cs +++ b/src/Lucene.Net/Index/TermState.cs @@ -27,7 +27,7 @@ namespace Lucene.Net.Index /// </summary> /// <seealso cref="TermsEnum.SeekExact(Lucene.Net.Util.BytesRef, TermState)"/> /// <seealso cref="TermsEnum.GetTermState()"/> - public abstract class TermState + public abstract class TermState : ICloneable { /// <summary> /// Sole constructor. (For invocation by subclass http://git-wip-us.apache.org/repos/asf/lucenenet/blob/32849301/src/Lucene.Net/Search/Query.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Search/Query.cs b/src/Lucene.Net/Search/Query.cs index 14a8db3..38912a4 100644 --- a/src/Lucene.Net/Search/Query.cs +++ b/src/Lucene.Net/Search/Query.cs @@ -48,7 +48,7 @@ namespace Lucene.Net.Search #if FEATURE_SERIALIZABLE [Serializable] #endif - public abstract class Query + public abstract class Query : ICloneable { // LUCENENET NOTE: We can't set the default boost in the constructor because the // Boost property can be overridden by subclasses (and possibly throw exceptions). http://git-wip-us.apache.org/repos/asf/lucenenet/blob/32849301/src/Lucene.Net/Search/Spans/SpanNearQuery.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Search/Spans/SpanNearQuery.cs b/src/Lucene.Net/Search/Spans/SpanNearQuery.cs index ca47212..e46f1cb 100644 --- a/src/Lucene.Net/Search/Spans/SpanNearQuery.cs +++ b/src/Lucene.Net/Search/Spans/SpanNearQuery.cs @@ -35,7 +35,7 @@ namespace Lucene.Net.Search.Spans /// maximum number of intervening unmatched positions, as well as whether /// matches are required to be in-order. /// </summary> - public class SpanNearQuery : SpanQuery + public class SpanNearQuery : SpanQuery, ICloneable { protected readonly IList<SpanQuery> m_clauses; protected int m_slop; http://git-wip-us.apache.org/repos/asf/lucenenet/blob/32849301/src/Lucene.Net/Search/Spans/SpanNotQuery.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Search/Spans/SpanNotQuery.cs b/src/Lucene.Net/Search/Spans/SpanNotQuery.cs index 50395ff..60f6df9 100644 --- a/src/Lucene.Net/Search/Spans/SpanNotQuery.cs +++ b/src/Lucene.Net/Search/Spans/SpanNotQuery.cs @@ -33,7 +33,7 @@ namespace Lucene.Net.Search.Spans /// Removes matches which overlap with another <see cref="SpanQuery"/> or /// within a x tokens before or y tokens after another <see cref="SpanQuery"/>. /// </summary> - public class SpanNotQuery : SpanQuery + public class SpanNotQuery : SpanQuery, ICloneable { private SpanQuery include; private SpanQuery exclude; http://git-wip-us.apache.org/repos/asf/lucenenet/blob/32849301/src/Lucene.Net/Search/Spans/SpanOrQuery.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Search/Spans/SpanOrQuery.cs b/src/Lucene.Net/Search/Spans/SpanOrQuery.cs index fe2329b..262faf9 100644 --- a/src/Lucene.Net/Search/Spans/SpanOrQuery.cs +++ b/src/Lucene.Net/Search/Spans/SpanOrQuery.cs @@ -32,7 +32,7 @@ namespace Lucene.Net.Search.Spans /// <summary> /// Matches the union of its clauses. </summary> - public class SpanOrQuery : SpanQuery + public class SpanOrQuery : SpanQuery, ICloneable { private readonly EquatableList<SpanQuery> clauses; private string field; http://git-wip-us.apache.org/repos/asf/lucenenet/blob/32849301/src/Lucene.Net/Search/Spans/SpanPositionCheckQuery.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Search/Spans/SpanPositionCheckQuery.cs b/src/Lucene.Net/Search/Spans/SpanPositionCheckQuery.cs index 24680ec..aa24e5f 100644 --- a/src/Lucene.Net/Search/Spans/SpanPositionCheckQuery.cs +++ b/src/Lucene.Net/Search/Spans/SpanPositionCheckQuery.cs @@ -1,3 +1,4 @@ +using System; using System.Collections.Generic; namespace Lucene.Net.Search.Spans @@ -28,7 +29,7 @@ namespace Lucene.Net.Search.Spans /// <summary> /// Base class for filtering a <see cref="SpanQuery"/> based on the position of a match. /// </summary> - public abstract class SpanPositionCheckQuery : SpanQuery + public abstract class SpanPositionCheckQuery : SpanQuery, ICloneable { protected SpanQuery m_match; http://git-wip-us.apache.org/repos/asf/lucenenet/blob/32849301/src/Lucene.Net/Store/DataInput.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Store/DataInput.cs b/src/Lucene.Net/Store/DataInput.cs index 7b1be2a..33e16a8 100644 --- a/src/Lucene.Net/Store/DataInput.cs +++ b/src/Lucene.Net/Store/DataInput.cs @@ -34,7 +34,7 @@ namespace Lucene.Net.Store /// returning a new <see cref="DataInput"/> which operates on the same underlying /// resource, but positioned independently. /// </summary> - public abstract class DataInput + public abstract class DataInput : ICloneable { private const int SKIP_BUFFER_SIZE = 1024; http://git-wip-us.apache.org/repos/asf/lucenenet/blob/32849301/src/Lucene.Net/Store/IndexInput.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Store/IndexInput.cs b/src/Lucene.Net/Store/IndexInput.cs index ac7b43f..9c2c09f 100644 --- a/src/Lucene.Net/Store/IndexInput.cs +++ b/src/Lucene.Net/Store/IndexInput.cs @@ -34,7 +34,7 @@ namespace Lucene.Net.Store /// <see cref="ObjectDisposedException"/> when the original one is closed. /// </summary> /// <seealso cref="Directory"/> - public abstract class IndexInput : DataInput, IDisposable + public abstract class IndexInput : DataInput, ICloneable, IDisposable { private readonly string resourceDescription; http://git-wip-us.apache.org/repos/asf/lucenenet/blob/32849301/src/Lucene.Net/Store/RAMInputStream.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Store/RAMInputStream.cs b/src/Lucene.Net/Store/RAMInputStream.cs index 525d1a8..7d919be 100644 --- a/src/Lucene.Net/Store/RAMInputStream.cs +++ b/src/Lucene.Net/Store/RAMInputStream.cs @@ -1,3 +1,4 @@ +using System; using System.IO; namespace Lucene.Net.Store @@ -24,7 +25,7 @@ namespace Lucene.Net.Store /// <para/> /// @lucene.internal /// </summary> - public class RAMInputStream : IndexInput + public class RAMInputStream : IndexInput, ICloneable { internal const int BUFFER_SIZE = RAMOutputStream.BUFFER_SIZE; http://git-wip-us.apache.org/repos/asf/lucenenet/blob/32849301/src/Lucene.Net/Support/Compatibility/ICloneable.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Support/Compatibility/ICloneable.cs b/src/Lucene.Net/Support/Compatibility/ICloneable.cs new file mode 100644 index 0000000..64ed1fe --- /dev/null +++ b/src/Lucene.Net/Support/Compatibility/ICloneable.cs @@ -0,0 +1,26 @@ +namespace System +{ + /* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file 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 KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#if !FEATURE_CLONEABLE + public interface ICloneable + { + object Clone(); + } +#endif +} http://git-wip-us.apache.org/repos/asf/lucenenet/blob/32849301/src/Lucene.Net/Support/EquatableList.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Support/EquatableList.cs b/src/Lucene.Net/Support/EquatableList.cs index 1cd0208..a503fae 100644 --- a/src/Lucene.Net/Support/EquatableList.cs +++ b/src/Lucene.Net/Support/EquatableList.cs @@ -33,10 +33,7 @@ namespace Lucene.Net.Support #if FEATURE_SERIALIZABLE [Serializable] #endif - public class EquatableList<T> : IList<T>, IEquatable<IList<T>> -#if FEATURE_CLONEABLE - , ICloneable -#endif + public class EquatableList<T> : IList<T>, IEquatable<IList<T>>, ICloneable { private readonly IList<T> list; http://git-wip-us.apache.org/repos/asf/lucenenet/blob/32849301/src/Lucene.Net/Support/EquatableSet.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Support/EquatableSet.cs b/src/Lucene.Net/Support/EquatableSet.cs index 5606695..222e1e9 100644 --- a/src/Lucene.Net/Support/EquatableSet.cs +++ b/src/Lucene.Net/Support/EquatableSet.cs @@ -33,10 +33,7 @@ namespace Lucene.Net.Support #if FEATURE_SERIALIZABLE [Serializable] #endif - public class EquatableSet<T> : ISet<T>, IEquatable<ISet<T>> -#if FEATURE_CLONEABLE - , ICloneable -#endif + public class EquatableSet<T> : ISet<T>, IEquatable<ISet<T>>, ICloneable { private readonly ISet<T> set; http://git-wip-us.apache.org/repos/asf/lucenenet/blob/32849301/src/Lucene.Net/Util/AttributeImpl.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Util/AttributeImpl.cs b/src/Lucene.Net/Util/AttributeImpl.cs index 72fcdc2..5da5636 100644 --- a/src/Lucene.Net/Util/AttributeImpl.cs +++ b/src/Lucene.Net/Util/AttributeImpl.cs @@ -29,10 +29,7 @@ namespace Lucene.Net.Util /// Attributes are used to add data in a dynamic, yet type-safe way to a source /// of usually streamed objects, e. g. a <see cref="Lucene.Net.Analysis.TokenStream" />. /// </summary> - public abstract class Attribute : IAttribute -#if FEATURE_CLONEABLE - , ICloneable -#endif + public abstract class Attribute : IAttribute, ICloneable { /// <summary> Clears the values in this <see cref="Attribute"/> and resets it to its /// default value. If this implementation implements more than one <see cref="Attribute"/> interface http://git-wip-us.apache.org/repos/asf/lucenenet/blob/32849301/src/Lucene.Net/Util/AttributeSource.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Util/AttributeSource.cs b/src/Lucene.Net/Util/AttributeSource.cs index 1df05e8..98477a1 100644 --- a/src/Lucene.Net/Util/AttributeSource.cs +++ b/src/Lucene.Net/Util/AttributeSource.cs @@ -101,7 +101,7 @@ namespace Lucene.Net.Util /// This class holds the state of an <see cref="AttributeSource"/>. </summary> /// <seealso cref="CaptureState()"/> /// <seealso cref="RestoreState(State)"/> - public sealed class State + public sealed class State : ICloneable { internal Attribute attribute; internal State next; http://git-wip-us.apache.org/repos/asf/lucenenet/blob/32849301/src/Lucene.Net/Util/Automaton/Automaton.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Util/Automaton/Automaton.cs b/src/Lucene.Net/Util/Automaton/Automaton.cs index 497fd97..e475924 100644 --- a/src/Lucene.Net/Util/Automaton/Automaton.cs +++ b/src/Lucene.Net/Util/Automaton/Automaton.cs @@ -70,7 +70,7 @@ namespace Lucene.Net.Util.Automaton /// </para> /// @lucene.experimental /// </summary> - public class Automaton + public class Automaton : ICloneable { /// <summary> /// Minimize using Hopcroft's O(n log n) algorithm. this is regarded as one of http://git-wip-us.apache.org/repos/asf/lucenenet/blob/32849301/src/Lucene.Net/Util/Automaton/Transition.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Util/Automaton/Transition.cs b/src/Lucene.Net/Util/Automaton/Transition.cs index 545deb5..54f820c 100644 --- a/src/Lucene.Net/Util/Automaton/Transition.cs +++ b/src/Lucene.Net/Util/Automaton/Transition.cs @@ -1,4 +1,5 @@ using Lucene.Net.Support; +using System; using System.Collections.Generic; using System.Diagnostics; using System.Text; @@ -42,7 +43,7 @@ namespace Lucene.Net.Util.Automaton /// <para/> /// @lucene.experimental /// </summary> - public class Transition + public class Transition : ICloneable { /* * CLASS INVARIANT: min<=max http://git-wip-us.apache.org/repos/asf/lucenenet/blob/32849301/src/Lucene.Net/Util/BytesRef.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Util/BytesRef.cs b/src/Lucene.Net/Util/BytesRef.cs index 624bda5..c327a4d 100644 --- a/src/Lucene.Net/Util/BytesRef.cs +++ b/src/Lucene.Net/Util/BytesRef.cs @@ -39,7 +39,7 @@ namespace Lucene.Net.Util #if FEATURE_SERIALIZABLE [Serializable] #endif - public sealed class BytesRef : IComparable<BytesRef>, IComparable // LUCENENET specific - implemented IComparable for FieldComparator + public sealed class BytesRef : IComparable<BytesRef>, IComparable, ICloneable // LUCENENET specific - implemented IComparable for FieldComparator { /// <summary> /// An empty byte array for convenience </summary> http://git-wip-us.apache.org/repos/asf/lucenenet/blob/32849301/src/Lucene.Net/Util/CharsRef.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Util/CharsRef.cs b/src/Lucene.Net/Util/CharsRef.cs index 432d53f..51e1228 100644 --- a/src/Lucene.Net/Util/CharsRef.cs +++ b/src/Lucene.Net/Util/CharsRef.cs @@ -33,7 +33,7 @@ namespace Lucene.Net.Util #if FEATURE_SERIALIZABLE [Serializable] #endif - public sealed class CharsRef : IComparable<CharsRef>, ICharSequence + public sealed class CharsRef : IComparable<CharsRef>, ICharSequence, ICloneable { /// <summary> /// An empty character array for convenience </summary> http://git-wip-us.apache.org/repos/asf/lucenenet/blob/32849301/src/Lucene.Net/Util/InfoStream.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Util/InfoStream.cs b/src/Lucene.Net/Util/InfoStream.cs index da90d24..7794fe8 100644 --- a/src/Lucene.Net/Util/InfoStream.cs +++ b/src/Lucene.Net/Util/InfoStream.cs @@ -29,7 +29,7 @@ namespace Lucene.Net.Util /// </para> /// @lucene.internal /// </summary> - public abstract class InfoStream : IDisposable + public abstract class InfoStream : ICloneable, IDisposable { /// <summary> /// Instance of <see cref="InfoStream"/> that does no logging at all. </summary> http://git-wip-us.apache.org/repos/asf/lucenenet/blob/32849301/src/Lucene.Net/Util/IntsRef.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Util/IntsRef.cs b/src/Lucene.Net/Util/IntsRef.cs index 9a37b34..d13dc9b 100644 --- a/src/Lucene.Net/Util/IntsRef.cs +++ b/src/Lucene.Net/Util/IntsRef.cs @@ -35,7 +35,7 @@ namespace Lucene.Net.Util #if FEATURE_SERIALIZABLE [Serializable] #endif - public sealed class Int32sRef : IComparable<Int32sRef> + public sealed class Int32sRef : IComparable<Int32sRef>, ICloneable { /// <summary> /// An empty integer array for convenience. http://git-wip-us.apache.org/repos/asf/lucenenet/blob/32849301/src/Lucene.Net/Util/LongsRef.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Util/LongsRef.cs b/src/Lucene.Net/Util/LongsRef.cs index f5a0c4f..6bce847 100644 --- a/src/Lucene.Net/Util/LongsRef.cs +++ b/src/Lucene.Net/Util/LongsRef.cs @@ -35,7 +35,7 @@ namespace Lucene.Net.Util #if FEATURE_SERIALIZABLE [Serializable] #endif - public sealed class Int64sRef : IComparable<Int64sRef> + public sealed class Int64sRef : IComparable<Int64sRef>, ICloneable { /// <summary> /// An empty <see cref="long"/> array for convenience http://git-wip-us.apache.org/repos/asf/lucenenet/blob/32849301/src/Lucene.Net/Util/OpenBitSet.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Util/OpenBitSet.cs b/src/Lucene.Net/Util/OpenBitSet.cs index 9c1bad3..cd6276d 100644 --- a/src/Lucene.Net/Util/OpenBitSet.cs +++ b/src/Lucene.Net/Util/OpenBitSet.cs @@ -77,7 +77,7 @@ namespace Lucene.Net.Util /// </item> /// </list> /// </summary> - public class OpenBitSet : DocIdSet, IBits + public class OpenBitSet : DocIdSet, IBits, ICloneable { protected internal long[] m_bits; protected internal int m_wlen; // number of words (elements) used in the array http://git-wip-us.apache.org/repos/asf/lucenenet/blob/32849301/src/Lucene.Net/Util/SetOnce.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Util/SetOnce.cs b/src/Lucene.Net/Util/SetOnce.cs index d05cf63..b716087 100644 --- a/src/Lucene.Net/Util/SetOnce.cs +++ b/src/Lucene.Net/Util/SetOnce.cs @@ -32,7 +32,8 @@ namespace Lucene.Net.Util /// <para/> /// @lucene.experimental /// </summary> - public sealed class SetOnce<T> where T : class // LUCENENET specific - added class constraint so we don't accept value types (which cannot be volatile) + public sealed class SetOnce<T> : ICloneable + where T : class // LUCENENET specific - added class constraint so we don't accept value types (which cannot be volatile) { private volatile T obj = default(T); private readonly AtomicBoolean set; http://git-wip-us.apache.org/repos/asf/lucenenet/blob/32849301/src/dotnet/Lucene.Net.ICU/Lucene.Net.ICU.csproj ---------------------------------------------------------------------- diff --git a/src/dotnet/Lucene.Net.ICU/Lucene.Net.ICU.csproj b/src/dotnet/Lucene.Net.ICU/Lucene.Net.ICU.csproj index 813782d..958a504 100644 --- a/src/dotnet/Lucene.Net.ICU/Lucene.Net.ICU.csproj +++ b/src/dotnet/Lucene.Net.ICU/Lucene.Net.ICU.csproj @@ -24,7 +24,7 @@ <Import Project="..\..\..\Version.proj" /> <PropertyGroup> - <TargetFrameworks>netstandard2.0;netstandard1.5;net451</TargetFrameworks> + <TargetFrameworks>netstandard1.5;net451</TargetFrameworks> <PackageTargetFallback Condition=" '$(TargetFramework)' == 'netstandard1.5' ">$(PackageTargetFallback);dnxcore50</PackageTargetFallback> <!--<NetStandardImplicitPackageVersion Condition=" '$(TargetFramework)' == 'netstandard1.5' ">1.6.0</NetStandardImplicitPackageVersion>--> @@ -82,10 +82,10 @@ <PackageReference Include="icu.net" Version="54.1.1-alpha" /> </ItemGroup> - <PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' "> + <!--<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' "> <DefineConstants>$(DefineConstants);NETSTANDARD</DefineConstants> <DebugType>portable</DebugType> - </PropertyGroup> + </PropertyGroup>--> <ItemGroup Condition=" '$(TargetFramework)' == 'netstandard1.5' "> <PackageReference Include="System.Globalization" Version="4.3.0" /> http://git-wip-us.apache.org/repos/asf/lucenenet/blob/32849301/src/dotnet/Lucene.Net.ICU/Support/BreakIterator.cs ---------------------------------------------------------------------- diff --git a/src/dotnet/Lucene.Net.ICU/Support/BreakIterator.cs b/src/dotnet/Lucene.Net.ICU/Support/BreakIterator.cs index df4a945..1ffbcc5 100644 --- a/src/dotnet/Lucene.Net.ICU/Support/BreakIterator.cs +++ b/src/dotnet/Lucene.Net.ICU/Support/BreakIterator.cs @@ -26,10 +26,7 @@ namespace Lucene.Net.Support /// maintain a current position and scan over text /// returning the index of characters where boundaries occur. /// </summary> - public abstract class BreakIterator -#if FEATURE_CLONEABLE - : ICloneable -#endif + public abstract class BreakIterator : ICloneable { /// <summary> /// Constructor. BreakIterator is stateless and has no default behavior.
