[jboss-cvs] JBossAS SVN: r95859 - branches/Branch_5_x/varia/src/main/org/jboss/jmx/adaptor/snmp/agent.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Fri Oct 30 13:17:45 EDT 2009
Author: ALRubinger
Date: 2009-10-30 13:17:45 -0400 (Fri, 30 Oct 2009)
New Revision: 95859
Modified:
branches/Branch_5_x/varia/src/main/org/jboss/jmx/adaptor/snmp/agent/TrapEmitter.java
Log:
[JBAS-7414] Throw an intelligent exception when managers.xml cannot be found
Modified: branches/Branch_5_x/varia/src/main/org/jboss/jmx/adaptor/snmp/agent/TrapEmitter.java
===================================================================
--- branches/Branch_5_x/varia/src/main/org/jboss/jmx/adaptor/snmp/agent/TrapEmitter.java 2009-10-30 17:11:18 UTC (rev 95858)
+++ branches/Branch_5_x/varia/src/main/org/jboss/jmx/adaptor/snmp/agent/TrapEmitter.java 2009-10-30 17:17:45 UTC (rev 95859)
@@ -233,7 +233,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