[jboss-cvs] JBossAS SVN: r95860 - trunk/varia/src/main/java/org/jboss/jmx/adaptor/snmp/agent.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Fri Oct 30 13:23:00 EDT 2009
Author: ALRubinger
Date: 2009-10-30 13:23:00 -0400 (Fri, 30 Oct 2009)
New Revision: 95860
Modified:
trunk/varia/src/main/java/org/jboss/jmx/adaptor/snmp/agent/TrapEmitter.java
Log:
[JBAS-7414] Throw an intelligent exception when managers.xml cannot be found
Modified: trunk/varia/src/main/java/org/jboss/jmx/adaptor/snmp/agent/TrapEmitter.java
===================================================================
--- trunk/varia/src/main/java/org/jboss/jmx/adaptor/snmp/agent/TrapEmitter.java 2009-10-30 17:17:45 UTC (rev 95859)
+++ trunk/varia/src/main/java/org/jboss/jmx/adaptor/snmp/agent/TrapEmitter.java 2009-10-30 17:23:00 UTC (rev 95860)
@@ -232,7 +232,12 @@
try
{
// locate managers.xml
- is = this.getClass().getResourceAsStream(this.managersResName);
+ final String resName = this.managersResName;
+ is = this.getClass().getResourceAsStream(resName);
+ if (is == null)
+ {
+ throw new IllegalStateException("Cannot locate classloader resource: " + resName);
+ }
// create unmarshaller
Unmarshaller unmarshaller = UnmarshallerFactory.newInstance()
More information about the jboss-cvs-commits
mailing list