Repository navigation
Clean up device-detection terminology incorrectly ported to IP Intelligence #108
Description
Summary
Several identifiers, class names, test utilities, comments, and constants were ported verbatim from device-detection-java and still reference device-detection-specific concepts (Hash algorithm, User-Agent, Client Hints, TAC) that have no relevance to IP Intelligence. This also applies to ip-intelligence-java-examples.
ip-intelligence-java
1. "Hash" in class/file names
Rename or remove - "Hash" is the DD algorithm name, not relevant to IPI:
IPIntelligenceDataHash(interface)IPIntelligenceDataHashDefault(class)WrapperHash,DataValidatorHash,MetaDataHashTests,MetaDataHasherHash,ValueHashTests(test classes)MetaDataHasher(test interface in shared module)@ElementBuilder(alternateName = "HashIPIntelligence")inIPIntelligenceOnPremiseEngineBuilder.java:56dataDownloadType = "HashV41"inIPIntelligenceOnPremiseEngineBuilder.java:62Enums.javawithIPIntelligenceAlgorithm { Hash, Pattern }- already@Deprecated, should be removed- On-premise
Enums.java:27- "match methods used by the Hash engine" getHashFileName(),getHashFile()inFileUtils.javaHASH_URLinClientHintsExampleTestBase.java:57- Test methods:
Process_Hash_NoEvidence,Process_Hash_EmptyUserAgent,EvidenceKeys_Hash_*,MetaData_Hash_*,Values_Hash_*
2. User-Agent references
IPI works with IP addresses, not User-Agents:
UserAgentGenerator.java- entire class should be replaced with IP address test dataUA_FILEconstant inFileUtils.java:47IPIntelligenceOnPremiseEngine.java:48- Javadoc: "This engine takes User-Agents and other relevant HTTP headers..."- Tests using
UserAgentGenerator:IPIntelligenceTests.java,TestsBase.java(on-premise + cloud),ValueCloudTests.java emptyUserAgent()inProcessTests.java/Process_Hash_EmptyUserAgenttestci/README.md:51- "Evidence and User-Agent files"
3. Client Hints references
Entire ClientHintsExampleTestBase.java is DD-only - contains CHROME_UA, EDGE_UA, FIREFOX_UA, SAFARI_UA, CURL_UA, SEC-CH-UA-* header constants, DD property names (HardwareVendor, DeviceType, etc.). Remove or replace.
4. TAC / native model constants
TAC (Type Allocation Code) is a mobile device identifier, not IPI:
Constants.java-EVIDENCE_TAC_SUFFIX,EVIDENCE_QUERY_TAC_KEY,EVIDENCE_NATIVE_MODEL_SUFFIX,EVIDENCE_QUERY_NATIVE_MODEL_KEYMultiIPIDataCloud.java:41- "when certain evidence is provided (e.g. TAC)"ci/README.md:25-26- "downloading the enterprise TAC hash file",Product=V4TAC
ip-intelligence-java-examples
Note: The "mixed" examples (GettingStartedMixed, GettingStartedWebMixed) intentionally combine DD + IPI - DD references there are expected. The issues below are in pure IPI code and shared helpers.
5. Pure IPI examples with DD leftovers
OfflineProcessing.java (pure IPI example)
- Lines 78-84: Javadoc shows User-Agent + Client Hints YAML evidence as the example format (
header.user-agent,header.sec-ch-ua,header.sec-ch-ua-*). Should show IP addresses instead.
MetadataOnPrem.java (pure IPI example)
- Lines 139-141: Evidence filter check uses
header.user-agentas the example key. Should use an IP-related evidence key.
6. Shared web helper with DD-specific content
HtmlContentHelper.java (used by both pure IPI and mixed examples)
- Line 94-98: Warning about "User-Agent Client Hints" browser support - not relevant when rendering pure IPI results
- Line 126: Comment "we assume a CloudRequest or a HashEngine" - should say "IPIntelligenceOnPremiseEngine" (already correct on line 129, but the comment still says HashEngine)
- Lines 179-197:
doUachInfo()method outputs a full explanation of Client Hints (Sec-CH-UA,Accept-CHheaders) - entirely DD-specific, not relevant to IPI
These DD-specific sections are shown even on pure IPI web pages. They should either be removed or conditionally rendered only when DD is present.
7. TAC references in examples shared code
- KeyHelper.java:89-90 - "TAC lookup and Native Model are not available as a free service"
- tacCloud.xml:27 - "TAC lookup and Native Model" comment - DD-specific config
- .gitignore:45-46 -
TAC-HashV41.hashandTAC-HashV41.hash.gzentries - pom.xml:143 - Comment about "special resource key with license for running TAC and Native Model examples"
- 51Degrees-Cloud-Test.xml:31-33 - Comment referencing DD properties
BrowserName,BrowserVendor,HardwareName,HardwareVendor,PlatformName, etc. (also has typo "HardeareVendor")
Activity
justadreamer commentedon Jun 8, 2026
The complexity here is that some of the classes containing
Hashare public and will require explicit deprecation and adding the corresponding renamed classes with the corresponding comment in Deprecated statement to switch to the new class. It should not compile-break the client code, only issue a warning. (unless of course they have Treat Warning as Errors)