<had to re-do this post since my original attempt resulted in an error related to “new users can only put two links in a post”…>
Yes, SNMP4J v3.x depends on Java 9+ because of DTLS support.
Thx, so this is the only driver for the Java 9 requirement).
What SNMP4J APIs do you think are inconsistent?
The example USM Example with and without DirectUser you quoted is not inconsistent. SNMP4J v3.4.0 simply added a new feature, that is not available in SNMP4J v2.x and < v3.4.0. So, that is probably just a misunderstanding.
Attempting to compile this source directly w/v2.x failed for me. This is related to the MessageDispatcher and CommandResponder signatures differing between the two version (the v3 version uses generics). The term “inconsistent” may not be semantically correct (maybe not backward compatible is better) in this context, but you get the idea.
The document that describes all differences in detail is the change log available here:
CHANGES.txt (SNMP4J latest)
CHANGES-2.x.txt (SNMP4J 2.x branch)
OK, I was hoping to not have to decipher the detailed information in these lists (some of the details aren’t obvious when it comes to identifying whether a v3 change is correspondingly present in v2, either as a fix or as a feature). Prefixes used to identify changes include: fixed, updated, improved, added, enhanced, etc. and it’s not straightforward to identify these as purely “feature additions”.
In general, new features will be added to the 3.x (latest) branch only. Back-porting will happen for 2.x for important bugfixes and improvements of existing features.
OK, that makes sense and I understand the challenges associated with trying to maintain two different versions ;). It is too bad that the Java 9 required aspects couldn’t be sufficiently isolated so that the API couldn’t independently (and in parallel) evolve identically between the two versions (I doubt the underlying Java 9 items sufficiently interfere with the API design to fundamentally prevent this).
Java 8 will be in play for many more years as independent Java vendors (Amazon/Coretto, Adopt) look to provide long term support. Moreover, there is decent resistance to moving to Java 9+ on the application front as there is a significant barrier to entry when considering some pre-existing Java 8 based applications. I’d be curious in hearing your opinion on this as a Java framework vendor (what mix of SNMP4J v2 vs. v3 uptake do you see?). It’s at least good to know that SNMP4J v2 is keeping current and is getting active attention/bug fixes.