From 902b1b721497f703fed68f8bbb222ad98f99a6db Mon Sep 17 00:00:00 2001 From: Rijn Buve Date: Mon, 19 Apr 2021 10:28:02 +0200 Subject: [PATCH 1/9] Updated copyright --- .idea/.gitignore | 2 -- README.md | 12 ++++++++++-- pom.xml | 6 +++--- src/main/java/com/mapcode/Alphabet.java | 2 +- src/main/java/com/mapcode/Boundary.java | 2 +- src/main/java/com/mapcode/CheckArgs.java | 2 +- src/main/java/com/mapcode/Common.java | 2 +- src/main/java/com/mapcode/Data.java | 2 +- src/main/java/com/mapcode/DataModel.java | 2 +- src/main/java/com/mapcode/Decoder.java | 2 +- src/main/java/com/mapcode/Encoder.java | 2 +- .../com/mapcode/IncorrectDataModelException.java | 2 +- src/main/java/com/mapcode/Mapcode.java | 2 +- src/main/java/com/mapcode/MapcodeCodec.java | 2 +- src/main/java/com/mapcode/MapcodeZone.java | 2 +- src/main/java/com/mapcode/Point.java | 2 +- src/main/java/com/mapcode/Rectangle.java | 2 +- src/main/java/com/mapcode/Territory.java | 9 +++++---- .../java/com/mapcode/UnknownAlphabetException.java | 2 +- .../java/com/mapcode/UnknownDecodeException.java | 2 +- .../java/com/mapcode/UnknownMapcodeException.java | 2 +- .../com/mapcode/UnknownPrecisionFormatException.java | 2 +- .../java/com/mapcode/UnknownTerritoryException.java | 2 +- src/test/java/com/mapcode/AlphabetTest.java | 2 +- src/test/java/com/mapcode/CheckArgsTest.java | 2 +- src/test/java/com/mapcode/DataModelTest.java | 2 +- src/test/java/com/mapcode/DecoderTest.java | 2 +- src/test/java/com/mapcode/EncodeDecodeTest.java | 2 +- src/test/java/com/mapcode/EncoderTest.java | 2 +- src/test/java/com/mapcode/MapcodeTest.java | 2 +- src/test/java/com/mapcode/PointTest.java | 2 +- src/test/java/com/mapcode/ReferenceFileTest.java | 2 +- src/test/java/com/mapcode/TerritoryTest.java | 6 +++--- src/test/resources/log4j.xml | 2 +- src/test/resources/show3d/sketch.properties | 2 +- 35 files changed, 51 insertions(+), 44 deletions(-) delete mode 100644 .idea/.gitignore diff --git a/.idea/.gitignore b/.idea/.gitignore deleted file mode 100644 index 5c98b42..0000000 --- a/.idea/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Default ignored files -/workspace.xml \ No newline at end of file diff --git a/README.md b/README.md index 4ceff96..5bb3cae 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ [![Release](https://img.shields.io/github/release/mapcode-foundation/mapcode-java.svg?maxAge=3600)](https://github.com/mapcode-foundation/mapcode-java/releases) [![Maven Central](https://img.shields.io/maven-central/v/com.mapcode/mapcode.svg?maxAge=3600)](https://maven-badges.herokuapp.com/maven-central/com.mapcode/mapcode) -**Copyright (C) 2014-2019, Stichting Mapcode Foundation (http://www.mapcode.com)** +**Copyright (C) 2014-2021, Stichting Mapcode Foundation (http://www.mapcode.com)** This Java project contains a library to encode latitude/longitude pairs to mapcodes and to decode mapcodes back to latitude/longitude pairs. @@ -477,9 +477,17 @@ Normally, one of our developers should be able to comment on them and fix. # Release Notes -mat + These are the release notes for the Java library for mapcodes. +### 2.4.15 + +* Removed country code ANT (not used for mapcodes) after JDK 1.8. Fixed unit test for that. + +* Updated Maven dependencies for security vulnerabilities. + +* Updated copyrights. + ### 2.4.14 * Updated dependencies for security vulnerabilities. diff --git a/pom.xml b/pom.xml index 82139b9..b87641c 100644 --- a/pom.xml +++ b/pom.xml @@ -1,5 +1,5 @@ 2.8.6 3.0.2 - 4.13 + 4.13.2 1.2.17 1.7.30 diff --git a/src/main/java/com/mapcode/Alphabet.java b/src/main/java/com/mapcode/Alphabet.java index 61492b6..ebdd79d 100644 --- a/src/main/java/com/mapcode/Alphabet.java +++ b/src/main/java/com/mapcode/Alphabet.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016-2020, Stichting Mapcode Foundation (http://www.mapcode.com) + * Copyright (C) 2016-2021, Stichting Mapcode Foundation (http://www.mapcode.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/com/mapcode/Boundary.java b/src/main/java/com/mapcode/Boundary.java index 29c0c35..4e456ee 100644 --- a/src/main/java/com/mapcode/Boundary.java +++ b/src/main/java/com/mapcode/Boundary.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016-2020, Stichting Mapcode Foundation (http://www.mapcode.com) + * Copyright (C) 2016-2021, Stichting Mapcode Foundation (http://www.mapcode.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/com/mapcode/CheckArgs.java b/src/main/java/com/mapcode/CheckArgs.java index 4af6fd7..c6a2e84 100644 --- a/src/main/java/com/mapcode/CheckArgs.java +++ b/src/main/java/com/mapcode/CheckArgs.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016-2020, Stichting Mapcode Foundation (http://www.mapcode.com) + * Copyright (C) 2016-2021, Stichting Mapcode Foundation (http://www.mapcode.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/com/mapcode/Common.java b/src/main/java/com/mapcode/Common.java index 0d23252..499cf45 100644 --- a/src/main/java/com/mapcode/Common.java +++ b/src/main/java/com/mapcode/Common.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016-2020, Stichting Mapcode Foundation (http://www.mapcode.com) + * Copyright (C) 2016-2021, Stichting Mapcode Foundation (http://www.mapcode.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/com/mapcode/Data.java b/src/main/java/com/mapcode/Data.java index 26d4a50..2eb7e37 100644 --- a/src/main/java/com/mapcode/Data.java +++ b/src/main/java/com/mapcode/Data.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016-2020, Stichting Mapcode Foundation (http://www.mapcode.com) + * Copyright (C) 2016-2021, Stichting Mapcode Foundation (http://www.mapcode.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/com/mapcode/DataModel.java b/src/main/java/com/mapcode/DataModel.java index 7c3d5af..72a8543 100644 --- a/src/main/java/com/mapcode/DataModel.java +++ b/src/main/java/com/mapcode/DataModel.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016-2020, Stichting Mapcode Foundation (http://www.mapcode.com) + * Copyright (C) 2016-2021, Stichting Mapcode Foundation (http://www.mapcode.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/com/mapcode/Decoder.java b/src/main/java/com/mapcode/Decoder.java index 6ad8329..195ad2e 100644 --- a/src/main/java/com/mapcode/Decoder.java +++ b/src/main/java/com/mapcode/Decoder.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016-2020, Stichting Mapcode Foundation (http://www.mapcode.com) + * Copyright (C) 2016-2021, Stichting Mapcode Foundation (http://www.mapcode.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/com/mapcode/Encoder.java b/src/main/java/com/mapcode/Encoder.java index b644008..8f2f459 100644 --- a/src/main/java/com/mapcode/Encoder.java +++ b/src/main/java/com/mapcode/Encoder.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016-2020, Stichting Mapcode Foundation (http://www.mapcode.com) + * Copyright (C) 2016-2021, Stichting Mapcode Foundation (http://www.mapcode.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/com/mapcode/IncorrectDataModelException.java b/src/main/java/com/mapcode/IncorrectDataModelException.java index 333daf9..dd7f410 100644 --- a/src/main/java/com/mapcode/IncorrectDataModelException.java +++ b/src/main/java/com/mapcode/IncorrectDataModelException.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016-2020, Stichting Mapcode Foundation (http://www.mapcode.com) + * Copyright (C) 2016-2021, Stichting Mapcode Foundation (http://www.mapcode.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/com/mapcode/Mapcode.java b/src/main/java/com/mapcode/Mapcode.java index a9ad857..e32a310 100644 --- a/src/main/java/com/mapcode/Mapcode.java +++ b/src/main/java/com/mapcode/Mapcode.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016-2020, Stichting Mapcode Foundation (http://www.mapcode.com) + * Copyright (C) 2016-2021, Stichting Mapcode Foundation (http://www.mapcode.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/com/mapcode/MapcodeCodec.java b/src/main/java/com/mapcode/MapcodeCodec.java index f992763..b0e3405 100644 --- a/src/main/java/com/mapcode/MapcodeCodec.java +++ b/src/main/java/com/mapcode/MapcodeCodec.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016-2020, Stichting Mapcode Foundation (http://www.mapcode.com) + * Copyright (C) 2016-2021, Stichting Mapcode Foundation (http://www.mapcode.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/com/mapcode/MapcodeZone.java b/src/main/java/com/mapcode/MapcodeZone.java index 632ba2f..29300c4 100644 --- a/src/main/java/com/mapcode/MapcodeZone.java +++ b/src/main/java/com/mapcode/MapcodeZone.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016-2020, Stichting Mapcode Foundation (http://www.mapcode.com) + * Copyright (C) 2016-2021, Stichting Mapcode Foundation (http://www.mapcode.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/com/mapcode/Point.java b/src/main/java/com/mapcode/Point.java index 0361bcf..7544446 100644 --- a/src/main/java/com/mapcode/Point.java +++ b/src/main/java/com/mapcode/Point.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016-2020, Stichting Mapcode Foundation (http://www.mapcode.com) + * Copyright (C) 2016-2021, Stichting Mapcode Foundation (http://www.mapcode.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/com/mapcode/Rectangle.java b/src/main/java/com/mapcode/Rectangle.java index e2be172..4eebac9 100644 --- a/src/main/java/com/mapcode/Rectangle.java +++ b/src/main/java/com/mapcode/Rectangle.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016-2020, Stichting Mapcode Foundation (http://www.mapcode.com) + * Copyright (C) 2016-2021, Stichting Mapcode Foundation (http://www.mapcode.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/com/mapcode/Territory.java b/src/main/java/com/mapcode/Territory.java index a9089f2..ed87378 100644 --- a/src/main/java/com/mapcode/Territory.java +++ b/src/main/java/com/mapcode/Territory.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016-2020, Stichting Mapcode Foundation (http://www.mapcode.com) + * Copyright (C) 2016-2021, Stichting Mapcode Foundation (http://www.mapcode.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -960,14 +960,15 @@ public boolean hasSubdivisions() { // Add Clipperton Island (not recognized by Java). MAP_ISO3_TO_ISO2.put("CPT", "CP"); + // Remove Antilles (present in Java 1.8, removed later). + MAP_ISO3_TO_ISO2.remove("ANT"); + // Create fixed sets of the keys and values. COUNTRY_ISO2_CODES = new HashSet(MAP_ISO3_TO_ISO2.values()); COUNTRY_ISO3_CODES = new HashSet(MAP_ISO3_TO_ISO2.keySet()); } - /** - * Static checking of the static data structures. - */ + // Static checking of the static data structures. static { final String errorPrefix = "Initializing error: "; CODE_LIST = new ArrayList(); diff --git a/src/main/java/com/mapcode/UnknownAlphabetException.java b/src/main/java/com/mapcode/UnknownAlphabetException.java index 9db00cd..0519e78 100644 --- a/src/main/java/com/mapcode/UnknownAlphabetException.java +++ b/src/main/java/com/mapcode/UnknownAlphabetException.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016-2020, Stichting Mapcode Foundation (http://www.mapcode.com) + * Copyright (C) 2016-2021, Stichting Mapcode Foundation (http://www.mapcode.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/com/mapcode/UnknownDecodeException.java b/src/main/java/com/mapcode/UnknownDecodeException.java index 7c1d4af..ef38c63 100644 --- a/src/main/java/com/mapcode/UnknownDecodeException.java +++ b/src/main/java/com/mapcode/UnknownDecodeException.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016-2020, Stichting Mapcode Foundation (http://www.mapcode.com) + * Copyright (C) 2016-2021, Stichting Mapcode Foundation (http://www.mapcode.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/com/mapcode/UnknownMapcodeException.java b/src/main/java/com/mapcode/UnknownMapcodeException.java index ce759be..2bd7a24 100644 --- a/src/main/java/com/mapcode/UnknownMapcodeException.java +++ b/src/main/java/com/mapcode/UnknownMapcodeException.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016-2020, Stichting Mapcode Foundation (http://www.mapcode.com) + * Copyright (C) 2016-2021, Stichting Mapcode Foundation (http://www.mapcode.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/com/mapcode/UnknownPrecisionFormatException.java b/src/main/java/com/mapcode/UnknownPrecisionFormatException.java index 5c76398..732610e 100644 --- a/src/main/java/com/mapcode/UnknownPrecisionFormatException.java +++ b/src/main/java/com/mapcode/UnknownPrecisionFormatException.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016-2020, Stichting Mapcode Foundation (http://www.mapcode.com) + * Copyright (C) 2016-2021, Stichting Mapcode Foundation (http://www.mapcode.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/com/mapcode/UnknownTerritoryException.java b/src/main/java/com/mapcode/UnknownTerritoryException.java index d1bbf8b..d2d38b8 100644 --- a/src/main/java/com/mapcode/UnknownTerritoryException.java +++ b/src/main/java/com/mapcode/UnknownTerritoryException.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016-2020, Stichting Mapcode Foundation (http://www.mapcode.com) + * Copyright (C) 2016-2021, Stichting Mapcode Foundation (http://www.mapcode.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/com/mapcode/AlphabetTest.java b/src/test/java/com/mapcode/AlphabetTest.java index a4b11e5..47b4c98 100644 --- a/src/test/java/com/mapcode/AlphabetTest.java +++ b/src/test/java/com/mapcode/AlphabetTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016-2020, Stichting Mapcode Foundation (http://www.mapcode.com) + * Copyright (C) 2016-2021, Stichting Mapcode Foundation (http://www.mapcode.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/com/mapcode/CheckArgsTest.java b/src/test/java/com/mapcode/CheckArgsTest.java index 4bfe7fe..eb42f78 100644 --- a/src/test/java/com/mapcode/CheckArgsTest.java +++ b/src/test/java/com/mapcode/CheckArgsTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016-2020, Stichting Mapcode Foundation (http://www.mapcode.com) + * Copyright (C) 2016-2021, Stichting Mapcode Foundation (http://www.mapcode.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/com/mapcode/DataModelTest.java b/src/test/java/com/mapcode/DataModelTest.java index 1501ee0..358e166 100644 --- a/src/test/java/com/mapcode/DataModelTest.java +++ b/src/test/java/com/mapcode/DataModelTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016-2020, Stichting Mapcode Foundation (http://www.mapcode.com) + * Copyright (C) 2016-2021, Stichting Mapcode Foundation (http://www.mapcode.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/com/mapcode/DecoderTest.java b/src/test/java/com/mapcode/DecoderTest.java index 491318c..213ad00 100644 --- a/src/test/java/com/mapcode/DecoderTest.java +++ b/src/test/java/com/mapcode/DecoderTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016-2020, Stichting Mapcode Foundation (http://www.mapcode.com) + * Copyright (C) 2016-2021, Stichting Mapcode Foundation (http://www.mapcode.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/com/mapcode/EncodeDecodeTest.java b/src/test/java/com/mapcode/EncodeDecodeTest.java index b6892eb..a0e4f1a 100644 --- a/src/test/java/com/mapcode/EncodeDecodeTest.java +++ b/src/test/java/com/mapcode/EncodeDecodeTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016-2020, Stichting Mapcode Foundation (http://www.mapcode.com) + * Copyright (C) 2016-2021, Stichting Mapcode Foundation (http://www.mapcode.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/com/mapcode/EncoderTest.java b/src/test/java/com/mapcode/EncoderTest.java index 556d17b..e1ac239 100644 --- a/src/test/java/com/mapcode/EncoderTest.java +++ b/src/test/java/com/mapcode/EncoderTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016-2020, Stichting Mapcode Foundation (http://www.mapcode.com) + * Copyright (C) 2016-2021, Stichting Mapcode Foundation (http://www.mapcode.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/com/mapcode/MapcodeTest.java b/src/test/java/com/mapcode/MapcodeTest.java index 2da85e9..c8b0db2 100644 --- a/src/test/java/com/mapcode/MapcodeTest.java +++ b/src/test/java/com/mapcode/MapcodeTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016-2020, Stichting Mapcode Foundation (http://www.mapcode.com) + * Copyright (C) 2016-2021, Stichting Mapcode Foundation (http://www.mapcode.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/com/mapcode/PointTest.java b/src/test/java/com/mapcode/PointTest.java index 1ec4222..1ca5d6c 100644 --- a/src/test/java/com/mapcode/PointTest.java +++ b/src/test/java/com/mapcode/PointTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016-2020, Stichting Mapcode Foundation (http://www.mapcode.com) + * Copyright (C) 2016-2021, Stichting Mapcode Foundation (http://www.mapcode.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/com/mapcode/ReferenceFileTest.java b/src/test/java/com/mapcode/ReferenceFileTest.java index 411ed3a..0d9a8dc 100644 --- a/src/test/java/com/mapcode/ReferenceFileTest.java +++ b/src/test/java/com/mapcode/ReferenceFileTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016-2020, Stichting Mapcode Foundation (http://www.mapcode.com) + * Copyright (C) 2016-2021, Stichting Mapcode Foundation (http://www.mapcode.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/com/mapcode/TerritoryTest.java b/src/test/java/com/mapcode/TerritoryTest.java index 656ad0c..b0c23fc 100644 --- a/src/test/java/com/mapcode/TerritoryTest.java +++ b/src/test/java/com/mapcode/TerritoryTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016-2020, Stichting Mapcode Foundation (http://www.mapcode.com) + * Copyright (C) 2016-2021, Stichting Mapcode Foundation (http://www.mapcode.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -307,7 +307,7 @@ public void testGetCountryISO2Codes() { LOG.info("testGetCountryISO2Codes"); final Set countryISO2Codes = Territory.allCountryISO2Codes(); LOG.info("set={}", countryISO2Codes); - assertEquals(251, countryISO2Codes.size()); + assertEquals(250, countryISO2Codes.size()); assertEquals(2, countryISO2Codes.iterator().next().length()); } @@ -316,7 +316,7 @@ public void testGetCountryISO3Codes() { LOG.info("testGetCountryISO3Codes"); final Set countryISO3Codes = Territory.allCountryISO3Codes(); LOG.info("set={}", countryISO3Codes); - assertEquals(251, countryISO3Codes.size()); + assertEquals(250, countryISO3Codes.size()); assertEquals(3, countryISO3Codes.iterator().next().length()); } } diff --git a/src/test/resources/log4j.xml b/src/test/resources/log4j.xml index d723c1c..26da1c8 100644 --- a/src/test/resources/log4j.xml +++ b/src/test/resources/log4j.xml @@ -1,6 +1,6 @@ - 2.8.6 + 2.8.9 3.0.2 4.13.2 - 1.2.17 + 2.17.0 1.7.30 @@ -299,8 +299,14 @@ - log4j - log4j + org.apache.logging.log4j + log4j-api + ${log4j.version} + + + + org.apache.logging.log4j + log4j-core ${log4j.version} From 8859e6d77d4995bd9f3dfd81c092db408637396e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 4 Jan 2022 16:59:08 +0000 Subject: [PATCH 3/9] Bump log4j-core from 2.17.0 to 2.17.1 Bumps log4j-core from 2.17.0 to 2.17.1. --- updated-dependencies: - dependency-name: org.apache.logging.log4j:log4j-core dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d6ecf1e..721c5fb 100644 --- a/pom.xml +++ b/pom.xml @@ -103,7 +103,7 @@ 2.8.9 3.0.2 4.13.2 - 2.17.0 + 2.17.1 1.7.30 From a6b3231c34b8bf673267ff94f8cdcadc564c17b1 Mon Sep 17 00:00:00 2001 From: Rijn Buve Date: Thu, 6 Jan 2022 09:17:35 +0100 Subject: [PATCH 4/9] Updated dependencies --- README.md | 2 +- pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1a0fbe6..d5edb54 100644 --- a/README.md +++ b/README.md @@ -480,7 +480,7 @@ Normally, one of our developers should be able to comment on them and fix. These are the release notes for the Java library for mapcodes. -### 2.4.16 +### 2.4.16-2.4.17 * Updated `log4j` and `gson` dependencies. diff --git a/pom.xml b/pom.xml index 721c5fb..f408783 100644 --- a/pom.xml +++ b/pom.xml @@ -24,7 +24,7 @@ mapcode jar - 2.4.16 + 2.4.17 Mapcode Java Library From 5bbd82abe8c398f5fa5435a67af7f349ebeb3347 Mon Sep 17 00:00:00 2001 From: Rijn Buve Date: Mon, 25 Apr 2022 15:29:02 +0200 Subject: [PATCH 5/9] Updated dependencies --- README.md | 2 +- pom.xml | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index d5edb54..f2eb1e9 100644 --- a/README.md +++ b/README.md @@ -480,7 +480,7 @@ Normally, one of our developers should be able to comment on them and fix. These are the release notes for the Java library for mapcodes. -### 2.4.16-2.4.17 +### 2.4.16-2.4.18 * Updated `log4j` and `gson` dependencies. diff --git a/pom.xml b/pom.xml index f408783..a6e4299 100644 --- a/pom.xml +++ b/pom.xml @@ -24,7 +24,7 @@ mapcode jar - 2.4.17 + 2.4.18 Mapcode Java Library @@ -100,11 +100,11 @@ 1.6.8 - 2.8.9 + 2.9.0 3.0.2 4.13.2 - 2.17.1 - 1.7.30 + 2.17.2 + 1.7.36 From 035efaf7dba779e6bb0a18cfabb9eecd94d99c8f Mon Sep 17 00:00:00 2001 From: Rijn Buve Date: Wed, 27 May 2026 11:31:23 +0200 Subject: [PATCH 6/9] fix: added ISO synonyms for Macao and Mexico DIF --- .gitignore | 1 + AGENTS.md | 101 +++++++++++++++++++++++ CLAUDE.md | 101 +++++++++++++++++++++++ README.md | 5 ++ pom.xml | 6 +- src/main/java/com/mapcode/Territory.java | 4 +- 6 files changed, 213 insertions(+), 5 deletions(-) create mode 100644 AGENTS.md create mode 100644 CLAUDE.md diff --git a/.gitignore b/.gitignore index 19ba0e5..bd7e011 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ target/ out/ *.versionsBackup +.gitnexus diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..e847df7 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,101 @@ + +# GitNexus — Code Intelligence + +This project is indexed by GitNexus as **mapcode-java** (763 symbols, 2369 relationships, 66 execution flows). Use the GitNexus MCP tools to understand code, assess impact, and navigate safely. + +> If any GitNexus tool warns the index is stale, run `npx gitnexus analyze` in terminal first. + +## Always Do + +- **MUST run impact analysis before editing any symbol.** Before modifying a function, class, or method, run `gitnexus_impact({target: "symbolName", direction: "upstream"})` and report the blast radius (direct callers, affected processes, risk level) to the user. +- **MUST run `gitnexus_detect_changes()` before committing** to verify your changes only affect expected symbols and execution flows. +- **MUST warn the user** if impact analysis returns HIGH or CRITICAL risk before proceeding with edits. +- When exploring unfamiliar code, use `gitnexus_query({query: "concept"})` to find execution flows instead of grepping. It returns process-grouped results ranked by relevance. +- When you need full context on a specific symbol — callers, callees, which execution flows it participates in — use `gitnexus_context({name: "symbolName"})`. + +## When Debugging + +1. `gitnexus_query({query: ""})` — find execution flows related to the issue +2. `gitnexus_context({name: ""})` — see all callers, callees, and process participation +3. `READ gitnexus://repo/mapcode-java/process/{processName}` — trace the full execution flow step by step +4. For regressions: `gitnexus_detect_changes({scope: "compare", base_ref: "main"})` — see what your branch changed + +## When Refactoring + +- **Renaming**: MUST use `gitnexus_rename({symbol_name: "old", new_name: "new", dry_run: true})` first. Review the preview — graph edits are safe, text_search edits need manual review. Then run with `dry_run: false`. +- **Extracting/Splitting**: MUST run `gitnexus_context({name: "target"})` to see all incoming/outgoing refs, then `gitnexus_impact({target: "target", direction: "upstream"})` to find all external callers before moving code. +- After any refactor: run `gitnexus_detect_changes({scope: "all"})` to verify only expected files changed. + +## Never Do + +- NEVER edit a function, class, or method without first running `gitnexus_impact` on it. +- NEVER ignore HIGH or CRITICAL risk warnings from impact analysis. +- NEVER rename symbols with find-and-replace — use `gitnexus_rename` which understands the call graph. +- NEVER commit changes without running `gitnexus_detect_changes()` to check affected scope. + +## Tools Quick Reference + +| Tool | When to use | Command | +|------|-------------|---------| +| `query` | Find code by concept | `gitnexus_query({query: "auth validation"})` | +| `context` | 360-degree view of one symbol | `gitnexus_context({name: "validateUser"})` | +| `impact` | Blast radius before editing | `gitnexus_impact({target: "X", direction: "upstream"})` | +| `detect_changes` | Pre-commit scope check | `gitnexus_detect_changes({scope: "staged"})` | +| `rename` | Safe multi-file rename | `gitnexus_rename({symbol_name: "old", new_name: "new", dry_run: true})` | +| `cypher` | Custom graph queries | `gitnexus_cypher({query: "MATCH ..."})` | + +## Impact Risk Levels + +| Depth | Meaning | Action | +|-------|---------|--------| +| d=1 | WILL BREAK — direct callers/importers | MUST update these | +| d=2 | LIKELY AFFECTED — indirect deps | Should test | +| d=3 | MAY NEED TESTING — transitive | Test if critical path | + +## Resources + +| Resource | Use for | +|----------|---------| +| `gitnexus://repo/mapcode-java/context` | Codebase overview, check index freshness | +| `gitnexus://repo/mapcode-java/clusters` | All functional areas | +| `gitnexus://repo/mapcode-java/processes` | All execution flows | +| `gitnexus://repo/mapcode-java/process/{name}` | Step-by-step execution trace | + +## Self-Check Before Finishing + +Before completing any code modification task, verify: +1. `gitnexus_impact` was run for all modified symbols +2. No HIGH/CRITICAL risk warnings were ignored +3. `gitnexus_detect_changes()` confirms changes match expected scope +4. All d=1 (WILL BREAK) dependents were updated + +## Keeping the Index Fresh + +After committing code changes, the GitNexus index becomes stale. Re-run analyze to update it: + +```bash +npx gitnexus analyze +``` + +If the index previously included embeddings, preserve them by adding `--embeddings`: + +```bash +npx gitnexus analyze --embeddings +``` + +To check whether embeddings exist, inspect `.gitnexus/meta.json` — the `stats.embeddings` field shows the count (0 means no embeddings). **Running analyze without `--embeddings` will delete any previously generated embeddings.** + +> Claude Code users: A PostToolUse hook handles this automatically after `git commit` and `git merge`. + +## CLI + +| Task | Read this skill file | +|------|---------------------| +| Understand architecture / "How does X work?" | `.claude/skills/gitnexus/gitnexus-exploring/SKILL.md` | +| Blast radius / "What breaks if I change X?" | `.claude/skills/gitnexus/gitnexus-impact-analysis/SKILL.md` | +| Trace bugs / "Why is X failing?" | `.claude/skills/gitnexus/gitnexus-debugging/SKILL.md` | +| Rename / extract / split / refactor | `.claude/skills/gitnexus/gitnexus-refactoring/SKILL.md` | +| Tools, resources, schema reference | `.claude/skills/gitnexus/gitnexus-guide/SKILL.md` | +| Index, status, clean, wiki CLI commands | `.claude/skills/gitnexus/gitnexus-cli/SKILL.md` | + + \ No newline at end of file diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..e847df7 --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,101 @@ + +# GitNexus — Code Intelligence + +This project is indexed by GitNexus as **mapcode-java** (763 symbols, 2369 relationships, 66 execution flows). Use the GitNexus MCP tools to understand code, assess impact, and navigate safely. + +> If any GitNexus tool warns the index is stale, run `npx gitnexus analyze` in terminal first. + +## Always Do + +- **MUST run impact analysis before editing any symbol.** Before modifying a function, class, or method, run `gitnexus_impact({target: "symbolName", direction: "upstream"})` and report the blast radius (direct callers, affected processes, risk level) to the user. +- **MUST run `gitnexus_detect_changes()` before committing** to verify your changes only affect expected symbols and execution flows. +- **MUST warn the user** if impact analysis returns HIGH or CRITICAL risk before proceeding with edits. +- When exploring unfamiliar code, use `gitnexus_query({query: "concept"})` to find execution flows instead of grepping. It returns process-grouped results ranked by relevance. +- When you need full context on a specific symbol — callers, callees, which execution flows it participates in — use `gitnexus_context({name: "symbolName"})`. + +## When Debugging + +1. `gitnexus_query({query: ""})` — find execution flows related to the issue +2. `gitnexus_context({name: ""})` — see all callers, callees, and process participation +3. `READ gitnexus://repo/mapcode-java/process/{processName}` — trace the full execution flow step by step +4. For regressions: `gitnexus_detect_changes({scope: "compare", base_ref: "main"})` — see what your branch changed + +## When Refactoring + +- **Renaming**: MUST use `gitnexus_rename({symbol_name: "old", new_name: "new", dry_run: true})` first. Review the preview — graph edits are safe, text_search edits need manual review. Then run with `dry_run: false`. +- **Extracting/Splitting**: MUST run `gitnexus_context({name: "target"})` to see all incoming/outgoing refs, then `gitnexus_impact({target: "target", direction: "upstream"})` to find all external callers before moving code. +- After any refactor: run `gitnexus_detect_changes({scope: "all"})` to verify only expected files changed. + +## Never Do + +- NEVER edit a function, class, or method without first running `gitnexus_impact` on it. +- NEVER ignore HIGH or CRITICAL risk warnings from impact analysis. +- NEVER rename symbols with find-and-replace — use `gitnexus_rename` which understands the call graph. +- NEVER commit changes without running `gitnexus_detect_changes()` to check affected scope. + +## Tools Quick Reference + +| Tool | When to use | Command | +|------|-------------|---------| +| `query` | Find code by concept | `gitnexus_query({query: "auth validation"})` | +| `context` | 360-degree view of one symbol | `gitnexus_context({name: "validateUser"})` | +| `impact` | Blast radius before editing | `gitnexus_impact({target: "X", direction: "upstream"})` | +| `detect_changes` | Pre-commit scope check | `gitnexus_detect_changes({scope: "staged"})` | +| `rename` | Safe multi-file rename | `gitnexus_rename({symbol_name: "old", new_name: "new", dry_run: true})` | +| `cypher` | Custom graph queries | `gitnexus_cypher({query: "MATCH ..."})` | + +## Impact Risk Levels + +| Depth | Meaning | Action | +|-------|---------|--------| +| d=1 | WILL BREAK — direct callers/importers | MUST update these | +| d=2 | LIKELY AFFECTED — indirect deps | Should test | +| d=3 | MAY NEED TESTING — transitive | Test if critical path | + +## Resources + +| Resource | Use for | +|----------|---------| +| `gitnexus://repo/mapcode-java/context` | Codebase overview, check index freshness | +| `gitnexus://repo/mapcode-java/clusters` | All functional areas | +| `gitnexus://repo/mapcode-java/processes` | All execution flows | +| `gitnexus://repo/mapcode-java/process/{name}` | Step-by-step execution trace | + +## Self-Check Before Finishing + +Before completing any code modification task, verify: +1. `gitnexus_impact` was run for all modified symbols +2. No HIGH/CRITICAL risk warnings were ignored +3. `gitnexus_detect_changes()` confirms changes match expected scope +4. All d=1 (WILL BREAK) dependents were updated + +## Keeping the Index Fresh + +After committing code changes, the GitNexus index becomes stale. Re-run analyze to update it: + +```bash +npx gitnexus analyze +``` + +If the index previously included embeddings, preserve them by adding `--embeddings`: + +```bash +npx gitnexus analyze --embeddings +``` + +To check whether embeddings exist, inspect `.gitnexus/meta.json` — the `stats.embeddings` field shows the count (0 means no embeddings). **Running analyze without `--embeddings` will delete any previously generated embeddings.** + +> Claude Code users: A PostToolUse hook handles this automatically after `git commit` and `git merge`. + +## CLI + +| Task | Read this skill file | +|------|---------------------| +| Understand architecture / "How does X work?" | `.claude/skills/gitnexus/gitnexus-exploring/SKILL.md` | +| Blast radius / "What breaks if I change X?" | `.claude/skills/gitnexus/gitnexus-impact-analysis/SKILL.md` | +| Trace bugs / "Why is X failing?" | `.claude/skills/gitnexus/gitnexus-debugging/SKILL.md` | +| Rename / extract / split / refactor | `.claude/skills/gitnexus/gitnexus-refactoring/SKILL.md` | +| Tools, resources, schema reference | `.claude/skills/gitnexus/gitnexus-guide/SKILL.md` | +| Index, status, clean, wiki CLI commands | `.claude/skills/gitnexus/gitnexus-cli/SKILL.md` | + + \ No newline at end of file diff --git a/README.md b/README.md index f2eb1e9..38b10c3 100644 --- a/README.md +++ b/README.md @@ -480,6 +480,11 @@ Normally, one of our developers should be able to comment on them and fix. These are the release notes for the Java library for mapcodes. +### 2.4.19 + +* Added synonyms for territories Maco CN-MO and Mexico MX-CMX. +* Updated dependencies. + ### 2.4.16-2.4.18 * Updated `log4j` and `gson` dependencies. diff --git a/pom.xml b/pom.xml index a6e4299..c3ac11d 100644 --- a/pom.xml +++ b/pom.xml @@ -24,7 +24,7 @@ mapcode jar - 2.4.18 + 2.4.19 Mapcode Java Library @@ -100,10 +100,10 @@ 1.6.8 - 2.9.0 + 2.14.0 3.0.2 4.13.2 - 2.17.2 + 2.26.0 1.7.36 diff --git a/src/main/java/com/mapcode/Territory.java b/src/main/java/com/mapcode/Territory.java index ed87378..5f4879f 100644 --- a/src/main/java/com/mapcode/Territory.java +++ b/src/main/java/com/mapcode/Territory.java @@ -48,7 +48,7 @@ public enum Territory { BLM(5, "Saint-Barthelemy"), NRU(6, "Nauru"), TUV(7, "Tuvalu"), - MAC(8, "Macau", new Alphabet[]{Alphabet.CHINESE, Alphabet.ROMAN}, null, new String[]{"CN-92", "CHN-92", "CN-MC", "CHN-MC"}, new String[]{"Aomen"}), + MAC(8, "Macau", new Alphabet[]{Alphabet.CHINESE, Alphabet.ROMAN}, null, new String[]{"CN-92", "CHN-92", "CN-MC", "CHN-MC", "CN-MO", "CHN-MO"}, new String[]{"Aomen"}), SXM(9, "Sint Maarten"), MAF(10, "Saint-Martin"), NFK(11, "Norfolk and Philip Island", null, null, new String[]{"AU-NF", "AUS-NF"}, @@ -277,7 +277,7 @@ public enum Territory { LBY(230, "Libya", new Alphabet[]{Alphabet.ARABIC, Alphabet.ROMAN, Alphabet.TIFINAGH}), SDN(231, "Sudan", new Alphabet[]{Alphabet.ARABIC, Alphabet.ROMAN}), IDN(232, "Indonesia"), - MX_DIF(233, "Federal District", null, MEX, new String[]{"MX-DF"}), + MX_DIF(233, "Federal District", null, MEX, new String[]{"MX-DF", "MX-CMX"}), MX_TLA(234, "Tlaxcala", null, MEX, new String[]{"MX-TL"}), MX_MOR(235, "Morelos", null, MEX, new String[]{"MX-MO"}), MX_AGU(236, "Aguascalientes", null, MEX, new String[]{"MX-AG"}), From 2b92b4b8a20e6f6b910b05d4d0aace7623cd8bf1 Mon Sep 17 00:00:00 2001 From: Rijn Buve Date: Wed, 27 May 2026 11:35:58 +0200 Subject: [PATCH 7/9] update README.md --- README.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index 38b10c3..04fb346 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,11 @@ # Mapcode Library for Java -[![Codacy Badge](https://api.codacy.com/project/badge/Grade/0c9f11645f504b50bd154a80fb95a5c3)](https://www.codacy.com/app/rijnb/mapcode-java?utm_source=github.com&utm_medium=referral&utm_content=mapcode-foundation/mapcode-java&utm_campaign=Badge_Grade) -[![Build Status](https://img.shields.io/travis/mapcode-foundation/mapcode-java.svg?maxAge=3600&branch=master)](https://travis-ci.org/mapcode-foundation/mapcode-java) [![Coverage Status](https://coveralls.io/repos/github/mapcode-foundation/mapcode-java/badge.svg?branch=master&maxAge=3600)](https://coveralls.io/github/mapcode-foundation/mapcode-java?branch=master) [![License](http://img.shields.io/badge/license-APACHE2-blue.svg)]() [![Release](https://img.shields.io/github/release/mapcode-foundation/mapcode-java.svg?maxAge=3600)](https://github.com/mapcode-foundation/mapcode-java/releases) [![Maven Central](https://img.shields.io/maven-central/v/com.mapcode/mapcode.svg?maxAge=3600)](https://maven-badges.herokuapp.com/maven-central/com.mapcode/mapcode) -**Copyright (C) 2014-2021, Stichting Mapcode Foundation (http://www.mapcode.com)** +**Copyright (C) 2014-2026, Stichting Mapcode Foundation (http://www.mapcode.com)** This Java project contains a library to encode latitude/longitude pairs to mapcodes and to decode mapcodes back to latitude/longitude pairs. From 9779f2675049888937a95fee31c7b7257f27abd4 Mon Sep 17 00:00:00 2001 From: Rijn Buve Date: Wed, 27 May 2026 12:46:22 +0200 Subject: [PATCH 8/9] updated publishing --- pom.xml | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/pom.xml b/pom.xml index c3ac11d..a2b93fc 100644 --- a/pom.xml +++ b/pom.xml @@ -97,7 +97,7 @@ 3.9.0 3.2.1 2.22.2 - 1.6.8 + 0.8.0 2.14.0 @@ -107,13 +107,6 @@ 1.7.36 - - - ossrh - https://oss.sonatype.org/content/repositories/snapshots - - - @@ -215,16 +208,15 @@ - + - org.sonatype.plugins - nexus-staging-maven-plugin - ${nexus-staging-maven-plugin.version} + org.sonatype.central + central-publishing-maven-plugin + ${central-publishing-maven-plugin.version} true - ossrh - https://oss.sonatype.org/ - false + central + false From 0df64de6d05a7f8d11f73f8f8449ecf99a6573eb Mon Sep 17 00:00:00 2001 From: Rijn Buve Date: Tue, 2 Jun 2026 13:16:38 +0200 Subject: [PATCH 9/9] remove agent files --- AGENTS.md | 101 ------------------------------------------------------ CLAUDE.md | 101 ------------------------------------------------------ 2 files changed, 202 deletions(-) delete mode 100644 AGENTS.md delete mode 100644 CLAUDE.md diff --git a/AGENTS.md b/AGENTS.md deleted file mode 100644 index e847df7..0000000 --- a/AGENTS.md +++ /dev/null @@ -1,101 +0,0 @@ - -# GitNexus — Code Intelligence - -This project is indexed by GitNexus as **mapcode-java** (763 symbols, 2369 relationships, 66 execution flows). Use the GitNexus MCP tools to understand code, assess impact, and navigate safely. - -> If any GitNexus tool warns the index is stale, run `npx gitnexus analyze` in terminal first. - -## Always Do - -- **MUST run impact analysis before editing any symbol.** Before modifying a function, class, or method, run `gitnexus_impact({target: "symbolName", direction: "upstream"})` and report the blast radius (direct callers, affected processes, risk level) to the user. -- **MUST run `gitnexus_detect_changes()` before committing** to verify your changes only affect expected symbols and execution flows. -- **MUST warn the user** if impact analysis returns HIGH or CRITICAL risk before proceeding with edits. -- When exploring unfamiliar code, use `gitnexus_query({query: "concept"})` to find execution flows instead of grepping. It returns process-grouped results ranked by relevance. -- When you need full context on a specific symbol — callers, callees, which execution flows it participates in — use `gitnexus_context({name: "symbolName"})`. - -## When Debugging - -1. `gitnexus_query({query: ""})` — find execution flows related to the issue -2. `gitnexus_context({name: ""})` — see all callers, callees, and process participation -3. `READ gitnexus://repo/mapcode-java/process/{processName}` — trace the full execution flow step by step -4. For regressions: `gitnexus_detect_changes({scope: "compare", base_ref: "main"})` — see what your branch changed - -## When Refactoring - -- **Renaming**: MUST use `gitnexus_rename({symbol_name: "old", new_name: "new", dry_run: true})` first. Review the preview — graph edits are safe, text_search edits need manual review. Then run with `dry_run: false`. -- **Extracting/Splitting**: MUST run `gitnexus_context({name: "target"})` to see all incoming/outgoing refs, then `gitnexus_impact({target: "target", direction: "upstream"})` to find all external callers before moving code. -- After any refactor: run `gitnexus_detect_changes({scope: "all"})` to verify only expected files changed. - -## Never Do - -- NEVER edit a function, class, or method without first running `gitnexus_impact` on it. -- NEVER ignore HIGH or CRITICAL risk warnings from impact analysis. -- NEVER rename symbols with find-and-replace — use `gitnexus_rename` which understands the call graph. -- NEVER commit changes without running `gitnexus_detect_changes()` to check affected scope. - -## Tools Quick Reference - -| Tool | When to use | Command | -|------|-------------|---------| -| `query` | Find code by concept | `gitnexus_query({query: "auth validation"})` | -| `context` | 360-degree view of one symbol | `gitnexus_context({name: "validateUser"})` | -| `impact` | Blast radius before editing | `gitnexus_impact({target: "X", direction: "upstream"})` | -| `detect_changes` | Pre-commit scope check | `gitnexus_detect_changes({scope: "staged"})` | -| `rename` | Safe multi-file rename | `gitnexus_rename({symbol_name: "old", new_name: "new", dry_run: true})` | -| `cypher` | Custom graph queries | `gitnexus_cypher({query: "MATCH ..."})` | - -## Impact Risk Levels - -| Depth | Meaning | Action | -|-------|---------|--------| -| d=1 | WILL BREAK — direct callers/importers | MUST update these | -| d=2 | LIKELY AFFECTED — indirect deps | Should test | -| d=3 | MAY NEED TESTING — transitive | Test if critical path | - -## Resources - -| Resource | Use for | -|----------|---------| -| `gitnexus://repo/mapcode-java/context` | Codebase overview, check index freshness | -| `gitnexus://repo/mapcode-java/clusters` | All functional areas | -| `gitnexus://repo/mapcode-java/processes` | All execution flows | -| `gitnexus://repo/mapcode-java/process/{name}` | Step-by-step execution trace | - -## Self-Check Before Finishing - -Before completing any code modification task, verify: -1. `gitnexus_impact` was run for all modified symbols -2. No HIGH/CRITICAL risk warnings were ignored -3. `gitnexus_detect_changes()` confirms changes match expected scope -4. All d=1 (WILL BREAK) dependents were updated - -## Keeping the Index Fresh - -After committing code changes, the GitNexus index becomes stale. Re-run analyze to update it: - -```bash -npx gitnexus analyze -``` - -If the index previously included embeddings, preserve them by adding `--embeddings`: - -```bash -npx gitnexus analyze --embeddings -``` - -To check whether embeddings exist, inspect `.gitnexus/meta.json` — the `stats.embeddings` field shows the count (0 means no embeddings). **Running analyze without `--embeddings` will delete any previously generated embeddings.** - -> Claude Code users: A PostToolUse hook handles this automatically after `git commit` and `git merge`. - -## CLI - -| Task | Read this skill file | -|------|---------------------| -| Understand architecture / "How does X work?" | `.claude/skills/gitnexus/gitnexus-exploring/SKILL.md` | -| Blast radius / "What breaks if I change X?" | `.claude/skills/gitnexus/gitnexus-impact-analysis/SKILL.md` | -| Trace bugs / "Why is X failing?" | `.claude/skills/gitnexus/gitnexus-debugging/SKILL.md` | -| Rename / extract / split / refactor | `.claude/skills/gitnexus/gitnexus-refactoring/SKILL.md` | -| Tools, resources, schema reference | `.claude/skills/gitnexus/gitnexus-guide/SKILL.md` | -| Index, status, clean, wiki CLI commands | `.claude/skills/gitnexus/gitnexus-cli/SKILL.md` | - - \ No newline at end of file diff --git a/CLAUDE.md b/CLAUDE.md deleted file mode 100644 index e847df7..0000000 --- a/CLAUDE.md +++ /dev/null @@ -1,101 +0,0 @@ - -# GitNexus — Code Intelligence - -This project is indexed by GitNexus as **mapcode-java** (763 symbols, 2369 relationships, 66 execution flows). Use the GitNexus MCP tools to understand code, assess impact, and navigate safely. - -> If any GitNexus tool warns the index is stale, run `npx gitnexus analyze` in terminal first. - -## Always Do - -- **MUST run impact analysis before editing any symbol.** Before modifying a function, class, or method, run `gitnexus_impact({target: "symbolName", direction: "upstream"})` and report the blast radius (direct callers, affected processes, risk level) to the user. -- **MUST run `gitnexus_detect_changes()` before committing** to verify your changes only affect expected symbols and execution flows. -- **MUST warn the user** if impact analysis returns HIGH or CRITICAL risk before proceeding with edits. -- When exploring unfamiliar code, use `gitnexus_query({query: "concept"})` to find execution flows instead of grepping. It returns process-grouped results ranked by relevance. -- When you need full context on a specific symbol — callers, callees, which execution flows it participates in — use `gitnexus_context({name: "symbolName"})`. - -## When Debugging - -1. `gitnexus_query({query: ""})` — find execution flows related to the issue -2. `gitnexus_context({name: ""})` — see all callers, callees, and process participation -3. `READ gitnexus://repo/mapcode-java/process/{processName}` — trace the full execution flow step by step -4. For regressions: `gitnexus_detect_changes({scope: "compare", base_ref: "main"})` — see what your branch changed - -## When Refactoring - -- **Renaming**: MUST use `gitnexus_rename({symbol_name: "old", new_name: "new", dry_run: true})` first. Review the preview — graph edits are safe, text_search edits need manual review. Then run with `dry_run: false`. -- **Extracting/Splitting**: MUST run `gitnexus_context({name: "target"})` to see all incoming/outgoing refs, then `gitnexus_impact({target: "target", direction: "upstream"})` to find all external callers before moving code. -- After any refactor: run `gitnexus_detect_changes({scope: "all"})` to verify only expected files changed. - -## Never Do - -- NEVER edit a function, class, or method without first running `gitnexus_impact` on it. -- NEVER ignore HIGH or CRITICAL risk warnings from impact analysis. -- NEVER rename symbols with find-and-replace — use `gitnexus_rename` which understands the call graph. -- NEVER commit changes without running `gitnexus_detect_changes()` to check affected scope. - -## Tools Quick Reference - -| Tool | When to use | Command | -|------|-------------|---------| -| `query` | Find code by concept | `gitnexus_query({query: "auth validation"})` | -| `context` | 360-degree view of one symbol | `gitnexus_context({name: "validateUser"})` | -| `impact` | Blast radius before editing | `gitnexus_impact({target: "X", direction: "upstream"})` | -| `detect_changes` | Pre-commit scope check | `gitnexus_detect_changes({scope: "staged"})` | -| `rename` | Safe multi-file rename | `gitnexus_rename({symbol_name: "old", new_name: "new", dry_run: true})` | -| `cypher` | Custom graph queries | `gitnexus_cypher({query: "MATCH ..."})` | - -## Impact Risk Levels - -| Depth | Meaning | Action | -|-------|---------|--------| -| d=1 | WILL BREAK — direct callers/importers | MUST update these | -| d=2 | LIKELY AFFECTED — indirect deps | Should test | -| d=3 | MAY NEED TESTING — transitive | Test if critical path | - -## Resources - -| Resource | Use for | -|----------|---------| -| `gitnexus://repo/mapcode-java/context` | Codebase overview, check index freshness | -| `gitnexus://repo/mapcode-java/clusters` | All functional areas | -| `gitnexus://repo/mapcode-java/processes` | All execution flows | -| `gitnexus://repo/mapcode-java/process/{name}` | Step-by-step execution trace | - -## Self-Check Before Finishing - -Before completing any code modification task, verify: -1. `gitnexus_impact` was run for all modified symbols -2. No HIGH/CRITICAL risk warnings were ignored -3. `gitnexus_detect_changes()` confirms changes match expected scope -4. All d=1 (WILL BREAK) dependents were updated - -## Keeping the Index Fresh - -After committing code changes, the GitNexus index becomes stale. Re-run analyze to update it: - -```bash -npx gitnexus analyze -``` - -If the index previously included embeddings, preserve them by adding `--embeddings`: - -```bash -npx gitnexus analyze --embeddings -``` - -To check whether embeddings exist, inspect `.gitnexus/meta.json` — the `stats.embeddings` field shows the count (0 means no embeddings). **Running analyze without `--embeddings` will delete any previously generated embeddings.** - -> Claude Code users: A PostToolUse hook handles this automatically after `git commit` and `git merge`. - -## CLI - -| Task | Read this skill file | -|------|---------------------| -| Understand architecture / "How does X work?" | `.claude/skills/gitnexus/gitnexus-exploring/SKILL.md` | -| Blast radius / "What breaks if I change X?" | `.claude/skills/gitnexus/gitnexus-impact-analysis/SKILL.md` | -| Trace bugs / "Why is X failing?" | `.claude/skills/gitnexus/gitnexus-debugging/SKILL.md` | -| Rename / extract / split / refactor | `.claude/skills/gitnexus/gitnexus-refactoring/SKILL.md` | -| Tools, resources, schema reference | `.claude/skills/gitnexus/gitnexus-guide/SKILL.md` | -| Index, status, clean, wiki CLI commands | `.claude/skills/gitnexus/gitnexus-cli/SKILL.md` | - - \ No newline at end of file