-
Bug
-
Resolution: Done
-
Major
-
JBossAS-4.0.3 Final
-
None
Here we will check for IDL keyword collisions. This means that the repository ID for foo.exception.SomeException is "IDL:foo/_exception/SomeEx:1.0" (note the underscore in front of the exception module name).
JBoss currently does not check the package name for keywork collisions.
Following fast hack solves the above issue:
Inside org.jboss.iiop.rmi.ExceptionAnalysis
protected void doAnalyze()
throws RMIIIOPViolationException
{
super.doAnalyze();
if (!Exception.class.isAssignableFrom(cls) ||
RuntimeException.class.isAssignableFrom(cls))
throw new RMIIIOPViolationException(
"Exception type " + cls.getName() +
" must be a checked exception class.", "1.2.6");
// calculate exceptionRepositoryId
String s = null;
StringTokenizer token = new StringTokenizer(cls.getPackage().getName(), ".");
while(token.hasMoreTokens())
StringBuffer b = new StringBuffer("IDL:");
b.append(s);
b.append('/');
String base = cls.getName();
base = base.substring(base.lastIndexOf('.')+1);
if (base.endsWith("Exception"))
base = base.substring(0, base.length()-9);
base = Util.javaToIDLName(base + "Ex");
b.append(base).append(":1.0");
exceptionRepositoryId = b.toString();
}