Bug 353894 - Upgrade to Java7
Summary: Upgrade to Java7
Status: VERIFIED FIXED
Alias: None
Product: Objectteams
Classification: Tools
Component: OTDT (show other bugs)
Version: 2.0   Edit
Hardware: Other Linux
: P3 normal (vote)
Target Milestone: 2.0.1   Edit
Assignee: Stephan Herrmann CLA
QA Contact:
URL:
Whiteboard: Also released in 2.1 M1
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-04 10:29 EDT by Stephan Herrmann CLA
Modified: 2011-08-21 12:52 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stephan Herrmann CLA 2011-08-04 10:29:18 EDT
The JDT/Core version v_B72_R37x has been merged with the BETA_JAVA7
branch. The OTDT should adapt these changes for 2.0.1.
Comment 1 Stephan Herrmann CLA 2011-08-04 10:30:24 EDT
Initial merge with original JDT/Core was committed as r1783.
Comment 2 Stephan Herrmann CLA 2011-08-04 10:32:23 EDT
The grammar change for UnionTypes for catch arguments required
re-integration of declared lifting in the same location.

Corresponding changes to Parser, SelectionParser and SourceElementParser
were committed as r1785.
Comment 3 Stephan Herrmann CLA 2011-08-04 10:34:46 EDT
A CCE and other failures in GenericsRegressionTests revealed that in the
case if isDiamond "argLength == 0" is now expected behavior, which we
previously interpreted as "only value parameters".

Corresponding fix in ParameterizedSingleTypeReference has been committed
as r1788.
Comment 4 Stephan Herrmann CLA 2011-08-04 11:00:04 EDT
An AIOOBE from new PolymorphicSignatureTest revealed that polymorphic
signatures require one more check because lengths of argument lists
may differ even if !isVarargs.

Corresponding change in Statement has been committed as r1789.
Comment 5 Stephan Herrmann CLA 2011-08-04 11:00:51 EDT
(In reply to comment #4)
> Corresponding change in Statement has been committed as r1789.
... and improved in r1790
Comment 6 Stephan Herrmann CLA 2011-08-04 11:06:26 EDT
Failures in GenericsRegressionTest_1_7.test0037() were caused by 
doubly reporting diamond-related errors. This happened because
OTQualifiedAllocationExpression may call enclosingInstance.resolveType(..)
twice. Fixed by protecting with CheckPoint/rollback().

Committed as r1791.
Comment 7 Stephan Herrmann CLA 2011-08-04 11:09:24 EDT
Regressions in otdt.ui.tests.refactoring.RenameTypeTest revealed
that some locations in our code check " == AST.JLS3" thus not
accouning for the new AST.JLS4.

At this point no OT-code needs to distinguish JLS3 vs. JLS4, so the
fix was to say things like "default:" or ">= AST.JLS3".

Committed as r1794.
Comment 8 Stephan Herrmann CLA 2011-08-04 11:10:36 EDT
org.eclipse.jdt.core.tests.compiler were merged in r1799.
Comment 9 Stephan Herrmann CLA 2011-08-04 11:12:20 EDT
(In reply to comment #7)
> At this point no OT-code needs to distinguish JLS3 vs. JLS4, so the
> fix was to say things like "default:" or ">= AST.JLS3".

More similar fixes in CallinMappingDeclaration, CalloutMappingDeclaration
RoleTypeDeclaration and AstRewriteFlattener were committed as r1801/2.
Comment 10 Stephan Herrmann CLA 2011-08-04 11:38:42 EDT
OTQuickFixTest had a conflict with a new final method in its super class.

We can now actually use that exact super method.

Committed along with more improvements in r1800 and r1805.
Comment 11 Stephan Herrmann CLA 2011-08-04 11:40:34 EDT
A regression in otdt...ExtractMethodTests.testDeclaredLifting1() revealed
that the faked argument generated in DOM for the roles side of
declared lifting was parent-less (causing NPE).

Fixed in r1803.
Comment 12 Stephan Herrmann CLA 2011-08-04 13:02:02 EDT
Regressions all over the otjld test suite revealed a new problem
with stackmap attributes:
Starting with class file version 51.0 the JVM no longer supports failing
over to the old verifier. Thus, normally *all* methods *must* contain
a valid stackmap attribute, including methods that are generated at
load time.

Since BCEL provides no support for generating a stackmap we're between
a rock and a hard place.

Quick workaround: Whenever the OTRE adds or replaces any method in a 
class file of version 51.0+ it resets the version to 50.0
(hoping that it contains no invokedynamic).

Committed as r1806.
Comment 13 Stephan Herrmann CLA 2011-08-04 19:22:48 EDT
A regression in NestedTeams.test1123_teamLayeredOnRegularNested3()
showed that our translation of lowering to PushExpression/PopExpression
breaks the generation of the StackMapTable attribute.

Instead of tweaking this hack even more I changed the translation 
strategy to using a synthetic local variable instead of all the
stack manipulation, so lower(x) becomes:
  R _OT$unlowered$123; // no ast created for this declaration
  ...
  ((_OT$unlowered$123 = x) == null) ? null : _OT$unlowered$123._OT$getBase())
This still serves the essential goals behind the previous design:
- the expression 'x' shall be evaluated only once.
- lowering is an expression and can thus not generated any statements.

Committed as r1807.
Comment 14 Stephan Herrmann CLA 2011-08-06 17:32:36 EDT
Changes in the Parser caused a regressions in

org.eclipse.jdt.core.tests.model.JavaSearchBugsTests.testBug110336f()

and many of org.eclipse.jdt.core.tests.model.CompletionTests

This is due to our new overload org.eclipse.jdt.internal.compiler.parser.Parser.getTypeReference(int, boolean)
which must be overridden by subclasses too.

Fixed 
 for MatchLocatorParser in r1812 
 for AssistParser in r1813

(For SourceElementParser the change was already included when I introduced
that method in r1785)
Comment 15 Stephan Herrmann CLA 2011-08-07 08:57:24 EDT
A failure in new test org.eclipse.jdt.core.tests.model.TypeHierarchyTests.testBug300576b()
showed that abort-exceptions don't play well with our Dependencies.

Solved by marking STATE_FINAL so subsequent calls into Dependencies
won't work on aborted types/units.

Committed as r1814.
Comment 16 Stephan Herrmann CLA 2011-08-09 09:30:57 EDT
All Java7 functionality has merged with the OTDT and by now no more
regressions are observed.

First fully successful build: 201108081723, 
corresponding to revision:    r1821.
Comment 17 Stephan Herrmann CLA 2011-08-17 16:11:24 EDT
Filed a FUP as bug 355007.

Apart from that: Verified for 2.0.1 using build 201108160141.