You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Directory.Build.targets: Added global reference to Lucene.Net.CodeAnalysis.Dev to enable development analyzers
* SWEEP: Fixed LuceneDev1001 build warnings
Copy file name to clipboardExpand all lines: Directory.Build.targets
+10Lines changed: 10 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -24,6 +24,12 @@
24
24
25
25
<PropertyGroupLabel="Warnings to be Disabled in Solution">
26
26
<NoWarnLabel="Legacy serialization support APIs are obsolete">$(NoWarn);SYSLIB0051</NoWarn>
27
+
28
+
<!-- These are noisy, but may be helpful during Lucene upgrades or optimization -->
29
+
<NoWarnLabel="Floating point types should not be compared for exact equality">$(NoWarn);LuceneDev1000</NoWarn>
30
+
<NoWarnLabel="Floating point type arithmetic needs to be checked on x86 in .NET Framework and may require extra casting">$(NoWarn);LuceneDev1002</NoWarn>
31
+
<NoWarnLabel="Java array parameters can sometimes be replaced with .NET out or ref parameters">$(NoWarn);LuceneDev1003</NoWarn>
32
+
<NoWarnLabel="Return array may be able to be replaced with out values">$(NoWarn);LuceneDev1004</NoWarn>
27
33
</PropertyGroup>
28
34
29
35
<PropertyGroupLabel="Solution-level Publish to Project-specific Directory">
Copy file name to clipboardExpand all lines: src/Lucene.Net/Index/TieredMergePolicy.cs
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -152,7 +152,7 @@ public virtual double MaxMergedSegmentMB
152
152
{
153
153
if(value<0.0)
154
154
{
155
-
thrownewArgumentOutOfRangeException(nameof(MaxMergedSegmentMB),"maxMergedSegmentMB must be >=0 (got "+value.ToString("0.0")+")");// LUCENENET specific - changed from IllegalArgumentException to ArgumentOutOfRangeException (.NET convention)
155
+
thrownewArgumentOutOfRangeException(nameof(MaxMergedSegmentMB),"maxMergedSegmentMB must be >=0 (got "+J2N.Numerics.Double.ToString(value)+")");// LUCENENET specific - changed from IllegalArgumentException to ArgumentOutOfRangeException (.NET convention)
@@ -175,7 +175,7 @@ public virtual double ReclaimDeletesWeight
175
175
{
176
176
if(value<0.0)
177
177
{
178
-
thrownewArgumentOutOfRangeException(nameof(ReclaimDeletesWeight),"reclaimDeletesWeight must be >= 0.0 (got "+value.ToString("0.0")+")");// LUCENENET specific - changed from IllegalArgumentException to ArgumentOutOfRangeException (.NET convention)
178
+
thrownewArgumentOutOfRangeException(nameof(ReclaimDeletesWeight),"reclaimDeletesWeight must be >= 0.0 (got "+J2N.Numerics.Double.ToString(value)+")");// LUCENENET specific - changed from IllegalArgumentException to ArgumentOutOfRangeException (.NET convention)
179
179
}
180
180
reclaimDeletesWeight=value;
181
181
}
@@ -195,7 +195,7 @@ public virtual double FloorSegmentMB
195
195
{
196
196
if(value<=0.0)
197
197
{
198
-
thrownewArgumentOutOfRangeException(nameof(FloorSegmentMB),"floorSegmentMB must be >= 0.0 (got "+value.ToString("0.0")+")");// LUCENENET specific - changed from IllegalArgumentException to ArgumentOutOfRangeException (.NET convention)
198
+
thrownewArgumentOutOfRangeException(nameof(FloorSegmentMB),"floorSegmentMB must be >= 0.0 (got "+J2N.Numerics.Double.ToString(value)+")");// LUCENENET specific - changed from IllegalArgumentException to ArgumentOutOfRangeException (.NET convention)
@@ -214,7 +214,7 @@ public virtual double ForceMergeDeletesPctAllowed
214
214
{
215
215
if(value<0.0||value>100.0)
216
216
{
217
-
thrownewArgumentOutOfRangeException(nameof(ForceMergeDeletesPctAllowed),"forceMergeDeletesPctAllowed must be between 0.0 and 100.0 inclusive (got "+value.ToString("0.0")+")");// LUCENENET specific - changed from IllegalArgumentException to ArgumentOutOfRangeException (.NET convention)
217
+
thrownewArgumentOutOfRangeException(nameof(ForceMergeDeletesPctAllowed),"forceMergeDeletesPctAllowed must be between 0.0 and 100.0 inclusive (got "+J2N.Numerics.Double.ToString(value)+")");// LUCENENET specific - changed from IllegalArgumentException to ArgumentOutOfRangeException (.NET convention)
218
218
}
219
219
forceMergeDeletesPctAllowed=value;
220
220
}
@@ -237,7 +237,7 @@ public virtual double SegmentsPerTier
237
237
{
238
238
if(value<2.0)
239
239
{
240
-
thrownewArgumentOutOfRangeException(nameof(SegmentsPerTier),"segmentsPerTier must be >= 2.0 (got "+value.ToString("0.0")+")");// LUCENENET specific - changed from IllegalArgumentException to ArgumentOutOfRangeException (.NET convention)
240
+
thrownewArgumentOutOfRangeException(nameof(SegmentsPerTier),"segmentsPerTier must be >= 2.0 (got "+J2N.Numerics.Double.ToString(value)+")");// LUCENENET specific - changed from IllegalArgumentException to ArgumentOutOfRangeException (.NET convention)
0 commit comments