[JBoss JIRA] (JASSIST-164) MethodHandler.invoke() should not be throwing Throwable as it may be invoked from forwarder methods that do not have a throws clause
by Nikita Tovstoles (JIRA)
Nikita Tovstoles created JASSIST-164:
----------------------------------------
Summary: MethodHandler.invoke() should not be throwing Throwable as it may be invoked from forwarder methods that do not have a throws clause
Key: JASSIST-164
URL: https://issues.jboss.org/browse/JASSIST-164
Project: Javassist
Issue Type: Bug
Affects Versions: 3.16.1-GA
Reporter: Nikita Tovstoles
Assignee: Shigeru Chiba
Given some method to be proxied, like a typical POJO getter:
{code}
public String getName() {
return this.name;
}
{code}
...ProxyFactory.makeForwarder() generates a method that includes call to MethodHandler.invoke(), ie:
{code}
//decompiled proxy
public final String getName()
{
//other stuff
return (String)this.handler.invoke(this, arrayOfMethod[14], arrayOfMethod[15], new Object[0]);
}
{code}
the code above would not compile because handler.invoke() throws Throwable but getName() does not have a throws clause. Since there is no guarantee that a proxied method will declare a throws clause, invoke() should only be throwing RuntimeExceptions and 'throws Throwable' should be removed from the method signature - or this method should not be used when proxying arbitrary methods.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 10 months
[JBoss JIRA] (JBJCA-832) ironjacamar maven validator throws IllegalStateException: Unable to find an annotation scanner implementa tion
by Dupont Dupont (JIRA)
Dupont Dupont created JBJCA-832:
-----------------------------------
Summary: ironjacamar maven validator throws IllegalStateException: Unable to find an annotation scanner implementa tion
Key: JBJCA-832
URL: https://issues.jboss.org/browse/JBJCA-832
Project: IronJacamar
Issue Type: Bug
Affects Versions: 1.1.0.Alpha7
Reporter: Dupont Dupont
Assignee: Jesper Pedersen
ironjacamar-validator-maven throws the following error :
{code}
java.lang.IllegalStateException: Unable to find an annotation scanner implementa
tion
at org.jboss.jca.common.spi.annotations.repository.AnnotationScannerFact
ory.getAnnotationScanner(AnnotationScannerFactory.java:72)
at org.jboss.jca.validator.Validation.validate(Validation.java:148)
at org.jboss.jca.validator.maven.ValidatorMojo.execute(ValidatorMojo.jav
a:72)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(Default
BuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:209)
{code}
The following dependency appears to be missing from the plugin :
{code}
<dependencies>
<dependency>
<groupId>org.jboss.ironjacamar</groupId>
<artifactId>ironjacamar-common-impl-papaki</artifactId>
<version>1.1.0.Alpha7</version>
</dependency>
</dependencies>
{code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 10 months