Re: Changes in Java 8 generics breaking Camel

2014-12-22 Thread andrewcelerity
I tested with the snapshot version and it works great.  Thanks for the 
quick fix!

What's the expected time for 2.14.2 to be a stable release?

On 12/21/14, 8:16 AM, Babak Vahdat [via Camel] wrote:
 Hi

 Thanks for raising the ticket and providing the sample-app. The 
 ticket is now fixed and your provided sample-app works on Java 8 as well.

 You’re welcome to test it by your “real-app” as well (either using the 
 2.14.2-SNAPSHOT or the master branch) and report us back if it would 
 now work by your “real-app” on Java 8 as well.

 BTW all this is the side effect of:
 https://bugs.openjdk.java.net/browse/JDK-6695379

 Babak

 andrewcelerity wrote
 I opened a Jira ticket and attached a sample app that replicates
 the problem.  Hopefully it's an easy fix.

 https://issues.apache.org/jira/browse/CAMEL-8160



 
 If you reply to this email, your message will be added to the 
 discussion below:
 http://camel.465427.n5.nabble.com/Changes-in-Java-8-generics-breaking-Camel-tp5760638p5760975.html
  

 To unsubscribe from Changes in Java 8 generics breaking Camel, click 
 here 
 http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=5760638code=YW5kcmV3QGNlbGVyaXR5Z2xvYmFsLmNvbXw1NzYwNjM4fDE3MzQ0Njg1NDA=.
 NAML 
 http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespacebreadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml
  






--
View this message in context: 
http://camel.465427.n5.nabble.com/Changes-in-Java-8-generics-breaking-Camel-tp5760638p5760990.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Changes in Java 8 generics breaking Camel

2014-12-18 Thread andrewcelerity
I opened a Jira ticket and attached a sample app that replicates the problem. 
Hopefully it's an easy fix.

https://issues.apache.org/jira/browse/CAMEL-8160





--
View this message in context: 
http://camel.465427.n5.nabble.com/Changes-in-Java-8-generics-breaking-Camel-tp5760638p5760876.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Changes in Java 8 generics breaking Camel

2014-12-15 Thread andrewcelerity
I am using Camel 2.14.0.

I do see one problem, though maybe it's just a lack of understanding of the
process you're using to compare results.  Annotations like @Consume have a
retention policy of runtime, meaning the compiler leaves them in the
compiled class file (I believe).  Your decompiled code does not show any
annotations.

I fully expect to see the same methods generated via Java 7 and 8, but the
annotations on them should be different in the 8 generated byte code.





--
View this message in context: 
http://camel.465427.n5.nabble.com/Changes-in-Java-8-generics-breaking-Camel-tp5760638p5760703.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Changes in Java 8 generics breaking Camel

2014-12-12 Thread andrewcelerity
Java 8 made a changes to generics that is currently not allowing camel to
start up, and if it did start up would be in a bad state.  Bridge methods
now get a copy of the annotations placed on the real method.  This is bad
when combined with Camel annotations.  For example:

interface SomethingT extends SomeType {
  void doSomethingWith(T it);
}

class Foo implements SomethingRealType {

  @Consume(uri = ...)
  @Override
  public void doSomethingWith(RealType it) {
 .
  }

}

The class the compiler makes actually looks like this because of type
erasure:
class Foo implements SomethingRealType {

  @Consume(uri = ...)
  @Override
  public void doSomethingWith(RealType it) {
 .
  }

  @Consume(uri = ...)
  @Override
  public void doSomethingWith(SomeType it) {
 .
  }

}


This is a breaking change as far as Camel is concered for 2 reasons:
  1. BeanInfo.isValidMethod does not allow for bridge methods
  2. There are now 2 methods listening to the same endpoint

Is this a bug that should be reported?  Any ideas on a workaround?  I'm
about to downgrade to java 7.



--
View this message in context: 
http://camel.465427.n5.nabble.com/Changes-in-Java-8-generics-breaking-Camel-tp5760638.html
Sent from the Camel - Users mailing list archive at Nabble.com.