Skip to content

Commit 35bae7c

Browse files
Perform clean code of build/org.eclipse.pde.build
1 parent b6b9ddf commit 35bae7c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

build/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/AbstractScriptGenerator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ public static String getImmutableAntProperty(String key, String defaultValue) {
152152
return defaultValue;
153153
}
154154
Object obj = immutableAntProperties.get(key);
155-
return (obj instanceof String) ? (String) obj : null;
155+
return (obj instanceof String s) ? s : null;
156156
}
157157

158158
public static void setConfigInfo(String spec) throws CoreException {

build/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/builder/SourceGenerator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ private BuildTimeFeature createSourceFeature(Feature featureExample) throws Core
317317

318318
result.setEnvironment(featureExample.getOS(), featureExample.getWS(), featureExample.getArch(), null);
319319

320-
int contextLength = featureExample instanceof BuildTimeFeature ? ((BuildTimeFeature) featureExample).getContextQualifierLength() : -1;
320+
int contextLength = featureExample instanceof BuildTimeFeature b ? b.getContextQualifierLength() : -1;
321321
result.setContextQualifierLength(contextLength);
322322
return result;
323323
}

0 commit comments

Comments
 (0)