Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 277970 Details for
Bug 327452
Removing @noextend should generate API problem on MANIFEST.MF
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Updated fix
updated_fix2.patch (text/plain), 9.60 KB, created by
Vikas Chandra
on 2019-03-22 12:52:28 EDT
(
hide
)
Description:
Updated fix
Filename:
MIME Type:
Creator:
Vikas Chandra
Created:
2019-03-22 12:52:28 EDT
Size:
9.60 KB
patch
obsolete
>diff --git a/apitools/org.eclipse.pde.api.tools.tests/src/org/eclipse/pde/api/tools/comparator/tests/InterfaceDeltaTests.java b/apitools/org.eclipse.pde.api.tools.tests/src/org/eclipse/pde/api/tools/comparator/tests/InterfaceDeltaTests.java >index 3098544..31ae237 100644 >--- a/apitools/org.eclipse.pde.api.tools.tests/src/org/eclipse/pde/api/tools/comparator/tests/InterfaceDeltaTests.java >+++ b/apitools/org.eclipse.pde.api.tools.tests/src/org/eclipse/pde/api/tools/comparator/tests/InterfaceDeltaTests.java >@@ -1104,8 +1104,10 @@ > IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.API, null); > assertNotNull("No delta", delta); //$NON-NLS-1$ > IDelta[] allLeavesDeltas = collectLeaves(delta); >- assertEquals("Wrong size", 1, allLeavesDeltas.length); //$NON-NLS-1$ >+ assertEquals("Wrong size", 2, allLeavesDeltas.length); //$NON-NLS-1$ > IDelta child = allLeavesDeltas[0]; > assertTrue("Not compatible", DeltaProcessor.isCompatible(child)); //$NON-NLS-1$ >+ child = allLeavesDeltas[1]; >+ assertTrue("Not compatible", DeltaProcessor.isCompatible(child)); //$NON-NLS-1$ > } > } >diff --git a/apitools/org.eclipse.pde.api.tools.tests/src/org/eclipse/pde/api/tools/comparator/tests/RestrictionsDeltaTests.java b/apitools/org.eclipse.pde.api.tools.tests/src/org/eclipse/pde/api/tools/comparator/tests/RestrictionsDeltaTests.java >index 4dd18cf..94c5843 100644 >--- a/apitools/org.eclipse.pde.api.tools.tests/src/org/eclipse/pde/api/tools/comparator/tests/RestrictionsDeltaTests.java >+++ b/apitools/org.eclipse.pde.api.tools.tests/src/org/eclipse/pde/api/tools/comparator/tests/RestrictionsDeltaTests.java >@@ -266,7 +266,13 @@ > assertTrue("Has no description", afterApiComponent.hasApiDescription()); //$NON-NLS-1$ > IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null); > assertNotNull("No delta", delta); //$NON-NLS-1$ >- assertTrue("Should be NO_DELTA", delta == ApiComparator.NO_DELTA); //$NON-NLS-1$ >+ IDelta[] allLeavesDeltas = collectLeaves(delta); >+ assertEquals("Wrong size", 1, allLeavesDeltas.length); //$NON-NLS-1$ >+ IDelta child = allLeavesDeltas[0]; >+ assertEquals("Wrong kind", IDelta.REMOVED, child.getKind()); //$NON-NLS-1$ >+ assertEquals("Wrong flag", IDelta.RESTRICTIONS, child.getFlags()); //$NON-NLS-1$ >+ assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType()); //$NON-NLS-1$ >+ assertTrue("Is compatible", DeltaProcessor.isCompatible(child)); //$NON-NLS-1$ > } > > /** >@@ -285,9 +291,15 @@ > assertTrue("Has no description", afterApiComponent.hasApiDescription()); //$NON-NLS-1$ > IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null); > assertNotNull("No delta", delta); //$NON-NLS-1$ >- assertTrue("Should be NO_DELTA", delta == ApiComparator.NO_DELTA); //$NON-NLS-1$ >+ IDelta[] allLeavesDeltas = collectLeaves(delta); >+ assertEquals("Wrong size", 1, allLeavesDeltas.length); //$NON-NLS-1$ >+ IDelta child = allLeavesDeltas[0]; >+ assertEquals("Wrong kind", IDelta.REMOVED, child.getKind()); //$NON-NLS-1$ >+ assertEquals("Wrong flag", IDelta.RESTRICTIONS, child.getFlags()); //$NON-NLS-1$ >+ assertEquals("Wrong element type", IDelta.INTERFACE_ELEMENT_TYPE, child.getElementType()); //$NON-NLS-1$ >+ assertTrue("Is compatible", DeltaProcessor.isCompatible(child)); //$NON-NLS-1$ > } >- >+ > /** > * Add @noextend on a final class and remove final on the new version of the > * class 247654 >@@ -313,7 +325,7 @@ > assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType()); //$NON-NLS-1$ > assertTrue("Not compatible", DeltaProcessor.isCompatible(child)); //$NON-NLS-1$ > } >- >+ > /** > * Add @noinstantiate on an abstract class and remove abstract on the new > * version of the class 247654 >@@ -339,7 +351,7 @@ > assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType()); //$NON-NLS-1$ > assertTrue("Not compatible", DeltaProcessor.isCompatible(child)); //$NON-NLS-1$ > } >- >+ > /** > * Add extend restrictions > */ >diff --git a/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/BaseApiAnalyzer.java b/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/BaseApiAnalyzer.java >index 7c33ea4..ad855ca 100644 >--- a/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/BaseApiAnalyzer.java >+++ b/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/BaseApiAnalyzer.java >@@ -1964,6 +1964,10 @@ > } > break; > } >+ case IDelta.REMOVED:{ >+ this.fBuildState.addCompatibleChange(delta); >+ break; >+ } > default: > break; > } >diff --git a/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/comparator/ClassFileComparator.java b/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/comparator/ClassFileComparator.java >index 37f1c13..2a95167 100644 >--- a/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/comparator/ClassFileComparator.java >+++ b/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/comparator/ClassFileComparator.java >@@ -975,6 +975,9 @@ > if ((RestrictionModifiers.isImplementRestriction(restrictions2) && !RestrictionModifiers.isImplementRestriction(restrictions)) || (RestrictionModifiers.isExtendRestriction(restrictions2) && !RestrictionModifiers.isExtendRestriction(restrictions))) { > this.addDelta(getElementType(this.type1), IDelta.ADDED, IDelta.RESTRICTIONS, restrictions2, typeAccess, typeAccess2, this.type2, this.type2.getName(), Util.getDescriptorName(type1)); > } >+ if ((!RestrictionModifiers.isImplementRestriction(restrictions2) && RestrictionModifiers.isImplementRestriction(restrictions)) || (!RestrictionModifiers.isExtendRestriction(restrictions2) && RestrictionModifiers.isExtendRestriction(restrictions))) { >+ this.addDelta(getElementType(this.type1), IDelta.REMOVED, IDelta.RESTRICTIONS, restrictions2, typeAccess, typeAccess2, this.type2, this.type2.getName(), Util.getDescriptorName(type1)); >+ } > } else { > boolean reportChangedRestrictions = false; > if (!Flags.isFinal(typeAccess2) && !Flags.isFinal(typeAccess)) { >@@ -982,12 +985,22 @@ > reportChangedRestrictions = true; > this.addDelta(getElementType(this.type1), IDelta.ADDED, IDelta.RESTRICTIONS, restrictions2, typeAccess, typeAccess2, this.type2, this.type2.getName(), Util.getDescriptorName(type1)); > } >+ if (!RestrictionModifiers.isExtendRestriction(restrictions2) && RestrictionModifiers.isExtendRestriction(restrictions)) { >+ reportChangedRestrictions = true; >+ this.addDelta(getElementType(this.type1), IDelta.REMOVED, IDelta.RESTRICTIONS,restrictions2, typeAccess, typeAccess2, this.type2, this.type2.getName(),Util.getDescriptorName(type1)); >+ } > } > if (!reportChangedRestrictions && !Flags.isAbstract(typeAccess2) && !Flags.isAbstract(typeAccess)) { > if (RestrictionModifiers.isInstantiateRestriction(restrictions2) && !RestrictionModifiers.isInstantiateRestriction(restrictions)) { > this.addDelta(getElementType(this.type1), IDelta.ADDED, IDelta.RESTRICTIONS, restrictions2, typeAccess, typeAccess2, this.type2, this.type2.getName(), Util.getDescriptorName(type1)); > } > } >+ if (!reportChangedRestrictions && !Flags.isAbstract(typeAccess2) >+ && !Flags.isAbstract(typeAccess)) { >+ if (!RestrictionModifiers.isInstantiateRestriction(restrictions2) && RestrictionModifiers.isInstantiateRestriction(restrictions)) { >+ this.addDelta(getElementType(this.type1), IDelta.REMOVED, IDelta.RESTRICTIONS,restrictions2, typeAccess, typeAccess2, this.type2, this.type2.getName(),Util.getDescriptorName(type1)); >+ } >+ } > } > } > } >diff --git a/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/comparator/Messages.java b/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/comparator/Messages.java >index 571d0fc..7f922f8 100644 >--- a/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/comparator/Messages.java >+++ b/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/comparator/Messages.java >@@ -260,6 +260,8 @@ > return 31; > } > return 32; >+ case IDelta.RESTRICTIONS: >+ return 112; > case IDelta.TYPE_MEMBER: > if (Flags.isProtected(delta.getOldModifiers())) { > return 33; >@@ -432,6 +434,8 @@ > return 61; > case IDelta.DEPRECATION: > return 111; >+ case IDelta.RESTRICTIONS: >+ return 112; > default: > break; > } >diff --git a/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/comparator/compatible_delta_messages.properties b/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/comparator/compatible_delta_messages.properties >index 8c5efa0..2d1bfb5 100644 >--- a/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/comparator/compatible_delta_messages.properties >+++ b/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/comparator/compatible_delta_messages.properties >@@ -227,4 +227,6 @@ > # {0} given element > 110=The deprecation modifiers has been added to {0} > # {0} given element >-111=The deprecation modifiers has been removed from {0} >\ No newline at end of file >+111=The deprecation modifiers has been removed from {0} >+# {0} type name >+112 = Restrictions have been removed for type {0} >\ No newline at end of file
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 327452
:
277961
|
277962
| 277970