[SNMP4J] SmiManager.parse throwing checked exception
Frank Fock
fock at agentpp.com
Sat Jan 18 10:53:46 CET 2014
Helle Gene,
You were absolutely right, this bug was also caused by the incomplete
packaging configuration.
I have fixed that and extended the "after packaging" tests avoid similar
issues in the future.
You can download version 1.1.2 now.
Best regards,
Frank
Am 18.01.2014 00:19, schrieb Eugene Lockett:
> Hello there,
> I downloaded and started using the latest SNMP4J-SMI (v 1.1.1), and found some unexpected behavior with SmiManager.parse(). When called with an invalid OID, a java.text.ParseException is thrown, which is expected according the docs. The issue is this: ParseException is a checked exception, but at compile time i'm not allowed to handle it - it's as if SmiManager.parse() never had the "throws ParseException" clause. And this true of other methods of SmiManager as well…
>
> The following piece of code causes all sorts of compile time errors when built w/ 1.0.1 (as expected… buncha unhanded checked exceptions), but compiles successfully against v1.1.1:
>
>
> public void test() {
>
> SmiManager smiManager = new SmiManager(SNMP4J_SMI_LICENSE_KEY, new File("repo"));
>
> smiManager.listModules();
>
> smiManager.getLoadedModuleNames();
>
> smiManager.compile(new File("blah"));
>
> smiManager.parse("wacky.oid");
>
> }
>
>
>
> I noticed in a previous list message there was some build issues with enums… perhaps this is related?
>
>
> Thanks,
>
> Gene
> _______________________________________________
> SNMP4J mailing list
> SNMP4J at agentpp.org
> https://s16675406.onlinehome-server.info/mailman/listinfo/snmp4j
--
---
AGENT++
Maximilian-Kolbe-Str. 10
73257 Koengen, Germany
https://agentpp.com
Phone: +49 7024 8688230
Fax: +49 7024 8688231
More information about the SNMP4J
mailing list