Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonah Graham2018-11-20 16:20:42 +0000
committerJonah Graham2018-11-22 21:47:02 +0000
commit170e654b4796bad1453ae85a427b97317d67a69a (patch)
tree6ca9b8a8fedd5fd25f97eb79c408312e256ff981 /core/org.eclipse.cdt.core.linux
parent35996a5c5ca5c254959ba48241eaada6dbf8628d (diff)
downloadorg.eclipse.cdt-170e654b4796bad1453ae85a427b97317d67a69a.tar.gz
org.eclipse.cdt-170e654b4796bad1453ae85a427b97317d67a69a.tar.xz
org.eclipse.cdt-170e654b4796bad1453ae85a427b97317d67a69a.zip
Bug 540373: Cleanup: Format & Remove trailing whitespace
This was done by selecting all projects in Eclipse then Source -> Clean Up... -> choosing: - Format source code - Remove trailing white spaces on all lines and completing the wizard Change-Id: I63685372c6bcc67719bcf145123bcb72e5b00394
Diffstat (limited to 'core/org.eclipse.cdt.core.linux')
-rw-r--r--core/org.eclipse.cdt.core.linux/src/org/eclipse/cdt/internal/core/linux/ProcessInfo.java6
-rw-r--r--core/org.eclipse.cdt.core.linux/src/org/eclipse/cdt/internal/core/linux/ProcessList.java17
2 files changed, 12 insertions, 11 deletions
diff --git a/core/org.eclipse.cdt.core.linux/src/org/eclipse/cdt/internal/core/linux/ProcessInfo.java b/core/org.eclipse.cdt.core.linux/src/org/eclipse/cdt/internal/core/linux/ProcessInfo.java
index acfa000cf03..cc0d6cbb945 100644
--- a/core/org.eclipse.cdt.core.linux/src/org/eclipse/cdt/internal/core/linux/ProcessInfo.java
+++ b/core/org.eclipse.cdt.core.linux/src/org/eclipse/cdt/internal/core/linux/ProcessInfo.java
@@ -27,7 +27,7 @@ public class ProcessInfo implements IProcessInfo {
int pid;
String name;
-
+
public ProcessInfo(String pidString, String name) {
try {
pid = Integer.parseInt(pidString);
@@ -35,12 +35,12 @@ public class ProcessInfo implements IProcessInfo {
}
this.name = name;
}
-
+
public ProcessInfo(int pid, String name) {
this.pid = pid;
this.name = name;
}
-
+
/**
* @see org.eclipse.cdt.core.IProcessInfo#getName()
*/
diff --git a/core/org.eclipse.cdt.core.linux/src/org/eclipse/cdt/internal/core/linux/ProcessList.java b/core/org.eclipse.cdt.core.linux/src/org/eclipse/cdt/internal/core/linux/ProcessList.java
index 3669c52e2c5..9270e0ba266 100644
--- a/core/org.eclipse.cdt.core.linux/src/org/eclipse/cdt/internal/core/linux/ProcessList.java
+++ b/core/org.eclipse.cdt.core.linux/src/org/eclipse/cdt/internal/core/linux/ProcessList.java
@@ -28,18 +28,18 @@ import org.eclipse.cdt.core.IProcessList;
public class ProcessList implements IProcessList {
ProcessInfo[] empty = new ProcessInfo[0];
-
+
public ProcessList() {
}
-
+
/**
* Insert the method's description here.
* @see IProcessList#getProcessList
*/
- public IProcessInfo [] getProcessList() {
+ public IProcessInfo[] getProcessList() {
File proc = new File("/proc"); //$NON-NLS-1$
File[] pidFiles = null;
-
+
// We are only interrested in the pid so filter the rest out.
try {
FilenameFilter filter = new FilenameFilter() {
@@ -56,7 +56,7 @@ public class ProcessList implements IProcessList {
pidFiles = proc.listFiles(filter);
} catch (SecurityException e) {
}
-
+
ProcessInfo[] processInfo = empty;
if (pidFiles != null) {
processInfo = new ProcessInfo[pidFiles.length];
@@ -68,14 +68,15 @@ public class ProcessList implements IProcessList {
reader = new FileReader(cmdLine);
int c;
while ((c = reader.read()) > 0) {
- line.append((char)c);
+ line.append((char) c);
}
} catch (IOException e) {
} finally {
try {
if (reader != null)
reader.close();
- } catch (IOException e) {/* Don't care */}
+ } catch (IOException e) {
+ /* Don't care */}
reader = null;
}
String name = line.toString();
@@ -87,6 +88,6 @@ public class ProcessList implements IProcessList {
} else {
pidFiles = new File[0];
}
- return processInfo;
+ return processInfo;
}
}

Back to the top