Skip to content

Commit 7c6a690

Browse files
eclipse-pde-botlaeubi
authored andcommitted
Perform clean code of apitools/org.eclipse.pde.api.tools.tests
1 parent 57a9168 commit 7c6a690

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

apitools/org.eclipse.pde.api.tools.tests/src/org/eclipse/pde/api/tools/builder/tests/ApiBuilderTest.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,7 @@ public LineMapping(ApiProblem problem) {
120120

121121
@Override
122122
public boolean equals(Object obj) {
123-
if (obj instanceof LineMapping) {
124-
LineMapping lm = (LineMapping) obj;
123+
if (obj instanceof LineMapping lm) {
125124
return lm.linenumber == this.linenumber && lm.problemid == this.problemid && (this.message == null ? lm.message == null : this.message.equals(lm.message));
126125
}
127126
return super.equals(obj);

apitools/org.eclipse.pde.api.tools.tests/src/org/eclipse/pde/api/tools/search/tests/TestRequestor.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,7 @@ private boolean acceptComponent0(IApiComponent component) {
155155
* @return true if the project represented by the given component is API tools enabled false otherwise
156156
*/
157157
private boolean isApiComponent(IApiComponent component) {
158-
if(component instanceof ProjectComponent) {
159-
ProjectComponent comp = (ProjectComponent) component;
158+
if(component instanceof ProjectComponent comp) {
160159
return comp.hasApiDescription();
161160
}
162161
else {

0 commit comments

Comments
 (0)