You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Babak Vahdat (Created) (JIRA)" <ji...@apache.org> on 2012/01/15 18:03:39 UTC

[jira] [Created] (CAMEL-4899) Code Clean-Up (continued)

Code Clean-Up (continued)
-------------------------

                 Key: CAMEL-4899
                 URL: https://issues.apache.org/jira/browse/CAMEL-4899
             Project: Camel
          Issue Type: Improvement
    Affects Versions: 2.8.3
            Reporter: Babak Vahdat
            Assignee: Babak Vahdat
             Fix For: 2.9.1, 2.10.0


As Hadrian has already proposed by CAMEL-4796 this ticket has been created as it's continuation. The remaing tasks are therewith

- Removal of unused private memebers: Types, Constructors, Fields and Methods where applicable
- Remove the trailing whitespace on all lines, even on the empty ones

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Issue Comment Edited] (CAMEL-4899) Code Clean-Up (continued)

Posted by "Babak Vahdat (Issue Comment Edited) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-4899?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13187745#comment-13187745 ] 

Babak Vahdat edited comment on CAMEL-4899 at 1/17/12 3:18 PM:
--------------------------------------------------------------

@Claus currently almost all osgi blueprint tests fail on my box *WITHOUT EVEN APPLYING THE PATCH*, however currently I'm behind a HTTP-Proxy so maybe that's the reason (check the stacktrace below for this).
Do you mind to run these tests on your box to verify the regression? Otherwise I'll take this over for tonight.

BTW the attached patch overally intends to "remove the unused", so if an OSGi-lookup should have the side effect for a test to pass (*without* using the result of the lookup call) then IMHO this Lookup-API is really odd. However this's my own opinion & problem ;-) 

{code}
-------------------------------------------------------------------------------
Test set: org.apache.camel.itest.osgi.bean.validator.BeanValidatorTest
-------------------------------------------------------------------------------
Tests run: 2, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 7.437 sec <<< FAILURE!
testBeanValidatorRoute(org.apache.camel.itest.osgi.bean.validator.BeanValidatorTest)  Time elapsed: 5.156 sec  <<< ERROR!
java.lang.RuntimeException: URL [mvn:org.apache.felix/org.apache.felix.main/3.0.6] could not be resolved.
	at org.ops4j.pax.url.mvn.internal.Connection.getInputStream(Connection.java:195)
	at org.ops4j.pax.url.mvn.internal.AetherBridgeConnection.getInputStream(AetherBridgeConnection.java:68)
	at java.net.URL.openStream(URL.java:1010)
	at org.ops4j.pax.runner.platform.internal.StreamUtils.streamCopy(StreamUtils.java:105)
	at org.ops4j.pax.runner.platform.internal.PlatformImpl.download(PlatformImpl.java:642)
	at org.ops4j.pax.runner.platform.internal.PlatformImpl.downloadSystemFile(PlatformImpl.java:509)
	at org.ops4j.pax.runner.platform.internal.PlatformImpl.start(PlatformImpl.java:156)
	at org.ops4j.pax.runner.Run.startPlatform(Run.java:683)
	at org.ops4j.pax.runner.Run.start(Run.java:226)
	at org.ops4j.pax.runner.Run.start(Run.java:182)
	at org.ops4j.pax.exam.container.def.internal.PaxRunnerTestContainer.start(PaxRunnerTestContainer.java:282)
	at org.ops4j.pax.exam.junit.internal.JUnit4TestMethod.invoke(JUnit4TestMethod.java:142)
	at org.junit.internal.runners.MethodRoadie.runTestMethod(MethodRoadie.java:105)
	at org.junit.internal.runners.MethodRoadie$2.run(MethodRoadie.java:86)
	at org.ops4j.pax.exam.junit.internal.JUnit4MethodRoadie.runBeforesThenTestThenAfters(JUnit4MethodRoadie.java:60)
	at org.junit.internal.runners.MethodRoadie.runTest(MethodRoadie.java:84)
	at org.junit.internal.runners.MethodRoadie.run(MethodRoadie.java:49)
	at org.ops4j.pax.exam.junit.JUnit4TestRunner.invokeTestMethod(JUnit4TestRunner.java:246)
	at org.ops4j.pax.exam.junit.JUnit4TestRunner.runMethods(JUnit4TestRunner.java:196)
	at org.ops4j.pax.exam.junit.JUnit4TestRunner$2.run(JUnit4TestRunner.java:186)
	at org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:34)
	at org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:44)
	at org.ops4j.pax.exam.junit.JUnit4TestRunner.run(JUnit4TestRunner.java:182)
	at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:53)
	at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:119)
	at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:101)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.apache.maven.surefire.booter.ProviderFactory$ClassLoaderProxy.invoke(ProviderFactory.java:103)
	at $Proxy0.invoke(Unknown Source)
	at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:150)
	at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcess(SurefireStarter.java:74)
	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:69)

validateShouldSuccessWithExpliciteDefaultGroup(org.apache.camel.itest.osgi.bean.validator.BeanValidatorTest)  Time elapsed: 2.047 sec  <<< ERROR!
java.lang.RuntimeException: URL [mvn:org.apache.felix/org.apache.felix.main/3.0.6] could not be resolved.
	at org.ops4j.pax.url.mvn.internal.Connection.getInputStream(Connection.java:195)
	at org.ops4j.pax.url.mvn.internal.AetherBridgeConnection.getInputStream(AetherBridgeConnection.java:68)
	at java.net.URL.openStream(URL.java:1010)
	at org.ops4j.pax.runner.platform.internal.StreamUtils.streamCopy(StreamUtils.java:105)
	at org.ops4j.pax.runner.platform.internal.PlatformImpl.download(PlatformImpl.java:642)
	at org.ops4j.pax.runner.platform.internal.PlatformImpl.downloadSystemFile(PlatformImpl.java:509)
	at org.ops4j.pax.runner.platform.internal.PlatformImpl.start(PlatformImpl.java:156)
	at org.ops4j.pax.runner.Run.startPlatform(Run.java:683)
	at org.ops4j.pax.runner.Run.start(Run.java:226)
	at org.ops4j.pax.runner.Run.start(Run.java:182)
	at org.ops4j.pax.exam.container.def.internal.PaxRunnerTestContainer.start(PaxRunnerTestContainer.java:282)
	at org.ops4j.pax.exam.junit.internal.JUnit4TestMethod.invoke(JUnit4TestMethod.java:142)
	at org.junit.internal.runners.MethodRoadie.runTestMethod(MethodRoadie.java:105)
	at org.junit.internal.runners.MethodRoadie$2.run(MethodRoadie.java:86)
	at org.ops4j.pax.exam.junit.internal.JUnit4MethodRoadie.runBeforesThenTestThenAfters(JUnit4MethodRoadie.java:60)
	at org.junit.internal.runners.MethodRoadie.runTest(MethodRoadie.java:84)
	at org.junit.internal.runners.MethodRoadie.run(MethodRoadie.java:49)
	at org.ops4j.pax.exam.junit.JUnit4TestRunner.invokeTestMethod(JUnit4TestRunner.java:246)
	at org.ops4j.pax.exam.junit.JUnit4TestRunner.runMethods(JUnit4TestRunner.java:196)
	at org.ops4j.pax.exam.junit.JUnit4TestRunner$2.run(JUnit4TestRunner.java:186)
	at org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:34)
	at org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:44)
	at org.ops4j.pax.exam.junit.JUnit4TestRunner.run(JUnit4TestRunner.java:182)
	at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:53)
	at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:119)
	at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:101)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.apache.maven.surefire.booter.ProviderFactory$ClassLoaderProxy.invoke(ProviderFactory.java:103)
	at $Proxy0.invoke(Unknown Source)
	at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:150)
	at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcess(SurefireStarter.java:74)
	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:69)
{code}
                
      was (Author: bvahdat):
    @Claus currently almost all osgi blueprint tests fail on my box *WITHOUT EVEN APPLYING THE PATCH*, however currently I'm behind a HTTP-Proxy so maybe that's the reason (check the stacktrace below for this).
Do you mind to run these tests on your box to verify the regression? Otherwise I'll take this over for tonight.

BTW the attached patch overally intends to "remove the unused", so if an OSGi-lookup should have the side effect for a test to pass then IMHO this Lookup-API is really odd. However this's my own opinion & problem ;-) 

{code}
-------------------------------------------------------------------------------
Test set: org.apache.camel.itest.osgi.bean.validator.BeanValidatorTest
-------------------------------------------------------------------------------
Tests run: 2, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 7.437 sec <<< FAILURE!
testBeanValidatorRoute(org.apache.camel.itest.osgi.bean.validator.BeanValidatorTest)  Time elapsed: 5.156 sec  <<< ERROR!
java.lang.RuntimeException: URL [mvn:org.apache.felix/org.apache.felix.main/3.0.6] could not be resolved.
	at org.ops4j.pax.url.mvn.internal.Connection.getInputStream(Connection.java:195)
	at org.ops4j.pax.url.mvn.internal.AetherBridgeConnection.getInputStream(AetherBridgeConnection.java:68)
	at java.net.URL.openStream(URL.java:1010)
	at org.ops4j.pax.runner.platform.internal.StreamUtils.streamCopy(StreamUtils.java:105)
	at org.ops4j.pax.runner.platform.internal.PlatformImpl.download(PlatformImpl.java:642)
	at org.ops4j.pax.runner.platform.internal.PlatformImpl.downloadSystemFile(PlatformImpl.java:509)
	at org.ops4j.pax.runner.platform.internal.PlatformImpl.start(PlatformImpl.java:156)
	at org.ops4j.pax.runner.Run.startPlatform(Run.java:683)
	at org.ops4j.pax.runner.Run.start(Run.java:226)
	at org.ops4j.pax.runner.Run.start(Run.java:182)
	at org.ops4j.pax.exam.container.def.internal.PaxRunnerTestContainer.start(PaxRunnerTestContainer.java:282)
	at org.ops4j.pax.exam.junit.internal.JUnit4TestMethod.invoke(JUnit4TestMethod.java:142)
	at org.junit.internal.runners.MethodRoadie.runTestMethod(MethodRoadie.java:105)
	at org.junit.internal.runners.MethodRoadie$2.run(MethodRoadie.java:86)
	at org.ops4j.pax.exam.junit.internal.JUnit4MethodRoadie.runBeforesThenTestThenAfters(JUnit4MethodRoadie.java:60)
	at org.junit.internal.runners.MethodRoadie.runTest(MethodRoadie.java:84)
	at org.junit.internal.runners.MethodRoadie.run(MethodRoadie.java:49)
	at org.ops4j.pax.exam.junit.JUnit4TestRunner.invokeTestMethod(JUnit4TestRunner.java:246)
	at org.ops4j.pax.exam.junit.JUnit4TestRunner.runMethods(JUnit4TestRunner.java:196)
	at org.ops4j.pax.exam.junit.JUnit4TestRunner$2.run(JUnit4TestRunner.java:186)
	at org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:34)
	at org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:44)
	at org.ops4j.pax.exam.junit.JUnit4TestRunner.run(JUnit4TestRunner.java:182)
	at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:53)
	at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:119)
	at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:101)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.apache.maven.surefire.booter.ProviderFactory$ClassLoaderProxy.invoke(ProviderFactory.java:103)
	at $Proxy0.invoke(Unknown Source)
	at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:150)
	at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcess(SurefireStarter.java:74)
	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:69)

validateShouldSuccessWithExpliciteDefaultGroup(org.apache.camel.itest.osgi.bean.validator.BeanValidatorTest)  Time elapsed: 2.047 sec  <<< ERROR!
java.lang.RuntimeException: URL [mvn:org.apache.felix/org.apache.felix.main/3.0.6] could not be resolved.
	at org.ops4j.pax.url.mvn.internal.Connection.getInputStream(Connection.java:195)
	at org.ops4j.pax.url.mvn.internal.AetherBridgeConnection.getInputStream(AetherBridgeConnection.java:68)
	at java.net.URL.openStream(URL.java:1010)
	at org.ops4j.pax.runner.platform.internal.StreamUtils.streamCopy(StreamUtils.java:105)
	at org.ops4j.pax.runner.platform.internal.PlatformImpl.download(PlatformImpl.java:642)
	at org.ops4j.pax.runner.platform.internal.PlatformImpl.downloadSystemFile(PlatformImpl.java:509)
	at org.ops4j.pax.runner.platform.internal.PlatformImpl.start(PlatformImpl.java:156)
	at org.ops4j.pax.runner.Run.startPlatform(Run.java:683)
	at org.ops4j.pax.runner.Run.start(Run.java:226)
	at org.ops4j.pax.runner.Run.start(Run.java:182)
	at org.ops4j.pax.exam.container.def.internal.PaxRunnerTestContainer.start(PaxRunnerTestContainer.java:282)
	at org.ops4j.pax.exam.junit.internal.JUnit4TestMethod.invoke(JUnit4TestMethod.java:142)
	at org.junit.internal.runners.MethodRoadie.runTestMethod(MethodRoadie.java:105)
	at org.junit.internal.runners.MethodRoadie$2.run(MethodRoadie.java:86)
	at org.ops4j.pax.exam.junit.internal.JUnit4MethodRoadie.runBeforesThenTestThenAfters(JUnit4MethodRoadie.java:60)
	at org.junit.internal.runners.MethodRoadie.runTest(MethodRoadie.java:84)
	at org.junit.internal.runners.MethodRoadie.run(MethodRoadie.java:49)
	at org.ops4j.pax.exam.junit.JUnit4TestRunner.invokeTestMethod(JUnit4TestRunner.java:246)
	at org.ops4j.pax.exam.junit.JUnit4TestRunner.runMethods(JUnit4TestRunner.java:196)
	at org.ops4j.pax.exam.junit.JUnit4TestRunner$2.run(JUnit4TestRunner.java:186)
	at org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:34)
	at org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:44)
	at org.ops4j.pax.exam.junit.JUnit4TestRunner.run(JUnit4TestRunner.java:182)
	at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:53)
	at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:119)
	at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:101)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.apache.maven.surefire.booter.ProviderFactory$ClassLoaderProxy.invoke(ProviderFactory.java:103)
	at $Proxy0.invoke(Unknown Source)
	at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:150)
	at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcess(SurefireStarter.java:74)
	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:69)
{code}
                  
> Code Clean-Up (continued)
> -------------------------
>
>                 Key: CAMEL-4899
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4899
>             Project: Camel
>          Issue Type: Improvement
>    Affects Versions: 2.8.3
>            Reporter: Babak Vahdat
>            Assignee: Babak Vahdat
>             Fix For: 2.10.0
>
>         Attachments: CAMEL-4899-remove-unused.patch
>
>
> As Hadrian has already proposed by CAMEL-4796 this ticket has been created as it's continuation. The remaing tasks are therewith
> - Removal of unused private memebers: Types, Constructors, Fields and Methods where applicable
> - Remove the trailing whitespace on all lines, even on the empty ones

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CAMEL-4899) Code Clean-Up (continued)

Posted by "Babak Vahdat (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-4899?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13188562#comment-13188562 ] 

Babak Vahdat commented on CAMEL-4899:
-------------------------------------

I've already applied the attached patch into the trunk (by myself :-)) as all the unit-tests by

{code}
camel-hazelcast
camel-itest-osgi
camel-jcr
camel-mina2
{code}

passed on my *iMac* box (which were at most affected by this patch).

Nevertheless I'll keep an eye on the CI-Servers tomorrow morning as well to make sure of the fulfilled regression.
                
> Code Clean-Up (continued)
> -------------------------
>
>                 Key: CAMEL-4899
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4899
>             Project: Camel
>          Issue Type: Improvement
>    Affects Versions: 2.8.3
>            Reporter: Babak Vahdat
>            Assignee: Babak Vahdat
>             Fix For: 2.10.0
>
>         Attachments: CAMEL-4899-remove-unused.patch
>
>
> As Hadrian has already proposed by CAMEL-4796 this ticket has been created as it's continuation. The remaing tasks are therewith
> - Removal of unused private memebers: Types, Constructors, Fields and Methods where applicable
> - Remove the trailing whitespace on all lines, even on the empty ones

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (CAMEL-4899) Code Clean-Up (continued)

Posted by "Babak Vahdat (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-4899?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Babak Vahdat resolved CAMEL-4899.
---------------------------------

    Resolution: Fixed
    
> Code Clean-Up (continued)
> -------------------------
>
>                 Key: CAMEL-4899
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4899
>             Project: Camel
>          Issue Type: Improvement
>    Affects Versions: 2.8.3
>            Reporter: Babak Vahdat
>            Assignee: Babak Vahdat
>             Fix For: 2.10.0
>
>         Attachments: CAMEL-4899-remove-unused.patch
>
>
> As Hadrian has already proposed by CAMEL-4796 this ticket has been created as it's continuation. The remaing tasks are therewith
> - Removal of unused private members: Types, Constructors, Fields and Methods where applicable
> - Remove the trailing whitespace on all lines, even on the empty ones

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Issue Comment Edited] (CAMEL-4899) Code Clean-Up (continued)

Posted by "Babak Vahdat (Issue Comment Edited) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-4899?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13186603#comment-13186603 ] 

Babak Vahdat edited comment on CAMEL-4899 at 1/16/12 12:44 AM:
---------------------------------------------------------------

Attached the patch concerning "remove unused" with some extra sugar concerning:

- removal of the deprecated API usages (and corresponding SuppressWarning("deprecated")) in bunch of the places like:

{code}
replace the deprecated constructor org.apache.camel.component.mock.MockEndpoint() usage with getMockEndpoint() API
javax.jcr.Node.getIdentifier() usage instead of javax.jcr.Node.getUUID()
javax.jcr.Session.getNodeByIdentifier() usage instead of javax.jcr.Session.getNodeByUUID()
org.jivesoftware.smack.XMPPConnection.addPacketSendingListener() usage instead of org.jivesoftware.smack.XMPPConnection.addPacketWriterListener()
{code}

- still removal of some unnecessary casts
- still removal of some unused imports

Note: at the first glance the change made by

{code}
org.apache.camel.component.mina2.Mina2Consumer
{code}

could seem that as if the removal of the fields

{code}
- noReplyLogger
- acceptorConfig
- sync
{code}

would be "too much" however looking deeply into it I found out that all those member variables are *unused* or their usage-chain in the class itself were again *unused*.

Note: unfortunately with or without the attached path there're failed unit-tests by:


{code}
- camel-hazelcast
- camel-mina2
{code}

                
      was (Author: bvahdat):
    Attached the patch concerning "remove unused" with some extra sugar concerning:

- removal of the deprecated API usages (and corresponding SuppressWarning("deprecated")) in bunch of the places like the API's:

{code}
new org.apache.camel.component.mock.MockEndpoint("mock:foo")
getIdentifier() method usage instead of getUUID() by javax.jcr.Node
getNodeByIdentifier() method usage instead of getNodeByUUID() by javax.jcr.Session
{code}

- still removal of some unnecessary casts
- still removal of some unused imports

Note: at the first glance the change made for

{code}
org.apache.camel.component.mina2.Mina2Consumer
{code}

could seem that as if the removal of the fields

{code}
- noReplyLogger
- acceptorConfig
- sync
{code}

would be "too much" however looking deeply into it I found out that all those member variables are *unused* or their usage-chain in the class itself were again *unused*.
                  
> Code Clean-Up (continued)
> -------------------------
>
>                 Key: CAMEL-4899
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4899
>             Project: Camel
>          Issue Type: Improvement
>    Affects Versions: 2.8.3
>            Reporter: Babak Vahdat
>            Assignee: Babak Vahdat
>             Fix For: 2.9.1, 2.10.0
>
>         Attachments: CAMEL-4899-remove-unused.patch
>
>
> As Hadrian has already proposed by CAMEL-4796 this ticket has been created as it's continuation. The remaing tasks are therewith
> - Removal of unused private memebers: Types, Constructors, Fields and Methods where applicable
> - Remove the trailing whitespace on all lines, even on the empty ones

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CAMEL-4899) Code Clean-Up (continued)

Posted by "Babak Vahdat (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-4899?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13187745#comment-13187745 ] 

Babak Vahdat commented on CAMEL-4899:
-------------------------------------

@Claus currently almost all osgi blueprint tests fail on my box *WITHOUT EVEN APPLYING THE PATCH*, however currently I'm behind a HTTP-Proxy so maybe that's the reason (check the stacktrace below for this).
Do you mind to run these tests on your box to verify the regression? Otherwise I'll take this over for tonight.

BTW the attached patch overally intends to "remove the unused", so if an OSGi-lookup should have the side effect for a test to pass then IMHO this Lookup-API is really odd. However this's my own opinion & problem ;-) 

{code}
-------------------------------------------------------------------------------
Test set: org.apache.camel.itest.osgi.bean.validator.BeanValidatorTest
-------------------------------------------------------------------------------
Tests run: 2, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 7.437 sec <<< FAILURE!
testBeanValidatorRoute(org.apache.camel.itest.osgi.bean.validator.BeanValidatorTest)  Time elapsed: 5.156 sec  <<< ERROR!
java.lang.RuntimeException: URL [mvn:org.apache.felix/org.apache.felix.main/3.0.6] could not be resolved.
	at org.ops4j.pax.url.mvn.internal.Connection.getInputStream(Connection.java:195)
	at org.ops4j.pax.url.mvn.internal.AetherBridgeConnection.getInputStream(AetherBridgeConnection.java:68)
	at java.net.URL.openStream(URL.java:1010)
	at org.ops4j.pax.runner.platform.internal.StreamUtils.streamCopy(StreamUtils.java:105)
	at org.ops4j.pax.runner.platform.internal.PlatformImpl.download(PlatformImpl.java:642)
	at org.ops4j.pax.runner.platform.internal.PlatformImpl.downloadSystemFile(PlatformImpl.java:509)
	at org.ops4j.pax.runner.platform.internal.PlatformImpl.start(PlatformImpl.java:156)
	at org.ops4j.pax.runner.Run.startPlatform(Run.java:683)
	at org.ops4j.pax.runner.Run.start(Run.java:226)
	at org.ops4j.pax.runner.Run.start(Run.java:182)
	at org.ops4j.pax.exam.container.def.internal.PaxRunnerTestContainer.start(PaxRunnerTestContainer.java:282)
	at org.ops4j.pax.exam.junit.internal.JUnit4TestMethod.invoke(JUnit4TestMethod.java:142)
	at org.junit.internal.runners.MethodRoadie.runTestMethod(MethodRoadie.java:105)
	at org.junit.internal.runners.MethodRoadie$2.run(MethodRoadie.java:86)
	at org.ops4j.pax.exam.junit.internal.JUnit4MethodRoadie.runBeforesThenTestThenAfters(JUnit4MethodRoadie.java:60)
	at org.junit.internal.runners.MethodRoadie.runTest(MethodRoadie.java:84)
	at org.junit.internal.runners.MethodRoadie.run(MethodRoadie.java:49)
	at org.ops4j.pax.exam.junit.JUnit4TestRunner.invokeTestMethod(JUnit4TestRunner.java:246)
	at org.ops4j.pax.exam.junit.JUnit4TestRunner.runMethods(JUnit4TestRunner.java:196)
	at org.ops4j.pax.exam.junit.JUnit4TestRunner$2.run(JUnit4TestRunner.java:186)
	at org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:34)
	at org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:44)
	at org.ops4j.pax.exam.junit.JUnit4TestRunner.run(JUnit4TestRunner.java:182)
	at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:53)
	at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:119)
	at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:101)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.apache.maven.surefire.booter.ProviderFactory$ClassLoaderProxy.invoke(ProviderFactory.java:103)
	at $Proxy0.invoke(Unknown Source)
	at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:150)
	at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcess(SurefireStarter.java:74)
	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:69)

validateShouldSuccessWithExpliciteDefaultGroup(org.apache.camel.itest.osgi.bean.validator.BeanValidatorTest)  Time elapsed: 2.047 sec  <<< ERROR!
java.lang.RuntimeException: URL [mvn:org.apache.felix/org.apache.felix.main/3.0.6] could not be resolved.
	at org.ops4j.pax.url.mvn.internal.Connection.getInputStream(Connection.java:195)
	at org.ops4j.pax.url.mvn.internal.AetherBridgeConnection.getInputStream(AetherBridgeConnection.java:68)
	at java.net.URL.openStream(URL.java:1010)
	at org.ops4j.pax.runner.platform.internal.StreamUtils.streamCopy(StreamUtils.java:105)
	at org.ops4j.pax.runner.platform.internal.PlatformImpl.download(PlatformImpl.java:642)
	at org.ops4j.pax.runner.platform.internal.PlatformImpl.downloadSystemFile(PlatformImpl.java:509)
	at org.ops4j.pax.runner.platform.internal.PlatformImpl.start(PlatformImpl.java:156)
	at org.ops4j.pax.runner.Run.startPlatform(Run.java:683)
	at org.ops4j.pax.runner.Run.start(Run.java:226)
	at org.ops4j.pax.runner.Run.start(Run.java:182)
	at org.ops4j.pax.exam.container.def.internal.PaxRunnerTestContainer.start(PaxRunnerTestContainer.java:282)
	at org.ops4j.pax.exam.junit.internal.JUnit4TestMethod.invoke(JUnit4TestMethod.java:142)
	at org.junit.internal.runners.MethodRoadie.runTestMethod(MethodRoadie.java:105)
	at org.junit.internal.runners.MethodRoadie$2.run(MethodRoadie.java:86)
	at org.ops4j.pax.exam.junit.internal.JUnit4MethodRoadie.runBeforesThenTestThenAfters(JUnit4MethodRoadie.java:60)
	at org.junit.internal.runners.MethodRoadie.runTest(MethodRoadie.java:84)
	at org.junit.internal.runners.MethodRoadie.run(MethodRoadie.java:49)
	at org.ops4j.pax.exam.junit.JUnit4TestRunner.invokeTestMethod(JUnit4TestRunner.java:246)
	at org.ops4j.pax.exam.junit.JUnit4TestRunner.runMethods(JUnit4TestRunner.java:196)
	at org.ops4j.pax.exam.junit.JUnit4TestRunner$2.run(JUnit4TestRunner.java:186)
	at org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:34)
	at org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:44)
	at org.ops4j.pax.exam.junit.JUnit4TestRunner.run(JUnit4TestRunner.java:182)
	at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:53)
	at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:119)
	at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:101)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.apache.maven.surefire.booter.ProviderFactory$ClassLoaderProxy.invoke(ProviderFactory.java:103)
	at $Proxy0.invoke(Unknown Source)
	at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:150)
	at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcess(SurefireStarter.java:74)
	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:69)
{code}
                
> Code Clean-Up (continued)
> -------------------------
>
>                 Key: CAMEL-4899
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4899
>             Project: Camel
>          Issue Type: Improvement
>    Affects Versions: 2.8.3
>            Reporter: Babak Vahdat
>            Assignee: Babak Vahdat
>             Fix For: 2.10.0
>
>         Attachments: CAMEL-4899-remove-unused.patch
>
>
> As Hadrian has already proposed by CAMEL-4796 this ticket has been created as it's continuation. The remaing tasks are therewith
> - Removal of unused private memebers: Types, Constructors, Fields and Methods where applicable
> - Remove the trailing whitespace on all lines, even on the empty ones

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CAMEL-4899) Code Clean-Up (continued)

Posted by "Babak Vahdat (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-4899?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Babak Vahdat updated CAMEL-4899:
--------------------------------

    Attachment: CAMEL-4899-remove-unused.patch
    
> Code Clean-Up (continued)
> -------------------------
>
>                 Key: CAMEL-4899
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4899
>             Project: Camel
>          Issue Type: Improvement
>    Affects Versions: 2.8.3
>            Reporter: Babak Vahdat
>            Assignee: Babak Vahdat
>             Fix For: 2.9.1, 2.10.0
>
>         Attachments: CAMEL-4899-remove-unused.patch
>
>
> As Hadrian has already proposed by CAMEL-4796 this ticket has been created as it's continuation. The remaing tasks are therewith
> - Removal of unused private memebers: Types, Constructors, Fields and Methods where applicable
> - Remove the trailing whitespace on all lines, even on the empty ones

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CAMEL-4899) Code Clean-Up (continued)

Posted by "Babak Vahdat (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-4899?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13187706#comment-13187706 ] 

Babak Vahdat commented on CAMEL-4899:
-------------------------------------

No :-(
Let me quickly check the osgi blueprint as well.
                
> Code Clean-Up (continued)
> -------------------------
>
>                 Key: CAMEL-4899
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4899
>             Project: Camel
>          Issue Type: Improvement
>    Affects Versions: 2.8.3
>            Reporter: Babak Vahdat
>            Assignee: Babak Vahdat
>             Fix For: 2.10.0
>
>         Attachments: CAMEL-4899-remove-unused.patch
>
>
> As Hadrian has already proposed by CAMEL-4796 this ticket has been created as it's continuation. The remaing tasks are therewith
> - Removal of unused private memebers: Types, Constructors, Fields and Methods where applicable
> - Remove the trailing whitespace on all lines, even on the empty ones

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CAMEL-4899) Code Clean-Up (continued)

Posted by "Claus Ibsen (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-4899?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13187698#comment-13187698 ] 

Claus Ibsen commented on CAMEL-4899:
------------------------------------

Did you test the osgi blueprint tests? As you remove a codeline, that does some osgi blueprint container lookup. Just that this may cause the test to fail. So I just want to be sure before trying to apply the patch.
                
> Code Clean-Up (continued)
> -------------------------
>
>                 Key: CAMEL-4899
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4899
>             Project: Camel
>          Issue Type: Improvement
>    Affects Versions: 2.8.3
>            Reporter: Babak Vahdat
>            Assignee: Babak Vahdat
>             Fix For: 2.10.0
>
>         Attachments: CAMEL-4899-remove-unused.patch
>
>
> As Hadrian has already proposed by CAMEL-4796 this ticket has been created as it's continuation. The remaing tasks are therewith
> - Removal of unused private memebers: Types, Constructors, Fields and Methods where applicable
> - Remove the trailing whitespace on all lines, even on the empty ones

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CAMEL-4899) Code Clean-Up (continued)

Posted by "Babak Vahdat (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-4899?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Babak Vahdat updated CAMEL-4899:
--------------------------------

    Description: 
As Hadrian has already proposed by CAMEL-4796 this ticket has been created as it's continuation. The remaing tasks are therewith

- Removal of unused private members: Types, Constructors, Fields and Methods where applicable
- Remove the trailing whitespace on all lines, even on the empty ones

  was:
As Hadrian has already proposed by CAMEL-4796 this ticket has been created as it's continuation. The remaing tasks are therewith

- Removal of unused private memebers: Types, Constructors, Fields and Methods where applicable
- Remove the trailing whitespace on all lines, even on the empty ones

    
> Code Clean-Up (continued)
> -------------------------
>
>                 Key: CAMEL-4899
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4899
>             Project: Camel
>          Issue Type: Improvement
>    Affects Versions: 2.8.3
>            Reporter: Babak Vahdat
>            Assignee: Babak Vahdat
>             Fix For: 2.10.0
>
>         Attachments: CAMEL-4899-remove-unused.patch
>
>
> As Hadrian has already proposed by CAMEL-4796 this ticket has been created as it's continuation. The remaing tasks are therewith
> - Removal of unused private members: Types, Constructors, Fields and Methods where applicable
> - Remove the trailing whitespace on all lines, even on the empty ones

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CAMEL-4899) Code Clean-Up (continued)

Posted by "Babak Vahdat (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-4899?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Babak Vahdat updated CAMEL-4899:
--------------------------------

    Attachment:     (was: CAMEL-4899-remove-unused.patch)
    
> Code Clean-Up (continued)
> -------------------------
>
>                 Key: CAMEL-4899
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4899
>             Project: Camel
>          Issue Type: Improvement
>    Affects Versions: 2.8.3
>            Reporter: Babak Vahdat
>            Assignee: Babak Vahdat
>             Fix For: 2.9.1, 2.10.0
>
>
> As Hadrian has already proposed by CAMEL-4796 this ticket has been created as it's continuation. The remaing tasks are therewith
> - Removal of unused private memebers: Types, Constructors, Fields and Methods where applicable
> - Remove the trailing whitespace on all lines, even on the empty ones

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CAMEL-4899) Code Clean-Up (continued)

Posted by "Babak Vahdat (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-4899?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13187703#comment-13187703 ] 

Babak Vahdat commented on CAMEL-4899:
-------------------------------------

And in case of camel-hazelcast *now* the tests do all pass by me no matter *with* or *without* the provided patch by this ticket.
Have got no idea why it used to fail at the time I attached the patch for this ticket with my first comments on it.

Maybe it was some Maven magic behind it after the Midnight :-)
                
> Code Clean-Up (continued)
> -------------------------
>
>                 Key: CAMEL-4899
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4899
>             Project: Camel
>          Issue Type: Improvement
>    Affects Versions: 2.8.3
>            Reporter: Babak Vahdat
>            Assignee: Babak Vahdat
>             Fix For: 2.10.0
>
>         Attachments: CAMEL-4899-remove-unused.patch
>
>
> As Hadrian has already proposed by CAMEL-4796 this ticket has been created as it's continuation. The remaing tasks are therewith
> - Removal of unused private memebers: Types, Constructors, Fields and Methods where applicable
> - Remove the trailing whitespace on all lines, even on the empty ones

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CAMEL-4899) Code Clean-Up (continued)

Posted by "Babak Vahdat (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-4899?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Babak Vahdat updated CAMEL-4899:
--------------------------------

    Attachment: CAMEL-4899-remove-unused.patch

Attached the patch concerning "remove unused" with some extra sugar concerning:

- removal of the deprecated API usages (and corresponding SuppressWarning("deprecated")) in bunch of the places like the API's:

{code}
new org.apache.camel.component.mock.MockEndpoint("mock:foo")
getIdentifier() method usage instead of getUUID() by javax.jcr.Node
getNodeByIdentifier() method usage instead of getNodeByUUID() by javax.jcr.Session
{code}

- still removal of some unnecessary casts
- still removal of some unused imports

Note: at the first glance the change made for

{code}
org.apache.camel.component.mina2.Mina2Consumer
{code}

could seem that as if the removal of the fields

{code}
- noReplyLogger
- acceptorConfig
- sync
{code}

would be "too much" however looking deeply into it I found out that all those member variables are *unused* or their usage-chain in the class itself were again *unused*.
                
> Code Clean-Up (continued)
> -------------------------
>
>                 Key: CAMEL-4899
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4899
>             Project: Camel
>          Issue Type: Improvement
>    Affects Versions: 2.8.3
>            Reporter: Babak Vahdat
>            Assignee: Babak Vahdat
>             Fix For: 2.9.1, 2.10.0
>
>         Attachments: CAMEL-4899-remove-unused.patch
>
>
> As Hadrian has already proposed by CAMEL-4796 this ticket has been created as it's continuation. The remaing tasks are therewith
> - Removal of unused private memebers: Types, Constructors, Fields and Methods where applicable
> - Remove the trailing whitespace on all lines, even on the empty ones

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CAMEL-4899) Code Clean-Up (continued)

Posted by "Claus Ibsen (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-4899?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13187697#comment-13187697 ] 

Claus Ibsen commented on CAMEL-4899:
------------------------------------

Okay these tests works fine on my laptop, as well Apache CI servers
https://builds.apache.org/job/Camel.trunk.fulltest/

So your patch most likely do not break stuff in those components anyway
                
> Code Clean-Up (continued)
> -------------------------
>
>                 Key: CAMEL-4899
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4899
>             Project: Camel
>          Issue Type: Improvement
>    Affects Versions: 2.8.3
>            Reporter: Babak Vahdat
>            Assignee: Babak Vahdat
>             Fix For: 2.10.0
>
>         Attachments: CAMEL-4899-remove-unused.patch
>
>
> As Hadrian has already proposed by CAMEL-4796 this ticket has been created as it's continuation. The remaing tasks are therewith
> - Removal of unused private memebers: Types, Constructors, Fields and Methods where applicable
> - Remove the trailing whitespace on all lines, even on the empty ones

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CAMEL-4899) Code Clean-Up (continued)

Posted by "Babak Vahdat (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-4899?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13187680#comment-13187680 ] 

Babak Vahdat commented on CAMEL-4899:
-------------------------------------

Claus as I said before the tests on those two components are *already* failing on the trunk no matter with or without applying the provided patch by this ticket!

I looked at the svn history and last changes on camel-mina2 are because of "me" where I did *only* remove unused imports for:

{code}
org.apache.camel.component.mina2.Mina2Helper
org.apache.camel.component.mina2.Mina2EncodingTest
{code}

Here the test failure on trunk by camel-mina2 (both on Windows & iMac of mine):

{code}
-------------------------------------------------------------------------------
Test set: org.apache.camel.component.mina2.Mina2TcpWithInOutTest
-------------------------------------------------------------------------------
Tests run: 2, Failures: 2, Errors: 0, Skipped: 0, Time elapsed: 16.906 sec <<< FAILURE!
testMinaRouteWithInOut(org.apache.camel.component.mina2.Mina2TcpWithInOutTest)  Time elapsed: 8.61 sec  <<< FAILURE!
java.lang.AssertionError: Did not receive the message!
	at org.junit.Assert.fail(Assert.java:91)
	at org.junit.Assert.assertTrue(Assert.java:43)
	at org.apache.camel.component.mina2.Mina2TcpWithInOutTest.testMinaRouteWithInOut(Mina2TcpWithInOutTest.java:76)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
	at org.junit.rules.TestWatchman$1.evaluate(TestWatchman.java:48)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
	at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:53)
	at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:119)
	at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:101)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.apache.maven.surefire.booter.ProviderFactory$ClassLoaderProxy.invoke(ProviderFactory.java:103)
	at $Proxy0.invoke(Unknown Source)
	at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:150)
	at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcess(SurefireStarter.java:74)
	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:69)

testMinaRouteWithInOutLazy(org.apache.camel.component.mina2.Mina2TcpWithInOutTest)  Time elapsed: 8.14 sec  <<< FAILURE!
java.lang.AssertionError: Did not receive the message!
	at org.junit.Assert.fail(Assert.java:91)
	at org.junit.Assert.assertTrue(Assert.java:43)
	at org.apache.camel.component.mina2.Mina2TcpWithInOutTest.testMinaRouteWithInOutLazy(Mina2TcpWithInOutTest.java:122)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
	at org.junit.rules.TestWatchman$1.evaluate(TestWatchman.java:48)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
	at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:53)
	at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:119)
	at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:101)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.apache.maven.surefire.booter.ProviderFactory$ClassLoaderProxy.invoke(ProviderFactory.java:103)
	at $Proxy0.invoke(Unknown Source)
	at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:150)
	at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcess(SurefireStarter.java:74)
	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:69)

{code}

I don't know much about Apache Mina but try to see if I can find something.
                
> Code Clean-Up (continued)
> -------------------------
>
>                 Key: CAMEL-4899
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4899
>             Project: Camel
>          Issue Type: Improvement
>    Affects Versions: 2.8.3
>            Reporter: Babak Vahdat
>            Assignee: Babak Vahdat
>             Fix For: 2.10.0
>
>         Attachments: CAMEL-4899-remove-unused.patch
>
>
> As Hadrian has already proposed by CAMEL-4796 this ticket has been created as it's continuation. The remaing tasks are therewith
> - Removal of unused private memebers: Types, Constructors, Fields and Methods where applicable
> - Remove the trailing whitespace on all lines, even on the empty ones

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CAMEL-4899) Code Clean-Up (continued)

Posted by "Babak Vahdat (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-4899?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13189153#comment-13189153 ] 

Babak Vahdat commented on CAMEL-4899:
-------------------------------------

Because of the same reason by CAMEL-4796 where I skipped the clean up step:
- Usage of the @Deprecated & @Override annotations where required 

I'll also skip the step:
- Remove the trailing whitespace on all lines, even on the empty ones

By this ticket, as othwise I would touch *too manys* sources making backporting of the other fixes much difficult. For this purpose I created the task CAMEL-4921 to track these two cleanup activities for later on.

                
> Code Clean-Up (continued)
> -------------------------
>
>                 Key: CAMEL-4899
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4899
>             Project: Camel
>          Issue Type: Improvement
>    Affects Versions: 2.8.3
>            Reporter: Babak Vahdat
>            Assignee: Babak Vahdat
>             Fix For: 2.10.0
>
>         Attachments: CAMEL-4899-remove-unused.patch
>
>
> As Hadrian has already proposed by CAMEL-4796 this ticket has been created as it's continuation. The remaing tasks are therewith
> - Removal of unused private members: Types, Constructors, Fields and Methods where applicable
> - Remove the trailing whitespace on all lines, even on the empty ones

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CAMEL-4899) Code Clean-Up (continued)

Posted by "Claus Ibsen (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-4899?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13187645#comment-13187645 ] 

Claus Ibsen commented on CAMEL-4899:
------------------------------------

The camel-mina2 component is in progress, for some enhancements to better scale and have better async capabilities. So expect changes in this component in the future. The current camel-mina2 was created to mirror the old 1:1.

Its of course important that we do not introduce new unit tests failures. Do you mind looking into that? Or submit a patch with no changes in those 2 components.
                
> Code Clean-Up (continued)
> -------------------------
>
>                 Key: CAMEL-4899
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4899
>             Project: Camel
>          Issue Type: Improvement
>    Affects Versions: 2.8.3
>            Reporter: Babak Vahdat
>            Assignee: Babak Vahdat
>             Fix For: 2.9.1, 2.10.0
>
>         Attachments: CAMEL-4899-remove-unused.patch
>
>
> As Hadrian has already proposed by CAMEL-4796 this ticket has been created as it's continuation. The remaing tasks are therewith
> - Removal of unused private memebers: Types, Constructors, Fields and Methods where applicable
> - Remove the trailing whitespace on all lines, even on the empty ones

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Issue Comment Edited] (CAMEL-4899) Code Clean-Up (continued)

Posted by "Babak Vahdat (Issue Comment Edited) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-4899?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13186603#comment-13186603 ] 

Babak Vahdat edited comment on CAMEL-4899 at 1/16/12 1:01 AM:
--------------------------------------------------------------

Attached the patch concerning "remove unused" with some extra sugar concerning:

- removal of the deprecated API usages (and corresponding SuppressWarning("deprecated")) in bunch of the places like:

{code}
replace the deprecated constructor org.apache.camel.component.mock.MockEndpoint() usage with getMockEndpoint() API
javax.jcr.Node.getIdentifier() usage instead of javax.jcr.Node.getUUID()
javax.jcr.Session.getNodeByIdentifier() usage instead of javax.jcr.Session.getNodeByUUID()
org.jivesoftware.smack.XMPPConnection.addPacketSendingListener() usage instead of org.jivesoftware.smack.XMPPConnection.addPacketWriterListener()
{code}

- still removal of some unnecessary casts
- still removal of some unused imports

Note: at the first glance the change made by

{code}
org.apache.camel.component.mina2.Mina2Consumer
{code}

could seem that as if the removal of the fields

{code}
- noReplyLogger
- acceptorConfig
- sync
{code}

would be "too much" however looking deeply into it I found out that all those member variables are *unused* or their usage-chain in the class itself were again *unused*.

Note: unfortunately with or without the attached patch there're failed unit-tests by:

{code}
- camel-hazelcast
- camel-mina2
{code}

However I didn't look into them in detail.
                
      was (Author: bvahdat):
    Attached the patch concerning "remove unused" with some extra sugar concerning:

- removal of the deprecated API usages (and corresponding SuppressWarning("deprecated")) in bunch of the places like:

{code}
replace the deprecated constructor org.apache.camel.component.mock.MockEndpoint() usage with getMockEndpoint() API
javax.jcr.Node.getIdentifier() usage instead of javax.jcr.Node.getUUID()
javax.jcr.Session.getNodeByIdentifier() usage instead of javax.jcr.Session.getNodeByUUID()
org.jivesoftware.smack.XMPPConnection.addPacketSendingListener() usage instead of org.jivesoftware.smack.XMPPConnection.addPacketWriterListener()
{code}

- still removal of some unnecessary casts
- still removal of some unused imports

Note: at the first glance the change made by

{code}
org.apache.camel.component.mina2.Mina2Consumer
{code}

could seem that as if the removal of the fields

{code}
- noReplyLogger
- acceptorConfig
- sync
{code}

would be "too much" however looking deeply into it I found out that all those member variables are *unused* or their usage-chain in the class itself were again *unused*.

Note: unfortunately with or without the attached path there're failed unit-tests by:


{code}
- camel-hazelcast
- camel-mina2
{code}

                  
> Code Clean-Up (continued)
> -------------------------
>
>                 Key: CAMEL-4899
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4899
>             Project: Camel
>          Issue Type: Improvement
>    Affects Versions: 2.8.3
>            Reporter: Babak Vahdat
>            Assignee: Babak Vahdat
>             Fix For: 2.9.1, 2.10.0
>
>         Attachments: CAMEL-4899-remove-unused.patch
>
>
> As Hadrian has already proposed by CAMEL-4796 this ticket has been created as it's continuation. The remaing tasks are therewith
> - Removal of unused private memebers: Types, Constructors, Fields and Methods where applicable
> - Remove the trailing whitespace on all lines, even on the empty ones

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CAMEL-4899) Code Clean-Up (continued)

Posted by "Claus Ibsen (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-4899?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen updated CAMEL-4899:
-------------------------------

    Fix Version/s:     (was: 2.9.1)
    
> Code Clean-Up (continued)
> -------------------------
>
>                 Key: CAMEL-4899
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4899
>             Project: Camel
>          Issue Type: Improvement
>    Affects Versions: 2.8.3
>            Reporter: Babak Vahdat
>            Assignee: Babak Vahdat
>             Fix For: 2.10.0
>
>         Attachments: CAMEL-4899-remove-unused.patch
>
>
> As Hadrian has already proposed by CAMEL-4796 this ticket has been created as it's continuation. The remaing tasks are therewith
> - Removal of unused private memebers: Types, Constructors, Fields and Methods where applicable
> - Remove the trailing whitespace on all lines, even on the empty ones

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CAMEL-4899) Code Clean-Up (continued)

Posted by "Babak Vahdat (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-4899?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13187882#comment-13187882 ] 

Babak Vahdat commented on CAMEL-4899:
-------------------------------------

@Claus running the osgi blueprint tests for the second time today went just fine, however this time was not behind a HTTP-Proxy anymore. So that was indeed the cause of the problem by my previous run earlier today.

So now I assume we can apply the patch into the trunk without any worries about potential regression failure:

{code}
Results :

Tests run: 177, Failures: 0, Errors: 0, Skipped: 17

[INFO] 
[INFO] --- maven-jar-plugin:2.3.1:jar (default-jar) @ camel-itest-osgi ---
[INFO] Building jar: /Users/bvahdat/dev/workspace/camel/tests/camel-itest-osgi/target/camel-itest-osgi-2.10-SNAPSHOT.jar
[INFO] 
[INFO] --- ianal-maven-plugin:1.0-alpha-1:verify-legal-files (default) @ camel-itest-osgi ---
[INFO] Checking legal files in: camel-itest-osgi-2.10-SNAPSHOT.jar
[INFO] 
[INFO] --- maven-install-plugin:2.3.1:install (default-install) @ camel-itest-osgi ---
[INFO] Installing /Users/bvahdat/dev/workspace/camel/tests/camel-itest-osgi/target/camel-itest-osgi-2.10-SNAPSHOT.jar to /Users/bvahdat/.m2/repository/org/apache/camel/camel-itest-osgi/2.10-SNAPSHOT/camel-itest-osgi-2.10-SNAPSHOT.jar
[INFO] Installing /Users/bvahdat/dev/workspace/camel/tests/camel-itest-osgi/pom.xml to /Users/bvahdat/.m2/repository/org/apache/camel/camel-itest-osgi/2.10-SNAPSHOT/camel-itest-osgi-2.10-SNAPSHOT.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 29:29.860s
[INFO] Finished at: Tue Jan 17 19:44:37 CET 2012
[INFO] Final Memory: 30M/1011M
[INFO] ------------------------------------------------------------------------
~/dev/workspace/camel/tests/camel-itest-osgi>
{code}
                
> Code Clean-Up (continued)
> -------------------------
>
>                 Key: CAMEL-4899
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4899
>             Project: Camel
>          Issue Type: Improvement
>    Affects Versions: 2.8.3
>            Reporter: Babak Vahdat
>            Assignee: Babak Vahdat
>             Fix For: 2.10.0
>
>         Attachments: CAMEL-4899-remove-unused.patch
>
>
> As Hadrian has already proposed by CAMEL-4796 this ticket has been created as it's continuation. The remaing tasks are therewith
> - Removal of unused private memebers: Types, Constructors, Fields and Methods where applicable
> - Remove the trailing whitespace on all lines, even on the empty ones

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira