This Bugzilla instance is deprecated, and most Eclipse projects now use GitHub or Eclipse GitLab. Please see the deprecation plan for details.
Bug 344207 - investigate DTP related comparator error
Summary: investigate DTP related comparator error
Status: RESOLVED FIXED
Alias: None
Product: WTP Releng
Classification: WebTools
Component: releng (show other bugs)
Version: 3.10   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 3.10.0   Edit
Assignee: Tran Le CLA
QA Contact: David Williams CLA
URL:
Whiteboard: PMC_approved
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-28 17:01 EDT by David Williams CLA
Modified: 2018-06-29 15:30 EDT (History)
3 users (show)

See Also:
david_williams: pmc_approved+


Attachments
zip of the two jars in question (181.80 KB, application/zip)
2011-04-28 17:25 EDT, David Williams CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Williams CLA 2011-04-28 17:01:45 EDT
For this weeks (proposed) I-build, there was an additional comparator error that was not in previous weeks: 

canonical: osgi.bundle,org.eclipse.jpt.jpa.db,2.0.0.v201104110000
Difference found for canonical: osgi.bundle,org.eclipse.jpt.jpa.db,2.0.0.v201104110000 between file:/home/data/httpd/download.eclipse.org/webtools/downloads/drops/R3.3.0/I-3.3.0-20110414085808/repository/ and file:/shared/webtools/projects/wtp-R3.3.0-I/workdir/I-3.3.0-20110428114127/buildrepository/dali-sdk
The class org/eclipse/jpt/jpa/db/internal/DTPConnectionProfileWrapper.class is different.


Since one difference between the two builds was our DTP pre-req, and this class appears DTP related, we should investigate, to make sure it wasn't due to some change in a string constant, or similar.
Comment 1 David Williams CLA 2011-04-28 17:22:38 EDT
From decompiling (with JDT) and looking at resulting "byte codes" it appears the difference is in a "synthetic bridge" class being synchronized in one case (the old case) but not in newly compiled code. (pasted below). 

I'm a little amazed this can happen at all (and, could be an artifact of the "decompile"?) ... but does not sound like a "show stopper" for M7. Might want to fix in in RC candidate (by freshly re-tagging the org.eclipse.jpt.jpa.db bundle so the "newly compiled" one would be picked up. 


  // Method descriptor #203 ()Lorg/eclipse/jpt/jpa/db/Database;
  // Stack: 1, Locals: 1
  public synchronized bridge synthetic org.eclipse.jpt.jpa.db.Database getDatabase();
    0  aload_0 [this]
    1  invokevirtual org.eclipse.jpt.jpa.db.internal.DTPConnectionProfileWrapper.getDatabase() : org.eclipse.jpt.jpa.db.internal.DTPDatabaseWrapper [341]
    4  areturn
      Line numbers:
        [pc: 0, line: 1]

vs. 

  // Method descriptor #203 ()Lorg/eclipse/jpt/jpa/db/Database;
  // Stack: 1, Locals: 1
  public bridge synthetic org.eclipse.jpt.jpa.db.Database getDatabase();
    0  aload_0 [this]
    1  invokevirtual org.eclipse.jpt.jpa.db.internal.DTPConnectionProfileWrapper.getDatabase() : org.eclipse.jpt.jpa.db.internal.DTPDatabaseWrapper [341]
    4  areturn
      Line numbers:
        [pc: 0, line: 1]
Comment 2 David Williams CLA 2011-04-28 17:25:38 EDT
Created attachment 194317 [details]
zip of the two jars in question

The bundle in the "old" directory is the one previously compiled, and the one we are currently distributing. The bundle in the "new" directory is the newly compiled one, with new DTP pre-req, but not delivered (since same qualifier as previous build).
Comment 3 David Williams CLA 2011-04-28 17:30:25 EDT
Neil, and Tran ... I'll turn this over to you now, to see what action you'd like to take, if any. 

My advice is to re-tag it for RC1, but I'd be happy to respin M7 if you think it is important to do so. 

I did only glance at the differences ... and don't really understand even what I see ... so, will leave to you. Besides the one class that was reported different, there were three other "wrapper" classes that show "different" when imported into Eclipse, and compared (I guess the comparator stops at first one if find different). I'm not sure how those other three were different from each other ... but my guess is sometime similarly related to synchronized synthetics?
Comment 4 Neil Hauge CLA 2011-04-29 14:12:17 EDT
The re-tag for rc1 sounds good.  Thanks for investigting.
Comment 5 Brian Vosburgh CLA 2011-04-29 16:01:32 EDT
My guess is this is either a change to the compiler or to the decompiler.

If it is a change to the decompiler, we can ignore it.

If it is a change to the compiler, we can probably ignore it also. :-) The only change might be an ever-so-slight performance improvement when the bridge method is called from external clients that use the public interface (i.e. the interface). For the most part, inside the jpt.jpa.db plug-in we reference the implementation class, so the change would have no effect in those cases, since those would be calling the non-bridge version of the method.
Comment 6 Tran Le CLA 2011-05-03 10:32:41 EDT
I have re-tagged the org.eclipse.jpt.jpa.db bundle and released.
Comment 7 Neil Hauge CLA 2011-05-03 10:44:44 EDT
.