cederberg / mibble

Mibble is an open-source SNMP MIB parser library for Java.
https://www.mibble.org/
Other
113 stars 68 forks source link

Overriding hashtable entries - Bug? #22

Closed peske closed 7 years ago

peske commented 7 years ago

First - great work! Second - I'm going through code thinking about porting it to .NET Core. If I decide to do so - I'll contact you about licensing related stuff... Question: I've noted that in line https://github.com/cederberg/mibble/blob/master/src/java/net/percederberg/mibble/Mib.java#L184 old value can be overridden (multiple MibValueSymbol instances can have the same value). Is it expected behavior or it is a bug?

Thanks!

cederberg commented 7 years ago

Hmm. Yes, I guess it is possible to create MIB file that causes this behaviour. Haven't ever seen one though. Could be a good old warning here though. Especially since the code is inside the validate() method...

cederberg commented 7 years ago

Warnings now added to master branch (upcoming 2.10 release). Thanks!