Bug 875120

Summary: API breakage due to bug 871606
Product: [JBoss] JBoss Operations Network Reporter: Lukas Krejci <lkrejci>
Component: Plugin -- OtherAssignee: John Mazzitelli <mazz>
Status: CLOSED CURRENTRELEASE QA Contact: Mike Foley <mfoley>
Severity: low Docs Contact:
Priority: urgent    
Version: JON 3.1.1CC: ahovsepy, myarboro
Target Milestone: ---   
Target Release: JON 3.1.2   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-09-11 11:01:57 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 871606    

Description Lukas Krejci 2012-11-09 15:14:05 UTC
Description of problem:

The fix for the bug 871606 broke our public API. Namely the change of the return type from void to "RedirectThreads" in the org.rhq.core.util.exex.ProcessExecutor.redirectStreams() method.

We need to either pull this change out of JON 3.1.2 or provide a backwards-compatible workaround, so that this doesn't break 3rd party components, should they use this method.

Note that this is a source-compatible change and the 3rd party components would only need to recompile to start working again. Nevertheless we shouldn't allow this in the product codebase.

Version-Release number of selected component (if applicable):
3.1.2

How reproducible:
always

Steps to Reproduce:
1. Use the rhq-core-util jar from JON 311
2. Inherit from the above mentioned class
3. Call the above mentioned method from some constructor (for example).
4. Build your code against JON 311 jar.
5. Replace JON 311 jar with JON312 jar.
6. Try to run your program.

  
Actual results:
Linkage error, program doesn't work until it is recompiled against JON312 jar.

Expected results:
Program works without the need to recompile it.

Additional info:

Comment 2 Charles Crouch 2012-11-30 02:48:55 UTC
It looks like the backward compatible change was implemented by mazz here:
https://bugzilla.redhat.com/show_bug.cgi?id=871606#c4

Assigning to mazz to bring across to the release branch.

Comment 3 Charles Crouch 2012-11-30 03:19:51 UTC
Setting this to urgent to make sure its get into the next ER build

Comment 4 John Mazzitelli 2012-11-30 14:54:48 UTC
this is already in the release branch no?

see git commit ad54ee06aabfa72fafaf1bb7936ac4d7175756e8

Author: John Mazzitelli <mazz>  2012-11-12 13:42:47
Committer: John Mazzitelli <mazz>  2012-11-12 13:48:42
Branches: remotes/origin/mtho11/bz877929, remotes/origin/rc/jon3.1.2.ER2, remotes/origin/release/jon3.1.x, remotes/origin/release/jon3.1.x-test-build
Follows: RHQ_4_1_1-BETA1
Precedes: RHQ_4_4_0_JON312, RHQ_4_4_0_JON312CI, RHQ_4_4_0_JON312ER2

    BZ 849394 deprecate old API

Comment 5 Charles Crouch 2012-11-30 15:20:47 UTC
As mazz correctly points out the API update is already in ER2 so setting this to ONQA. The verification steps are to make sure that the api of org.rhq.core.util.exex.ProcessExecutor.redirectStreams() method did not change from jon311, i.e. it still returns void.

Comment 6 Armine Hovsepyan 2013-01-15 10:45:10 UTC
Got rhq-core-util-4.4.0.JON311GA.jar and rhq-core-util-4.4.0.JON312CR2.jar jars, created a test project with the corresponding (311) lib. Created test class extending ProcessExecutor - redirectStreams is void and can be called. Changed the lib to new 312 version - redirectStreams is still void but deprecated.

Got a confirmation from lkrejci that the deprecation of method is fine.

verified.