Hi,

could you please create a Jira issue for this?

I think if you change line #237 to
if (!parameterTypeName.equals(signature[index].getClassName()) &&
!m.getParameterTypes()[index].getSimpleName().equals(signature[index].getClassName()))
{

it should work for you.

Regards
Carsten

2012/10/26 Johannes Schneider <[email protected]>:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi guys,
>
> I run in to that[1] problem.
> The method that is not found looks like that:
>
>
>> @Nonnull public static <T> Entry<? extends T> create( @Nonnull T
>> object,
> @Nonnull >byte[] expected ) {
>> }
>
> I have debugged this and it comes to that:
>
> in ClassScanner#237 parameters are compared. The second parameter of
> my method (byte[]) has a strange difference here:
>
> parameterTypeName: [B
> signature[index].getClassName(): byte[]
>
> So I think this might be related to the asm usage
> I *think* instead of "signature[index].getClassName()" there should be
> called
> signature[index].getDescriptor()
>
>
> Any idea how I could work around that problem (without changing my
> method's signature)?
>
>
> Thanks,
>
> Johannes
>
>
> [1]
> [ERROR] Failed to execute goal
> org.apache.felix:maven-scr-plugin:1.8.0:scr
> (generate-scr-scrdescriptor) on project test-utils:
> com.cedarsoft.serialization.test.utils.AbstractSerializerTest2 :
> Annotated method create not found. -> [Help 1]
> org.apache.maven.lifecycle.LifecycleExecutionException: Failed to
> execute goal org.apache.felix:maven-scr-plugin:1.8.0:scr
> (generate-scr-scrdescriptor) on project test-utils:
> com.cedarsoft.serialization.test.utils.AbstractSerializerTest2 :
> Annotated method create not found.
>         at
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
>         at
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
>         at
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
>         at
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
>         at
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
>         at
> org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
>         at
> org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
>         at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
>         at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>         at java.lang.reflect.Method.invoke(Method.java:601)
>         at
> org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
>         at
> org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
>         at
> org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
>         at
> org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
> Caused by: org.apache.maven.plugin.MojoExecutionException:
> com.cedarsoft.serialization.test.utils.AbstractSerializerTest2 :
> Annotated method create not found.
>         at
> org.apache.felix.scrplugin.mojo.SCRDescriptorMojo.execute(SCRDescriptorMojo.java:222)
>         at
> org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
>         at
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
>         ... 19 more
> Caused by: org.apache.felix.scrplugin.SCRDescriptorException:
> Annotated method create not found.
>         at
> org.apache.felix.scrplugin.helper.ClassScanner.extractAnnotation(ClassScanner.java:249)
>         at
> org.apache.felix.scrplugin.helper.ClassScanner.processClass(ClassScanner.java:180)
>         at
> org.apache.felix.scrplugin.helper.ClassScanner.scanSources(ClassScanner.java:143)
>         at
> org.apache.felix.scrplugin.SCRDescriptorGenerator.execute(SCRDescriptorGenerator.java:154)
>         at
> org.apache.felix.scrplugin.mojo.SCRDescriptorMojo.execute(SCRDescriptorMojo.java:217)
>         ... 21 more
>
> - --
> Johannes Schneider - blog.cedarsoft.com
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.11 (GNU/Linux)
>
> iQEcBAEBAgAGBQJQiql2AAoJEAytD9R7Qv6dPysIAMU6hslredbmhK3jBYpPFMRH
> 64zzPu74n1Q1XoczhdOq3E1rrzrizIw4NPBG3HdB3NrZh8VlTBREPixyJWoIZr8O
> 0msaQHUDcET47b5arEsja10Un4FIUDNXPTiRhDW3uHYKg6ATZqKDqOJahuqosnAX
> xe4y+JkDPoGeR4vjptLhdxrYINaoawV78E9kD7zf0p/4l5usTi5wVR9BnGe3G545
> G+OUE5+NjqMejqWW56O189hdOja6WrvAKYVuFPu4YODOYwByvYx6e8v23zzSMlyf
> QQFO45r8WZe6SXTT0e/3zCup4EoWlk5I789nUlI9fbWw4bTHr/apFYz0terD/Oo=
> =/lEB
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>



-- 
Carsten Ziegeler
[email protected]

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to