Skip to content

Commit

Permalink
Merge branch 'eclipse-platform:master' into welcome
Browse files Browse the repository at this point in the history
  • Loading branch information
BeckerWdf authored Oct 19, 2023
2 parents 017eeec + cfb3c5f commit f272daf
Show file tree
Hide file tree
Showing 1,618 changed files with 10,028 additions and 6,543 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: CodeQL call

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
schedule:
- cron: '15 8 * * 1'

jobs:
callCodeQLworkflow:
uses: eclipse-platform/eclipse.platform.releng.aggregator/.github/workflows/codeQLworkflow.yml@master
12 changes: 0 additions & 12 deletions .github/workflows/verifyFreezePeriod.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .mvn/extensions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
<extension>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-build</artifactId>
<version>4.0.0</version>
<version>4.0.3</version>
</extension>
</extensions>
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pipeline {
wrap([$class: 'Xvnc', useXauthority: true]) {
sh """
mvn clean verify --batch-mode --fail-at-end -Dmaven.repo.local=$WORKSPACE/.m2/repository \
-Pbree-libs -Papi-check \
-Pbree-libs -Papi-check -Pjavadoc \
-Dcompare-version-with-baselines.skip=false \
-Dmaven.compiler.failOnWarning=true -Dproject.build.sourceEncoding=UTF-8 \
-Dorg.slf4j.simpleLogger.showDateTime=true -Dorg.slf4j.simpleLogger.dateTimeFormat=HH:mm:ss.SSS \
Expand Down
3 changes: 3 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# How To Report a Vulnerability

See https://github.com/eclipse-platform/.github/blob/main/SECURITY.md
5 changes: 2 additions & 3 deletions ant/org.eclipse.ant.core/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.ant.core; singleton:=true
Bundle-Version: 3.7.100.qualifier
Bundle-Version: 3.7.200.qualifier
Bundle-Activator: org.eclipse.ant.core.AntCorePlugin
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Expand All @@ -15,8 +15,7 @@ Export-Package: org.eclipse.ant.core,
org.eclipse.ant.internal.core.ant;x-friends:="org.eclipse.ant.launching",
org.eclipse.ant.internal.core.contentDescriber;x-internal:=true
Require-Bundle: org.eclipse.core.variables;bundle-version="[3.1.0,4.0.0)",
org.eclipse.core.runtime;bundle-version="[3.28.0,4.0.0)"
org.eclipse.core.runtime;bundle-version="[3.29.0,4.0.0)"
Bundle-ActivationPolicy: lazy;exclude:="org.eclipse.ant.internal.core.contentDescriber"
Bundle-RequiredExecutionEnvironment: JavaSE-17
Bundle-ClassPath: .
Automatic-Module-Name: org.eclipse.ant.core
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
import org.eclipse.core.runtime.IContributor;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Preferences;
import org.eclipse.core.runtime.Preferences.IPropertyChangeListener;
Expand Down Expand Up @@ -82,7 +81,7 @@
public class AntCorePreferences implements IPropertyChangeListener {

static class WrappedClassLoader extends ClassLoader {
private Bundle bundle;
private final Bundle bundle;

public WrappedClassLoader(Bundle bundle) {
super();
Expand Down Expand Up @@ -138,7 +137,7 @@ public String toString() {
}
}

private IPreferenceChangeListener prefListener = event -> {
private final IPreferenceChangeListener prefListener = event -> {
String property = event.getKey();
if (property.equals(IAntCoreConstants.PREFERENCE_TASKS) || property.startsWith(IAntCoreConstants.PREFIX_TASK)) {
restoreTasks();
Expand All @@ -157,9 +156,9 @@ public String toString() {
}
};

private List<Task> defaultTasks;
private List<Type> defaultTypes;
private List<AntClasspathEntry> extraClasspathURLs;
private final List<Task> defaultTasks;
private final List<Type> defaultTypes;
private final List<AntClasspathEntry> extraClasspathURLs;
private List<Property> defaultProperties;
private IAntClasspathEntry[] defaultAntHomeEntries;

Expand Down Expand Up @@ -347,7 +346,7 @@ public String getDefaultAntHome() {
IAntClasspathEntry[] entries = getDefaultAntHomeEntries();
if (entries.length > 0) {
URL antjar = entries[entries.length - 1].getEntryURL();
IPath antHomePath = new Path(antjar.getFile());
IPath antHomePath = IPath.fromOSString(antjar.getFile());
// parent directory of the lib directory
antHomePath = antHomePath.removeLastSegments(2);
return antHomePath.toFile().getAbsolutePath();
Expand Down Expand Up @@ -865,7 +864,7 @@ public IAntClasspathEntry getToolsJarEntry(IPath javaHomePath) {
*/
@Deprecated
public URL getToolsJarURL() {
IPath path = new Path(System.getProperty("java.home")); //$NON-NLS-1$
IPath path = IPath.fromOSString(System.getProperty("java.home")); //$NON-NLS-1$
IAntClasspathEntry entry = getToolsJarEntry(path);
if (entry == null) {
IDynamicVariable variable = VariablesPlugin.getDefault().getStringVariableManager().getDynamicVariable("env_var"); //$NON-NLS-1$
Expand All @@ -875,7 +874,7 @@ public URL getToolsJarURL() {
javaHome = variable.getValue("JAVA_HOME"); //$NON-NLS-1$
}
if (javaHome != null) {
path = new Path(javaHome);
path = IPath.fromOSString(javaHome);
entry = getToolsJarEntry(path);
}
}
Expand All @@ -897,7 +896,7 @@ public URL getToolsJarURL() {
* @return IAntClasspathEntry tools.jar IAntClasspathEntry or <code>null</code>
*/
public IAntClasspathEntry getToolsJarEntry() {
IPath path = new Path(System.getProperty("java.home")); //$NON-NLS-1$
IPath path = IPath.fromOSString(System.getProperty("java.home")); //$NON-NLS-1$
IAntClasspathEntry entry = getToolsJarEntry(path);
if (entry == null) {
IDynamicVariable variable = VariablesPlugin.getDefault().getStringVariableManager().getDynamicVariable("env_var"); //$NON-NLS-1$
Expand All @@ -907,7 +906,7 @@ public IAntClasspathEntry getToolsJarEntry() {
javaHome = variable.getValue("JAVA_HOME"); //$NON-NLS-1$
}
if (javaHome != null) {
path = new Path(javaHome);
path = IPath.fromOSString(javaHome);
entry = getToolsJarEntry(path);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
import org.eclipse.ant.core.AntCorePlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.variables.IStringVariableManager;
import org.eclipse.core.variables.VariablesPlugin;
import org.osgi.framework.BundleContext;
Expand Down Expand Up @@ -114,15 +113,15 @@ public static void processMinusDProperties(List<String> commands, Map<String, St
}

public static File getFileRelativeToBaseDir(String fileName, String base, String buildFileLocation) {
IPath path = new Path(fileName);
IPath path = IPath.fromOSString(fileName);
if (!path.isAbsolute()) {
if (base != null) {
File baseDir = new File(base);
// relative to the base dir
path = new Path(baseDir.getAbsolutePath());
path = IPath.fromOSString(baseDir.getAbsolutePath());
} else {
// relative to the build file location
path = new Path(buildFileLocation);
path = IPath.fromOSString(buildFileLocation);
path = path.removeLastSegments(1);
}
path = path.addTrailingSeparator();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ private int checkCriteria(InputSource contents) throws IOException {
}
catch (SAXException e) {
// we may be handed any kind of contents... it is normal we fail to parse
// so we must not log any error here.
return INDETERMINATE;
}
catch (ParserConfigurationException e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,11 @@

import javax.xml.parsers.ParserConfigurationException;
import javax.xml.parsers.SAXParser;
import javax.xml.parsers.SAXParserFactory;

import org.eclipse.ant.internal.core.IAntCoreConstants;
import org.xml.sax.Attributes;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
import org.xml.sax.SAXNotRecognizedException;
import org.xml.sax.SAXNotSupportedException;
import org.xml.sax.XMLReader;
import org.xml.sax.helpers.DefaultHandler;

/**
Expand Down Expand Up @@ -71,61 +67,17 @@ public StopParsingException() {
* successful to the point of finding the top-level element.
*/
private String fTopElementFound = null;
private SAXParserFactory fFactory;

private boolean fDefaultAttributeFound = false;
private boolean fTargetFound = false;
private boolean fAntElementFound = false;

private int fLevel = -1;

/**
* Creates a new SAX parser for use within this instance.
*
* @return The newly created parser.
* @throws ParserConfigurationException
* If a parser of the given configuration cannot be created.
* @throws SAXException
* If something in general goes wrong when creating the parser.
*/
private final SAXParser createParser(SAXParserFactory parserFactory) throws ParserConfigurationException, SAXException, SAXNotRecognizedException, SAXNotSupportedException {
// Initialize the parser.
final SAXParser parser = parserFactory.newSAXParser();
final XMLReader reader = parser.getXMLReader();
// disable DTD validation (bug 63625)
try {
// be sure validation is "off" or the feature to ignore DTD's will not apply
reader.setFeature("http://xml.org/sax/features/validation", false); //$NON-NLS-1$
reader.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false); //$NON-NLS-1$
}
catch (SAXNotRecognizedException e) {
// not a big deal if the parser does not recognize the features
}
catch (SAXNotSupportedException e) {
// not a big deal if the parser does not support the features
}
return parser;
}

private SAXParserFactory getFactory() {
synchronized (this) {
if (fFactory != null) {
return fFactory;
}
fFactory = SAXParserFactory.newInstance();
fFactory.setNamespaceAware(true);
}
return fFactory;
}

protected boolean parseContents(InputSource contents) throws IOException, ParserConfigurationException, SAXException {
// Parse the file into we have what we need (or an error occurs).
try {
fFactory = getFactory();
if (fFactory == null) {
return false;
}
final SAXParser parser = createParser(fFactory);
@SuppressWarnings("restriction")
final SAXParser parser = org.eclipse.core.internal.runtime.XmlProcessorFactory.createSAXParserNoExternal(true);
// to support external entities specified as relative URIs (see bug 63298)
contents.setSystemId("/"); //$NON-NLS-1$
parser.parse(contents, this);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

public class EclipseAntMain extends Main {

private Project fEclipseAntProject;
private final Project fEclipseAntProject;

public EclipseAntMain(Project eclipseAntProject) {
super();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.OperationCanceledException;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Status;
import org.eclipse.core.variables.VariablesPlugin;
import org.osgi.framework.Bundle;
Expand Down Expand Up @@ -859,8 +858,8 @@ protected void fireBuildFinished(Project project, Throwable error) {
if (fileName == null) {
fileName = "log.xml"; //$NON-NLS-1$
}
String realPath = new Path(getBuildFileLocation()).toFile().getAbsolutePath();
IPath path = new Path(realPath);
String realPath = IPath.fromOSString(getBuildFileLocation()).toFile().getAbsolutePath();
IPath path = IPath.fromOSString(realPath);
path = path.removeLastSegments(1);
path = path.addTrailingSeparator();
path = path.append(fileName);
Expand Down
4 changes: 2 additions & 2 deletions ant/org.eclipse.ant.launching/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ Bundle-ManifestVersion: 2
Bundle-Localization: plugin
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.ant.launching;singleton:=true
Bundle-Version: 1.4.100.qualifier
Bundle-Version: 1.4.200.qualifier
Bundle-Activator: org.eclipse.ant.internal.launching.AntLaunching
Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.5.0,4.0.0)",
Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.29.0,4.0.0)",
org.eclipse.debug.core;bundle-version="[3.12.0,4.0.0)",
org.eclipse.jdt.launching;bundle-version="[3.12.0,4.0.0)",
org.eclipse.core.variables;bundle-version="[3.2.0,4.0.0)",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ public class AntDebugState {
private static final String fgAntTaskName = "ant"; //$NON-NLS-1$
private static final String fgAntCallTaskName = "antcall"; //$NON-NLS-1$

private IDebugBuildLogger fLogger;
private final IDebugBuildLogger fLogger;
@SuppressWarnings("unused")
private Stack<Task> fTasks = new Stack<Task>();
private final Stack<Task> fTasks = new Stack<Task>();
@SuppressWarnings("unused")
private Map<Task, Object> fTaskToProxies = new HashMap<Task, Object>();
private final Map<Task, Object> fTaskToProxies = new HashMap<Task, Object>();
private Task fCurrentTask;
private Task fStepOverTask;
private Task fStepIntoTask;
Expand All @@ -51,9 +51,9 @@ public class AntDebugState {
private Map<Project, Vector<?>> fProjectToTargetNames = null;
private Map<Project, Map<Target, Vector<Target>>> fProjectToMapOfTargetToBuildSequence = null;
@SuppressWarnings("unused")
private Stack<Target> fTargetsToExecute = new Stack<Target>();
private final Stack<Target> fTargetsToExecute = new Stack<Target>();
@SuppressWarnings("unused")
private Stack<Target> fTargetsExecuting = new Stack<Target>();
private final Stack<Target> fTargetsExecuting = new Stack<Target>();

private boolean fConsiderTargetBreakpoints = false;
private boolean fShouldSuspend;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public void setMessageOutputLevel(int level) {
fMessageOutputLevel = level;
}

protected int getMessageOutputLevel() {
public int getMessageOutputLevel() {
return fMessageOutputLevel;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,12 @@ public class InternalAntRunner {
private String loggerClassname = null;

/** Extra arguments to be parsed as command line arguments. */
private String[] extraArguments = null;
private final String[] extraArguments = null;

private boolean scriptExecuted = false;

@SuppressWarnings("unused")
private List<String> propertyFiles = new ArrayList<String>();
private final List<String> propertyFiles = new ArrayList<String>();

/**
* The Ant InputHandler class. There may be only one input handler.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@

public class RemoteAntBreakpoint {

private File fFile;
private int fLineNumber;
private String fFileName;
private final File fFile;
private final int fLineNumber;
private final String fFileName;

public RemoteAntBreakpoint(String breakpointRepresentation) {
String[] data = breakpointRepresentation.split(DebugMessageIds.MESSAGE_DELIMITER);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
public class RemoteAntBuildLogger extends DefaultLogger {

/** Time of the start of the build */
private long fStartTime = System.currentTimeMillis();
private final long fStartTime = System.currentTimeMillis();

/**
* The client socket.
Expand Down
Loading

0 comments on commit f272daf

Please sign in to comment.