Commit Graph

388 Commits

Author SHA1 Message Date
Robert Muir 2971f311a2
LUCENE-9911: enable ecjLint unusedExceptionParameter (#70)
Fails the linter if an exception is swallowed (e.g. variable completely
unused).

If this is intentional for some reason, the exception can simply by
annotated with @SuppressWarnings("unused").
2021-04-08 08:19:01 -04:00
Dawid Weiss 2662a74cab Correct some of the jdk17-offending javadocs. 2021-04-05 20:34:52 +02:00
Ignacio Vera 8c9b9546cc
LUCENE-9705: Create Lucene90PointsFormat (#52) 2021-04-01 07:04:04 +02:00
Dawid Weiss fd685682be This removes the last of ant-compatibility hacks - cross-project dependency on test classes. Replaced with gradle's test fixture artifact sharing. Cleaned up spatial3d classes a bit too. 2021-03-30 12:35:33 +02:00
Robert Muir 3596e05e5c
LUCENE-9878: enable redundantNullCheck in ecjLint (#44)
Detects common cases of unreachable/dead code.

For generated javacc code, the check is disabled via
SuppressWarnings("unused") because javacc generates strange/bad code such as:

  if ("" == null)

For TestStressNRTReplication's startNode() method, the check is also
disabled because analysis folds the "test evilness controls" which are
static final constants. This itself is a WTF, shouldn't we instead
randomize these evil things in our tests rather than hardcoding them to
specific values?
2021-03-27 11:43:47 -04:00
zacharymorn 3ed87c867a
LUCENE-9864: Enforce @Override annotation everywhere (#40)
Requiring the annotation is helpful because if an abstract method is removed, the concrete methods will then show up as compile errors: preventing dead code from being accidentally left behind.

Co-authored-by: Robert Muir <rmuir@apache.org>
2021-03-25 17:50:38 -04:00
Uwe Schindler 3214e365e3
LUCENE-9856: Static analysis take 3: Remove redundant interfaces (#38)
Co-authored-by: Robert Muir <rmuir@apache.org>
2021-03-24 18:26:12 +01:00
Robert Muir 945b1cb872
LUCENE-9856: fail precommit on unused local variables, take two (#37)
Enable ecj unused local variable, private instance and method detection. Allow SuppressWarnings("unused") to disable unused checks (e.g. for generated code or very special tests). Fix gradlew regenerate for python 3.9 SuppressWarnings("unused") for generated javacc and jflex code. Enable a few other easy ecj checks such as Deprecated annotation, hashcode/equals, equals across different types.

Co-authored-by: Mike McCandless <mikemccand@apache.org>
2021-03-23 13:59:00 -04:00
Robert Muir e6c4956cf6
Revert "LUCENE-9856: fail precommit on unused local variables (#34)"
This reverts commit 20dba278bb.
2021-03-23 12:46:36 -04:00
Robert Muir 20dba278bb
LUCENE-9856: fail precommit on unused local variables (#34)
Enable ecj unused local variable, private instance and method detection. Allow SuppressWarnings("unused") to disable unused checks (e.g. for generated code or very special tests). Fix gradlew regenerate for python 3.9 SuppressWarnings("unused") for generated javacc and jflex code. Enable a few other easy ecj checks such as Deprecated annotation, hashcode/equals, equals across different types.

Co-authored-by: Mike McCandless <mikemccand@apache.org>
2021-03-23 11:09:24 -04:00
Dawid Weiss 2cbf261032 LUCENE-9570: code reformatting [final]. 2021-01-05 13:44:05 +01:00
Marcus 57729c9aca
LUCENE-8626: Standardize Lucene Test Files (#2026) 2020-10-30 13:34:55 +07:00
Mike Drob a46316e156
Clean up many small fixes (#1732)
* Abstract classes don't need public constructors since they can only be
  called by subclasses
* Don't escape html characters in @code tags in javadoc
* Fixed a few int/long arithmetic
* Use explicit Term.toString instead of implicit byte[].toString
* Javadoc typos
* Consistent capitalization for field and parameter names
2020-09-08 10:27:53 -05:00
Erick Erickson 69fa5a00fb LUCENE-9433: Remove Ant support from trunk 2020-08-28 09:31:16 -04:00
Erick Erickson c9c75810c2 Revert "LUCENE-9433: Remove Ant support from trunk"
This reverts commit 37cd17dc
2020-08-21 16:57:58 -04:00
Erick Erickson 37cd17dcf5 LUCENE-9433: Remove Ant support from trunk 2020-08-21 15:19:52 -04:00
Adrien Grand 54c5dd7d6d
LUCENE-9148: Move the BKD index to its own file. (#1475) 2020-06-09 09:59:14 +02:00
Uwe Schindler 06df50e759
LUCENE-9321: Port markdown task to Gradle (#1477) 2020-05-17 14:46:26 +02:00
Ignacio Vera 03c2557681
LUCENE-9263: Fix wrong transformation of distance in meters to radians in Geo3DPoint (#1318) 2020-03-09 17:07:55 +01:00
Nicholas Knize a6e80d004d LUCENE-9150: Restore support for dynamic PlanetModel in spatial3d 2020-03-02 16:06:17 -06:00
Robert Muir 975df9ddd3
LUCENE-9182: add apache license headers to all .gradle files and enforce in rat task 2020-01-27 12:05:34 -05:00
Robert Muir c53cc3edaf
LUCENE-9167: test speedup for slowest/pathological tests (round 3) 2020-01-24 08:58:59 -05:00
Robert Muir 1051db4038
LUCENE-9163: test speedup for slowest/pathological tests
Calming down individual test methods with double-digit execution times
after running tests many times.

There are a few more issues remaining, but this solves the majority of them.
2020-01-22 17:49:33 -05:00
Dawid Weiss d4a9842375 Initial gradle build layer. 2019-12-02 15:34:57 +01:00
Adrien Grand 7755cdf03f
LUCENE-9027: Use SIMD instructions to decode postings. (#973) 2019-11-18 19:08:32 +01:00
Adrien Grand c1ac146454 LUCENE-9029: Deprecate SloppyMath toRadians/toDegrees in favor of Java Math 2019-11-13 18:31:38 +01:00
Koen De Groote 04786244d0 LUCENE-8979: Code Cleanup: Use entryset for map iteration wherever possible. - part 2 2019-10-14 18:36:19 +02:00
Andrzej Bialecki a76c962ee6 LUCENE-8855: Add Accountable to some Query implementations. 2019-06-26 15:26:54 +02:00
Koen De Groote 67104dd615 LUCENE-8847: Code Cleanup: Rewrite StringBuilder.append with concatted strings (#707)
This specific commit affects all points in the casebase where the argument of a StringBuilder.append() call is itself a regular String concatenation.
This defeats the purpose of using StringBuilder and also introduces an extra alloction.
These changes should avoid that.

ant tests have run, succeeded on local machine.

Removing test files from the changes.

Another suggested rework.
2019-06-10 18:07:43 +02:00
Uwe Schindler faaee86efb LUCENE-8738: Move to Java 11 as minimum Java version (merged branch: jira/LUCENE-8738)
Co-authored-by: Adrien Grand <jpountz@apache.org>
2019-04-16 14:00:09 +02:00
Alan Woodward fbd05167f4
LUCENE-3041: QueryVisitor (#581)
This commit adds an introspection API to Query, allowing users to traverse
the nested structure of a query and examine its leaves.  It replaces the existing
`extractTerms` method on Weight, and alters some highlighting code to use
the new API
2019-03-14 15:04:33 +00:00
Karl Wright ff799ac03d LUCENE-8696: Rework how endpoint circles are represented to allow for consistency on WGS84. 2019-02-27 02:28:33 -05:00
Karl Wright 149469ddbc LUCENE-8696: Refactor, in preparation for creating a new SegmentEndpoint implementation to fix the problem. 2019-02-26 08:46:17 -05:00
Karl Wright 8c34da8a62 LUCENE-8696: Fix precommit objections 2019-02-25 09:46:53 -05:00
Karl Wright 9bf2c8cb93 LUCENE-8696: Update test to be what's actually failing 2019-02-25 04:05:56 -05:00
Karl Wright 3754959797 OSQ-8696: Come up with a simple test case that exercises the random failure 2019-02-25 03:33:35 -05:00
Karl Wright 2edf5adedc LUCENE-8587: Fix the equals method of GeoComplexPolygon 2018-12-11 13:48:34 -05:00
Karl Wright da62c73282 LUCENE-8587: Change GeoPoint serialization to make serialization/unserialization non-lossy 2018-12-11 09:30:01 -05:00
Christophe Bismuth b4449c73e4 LUCENE-8464: ConstantScoreScorer now implements setMinCompetitveScore in order to early terminate the iterator if the minimum score is greater than the constant score.
Signed-off-by: Jim Ferenczi <jimczi@apache.org>
2018-11-16 15:14:11 +01:00
Erick Erickson 763e64260f SOLR-12881: Remove unneeded import statements 2018-11-14 17:48:15 -08:00
iverase 07b93a97f0 LUCENE-8540: Better handling of min/max values for Geo3d encoding 2018-11-02 07:19:13 +01:00
Karl Wright 63fcf2edca LUCENE-8512: Remove second test point since no longer needed, and confirm rigorously that first test point is not on an edge. 2018-09-23 06:45:26 -04:00
Karl Wright af2de93451 LUCENE-8512: Add disabled test for failure. 2018-09-21 03:46:38 -04:00
Alan Woodward 910a0231f6 LUCENE-6228: Add Scorable class and make LeafCollector.setScorer() take Scorable 2018-09-04 11:01:44 +01:00
Dawid Weiss 54f2565038 LUCENE-8469: Inline calls to the deprecated StringHelper.compare, removed StringHelper.compare from master. 2018-08-30 09:59:51 +02:00
Adrien Grand 025350ea12 LUCENE-8461: Add Lucene80Codec. 2018-08-23 10:51:45 +02:00
iverase d6e1d4a4ba LUCENE-8457: turn off more debugging output for test 2018-08-18 18:33:26 +02:00
Karl Wright d8ba1b1661 LUCENE-8457: turn off debugging output for test 2018-08-18 10:53:30 -04:00
Karl Wright 30f64d778a LUCENE-8457: Use backing planes for all potentially narrow GeoBBox shapes. 2018-08-18 10:44:59 -04:00
Karl Wright 9e54e3e9b4 LUCENE-8457: Add disabled unit test demonstrating the problem. 2018-08-17 03:44:20 -04:00