Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Vogel2021-05-05 09:26:15 +0000
committerLars Vogel2021-05-07 08:22:39 +0000
commit89e9752288d7ca7ff15f45efce1143dfc0dbb816 (patch)
tree512deafcf36078a65fb0564673905380d2d357c9
parent62252cd622e280d0be692fafcf18d2981b97b2d2 (diff)
downloadeclipse.platform.ua-I20210526-0600.tar.gz
eclipse.platform.ua-I20210526-0600.tar.xz
eclipse.platform.ua-I20210526-0600.zip
ua plug-ins This ticket uses and tests the "Use static inner class" cleanup feature: - It reviews the feature - It reduces the memory consumption as it avoids the pointer to the outer class Example: Before: public class Outer { public class InnerClass { int i; public boolean anotherMethod() { return true; } } } After: public class Outer { public static class InnerClass { int i; public boolean anotherMethod() { return true; } } } Change-Id: I16b87889a3d15c254f5a190e89131ef19a64240b Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com> Reviewed-on: https://git.eclipse.org/r/c/platform/eclipse.platform.ua/+/180220 Tested-by: Platform Bot <platform-bot@eclipse.org>
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/ScopeRegistry.java4
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/search/IndexingOperation.java2
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchManager.java2
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/server/JettyHelpServer.java2
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/standalone/Eclipse.java2
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/search/HelpIndexBuilder.java2
-rw-r--r--org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/AboutServlet.java4
-rw-r--r--org.eclipse.help/src/org/eclipse/help/internal/index/IndexAssembler.java2
-rw-r--r--org.eclipse.help/src/org/eclipse/help/internal/toc/TopicSorter.java2
-rw-r--r--org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/composite/explorer/ConfirmRestartDialog.java2
-rw-r--r--org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/composite/explorer/TreeLabelProvider.java2
-rw-r--r--org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/composite/model/TaskDependencies.java2
-rw-r--r--org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/data/CheatSheetParser.java2
-rw-r--r--org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/registry/CheatSheetRegistryReader.java6
-rw-r--r--org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/views/ErrorPage.java2
15 files changed, 19 insertions, 19 deletions
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/ScopeRegistry.java b/org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/ScopeRegistry.java
index 4c4ebe243..255738d2f 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/ScopeRegistry.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/ScopeRegistry.java
@@ -190,7 +190,7 @@ public class ScopeRegistry {
* returning each part of the phrase as a separate element
*
*/
- class ScopePhrase{
+ static class ScopePhrase{
private String phrase;
private int cursor;
@@ -240,7 +240,7 @@ public class ScopeRegistry {
* on one Scope, or a union/intersection of scopes.
*
*/
- private class TempScope
+ private static class TempScope
{
public final static int SELF=0;
public final static int UNION=1;
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/search/IndexingOperation.java b/org.eclipse.help.base/src/org/eclipse/help/internal/search/IndexingOperation.java
index 6da41d4e5..bcd7b5a7a 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/search/IndexingOperation.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/search/IndexingOperation.java
@@ -318,7 +318,7 @@ class IndexingOperation {
return name;
}
- public class IndexingException extends Exception {
+ public static class IndexingException extends Exception {
private static final long serialVersionUID = 1L;
}
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchManager.java b/org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchManager.java
index b0f82121a..f5b10ab42 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchManager.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchManager.java
@@ -250,7 +250,7 @@ public class SearchManager {
* Buffers hits, and only sends them off to the wrapped collector
* when flush() is called.
*/
- private class BufferedSearchHitCollector implements ISearchHitCollector {
+ private static class BufferedSearchHitCollector implements ISearchHitCollector {
private Set<SearchHit> allHits = new HashSet<>();
private String wordsSearched = null;
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/server/JettyHelpServer.java b/org.eclipse.help.base/src/org/eclipse/help/internal/server/JettyHelpServer.java
index 98b302251..4d66197c9 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/server/JettyHelpServer.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/server/JettyHelpServer.java
@@ -35,7 +35,7 @@ import org.osgi.framework.ServiceReference;
public class JettyHelpServer extends HelpServer {
- private abstract class WorkerThread extends Thread {
+ private abstract static class WorkerThread extends Thread {
private Throwable exception;
public WorkerThread(String name) {
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/standalone/Eclipse.java b/org.eclipse.help.base/src/org/eclipse/help/internal/standalone/Eclipse.java
index ee65f5c02..67fc694fb 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/standalone/Eclipse.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/standalone/Eclipse.java
@@ -134,7 +134,7 @@ public class Eclipse extends Thread {
/**
* Reads a stream
*/
- public class StreamConsumer extends Thread {
+ public static class StreamConsumer extends Thread {
BufferedReader bReader;
public StreamConsumer(InputStream inputStream) {
super();
diff --git a/org.eclipse.help.base/src/org/eclipse/help/search/HelpIndexBuilder.java b/org.eclipse.help.base/src/org/eclipse/help/search/HelpIndexBuilder.java
index e44360a91..ecf4074e3 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/search/HelpIndexBuilder.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/search/HelpIndexBuilder.java
@@ -130,7 +130,7 @@ public class HelpIndexBuilder {
}
}
- class LocaleDir {
+ static class LocaleDir {
String locale;
String relativePath;
ArrayList<File> dirs = new ArrayList<>();
diff --git a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/AboutServlet.java b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/AboutServlet.java
index 118dcee93..6d5c5c2aa 100644
--- a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/AboutServlet.java
+++ b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/AboutServlet.java
@@ -43,7 +43,7 @@ public class AboutServlet extends HttpServlet {
protected Locale locale;
- protected class PluginDetails {
+ protected static class PluginDetails {
public String[] columns = new String[NUMBER_OF_COLUMNS];
public PluginDetails(String[] columns) {
@@ -56,7 +56,7 @@ public class AboutServlet extends HttpServlet {
}
}
- protected class PluginComparator implements Comparator<PluginDetails> {
+ protected static class PluginComparator implements Comparator<PluginDetails> {
public PluginComparator(int column) {
this.column = column;
diff --git a/org.eclipse.help/src/org/eclipse/help/internal/index/IndexAssembler.java b/org.eclipse.help/src/org/eclipse/help/internal/index/IndexAssembler.java
index 16e2d8ca6..d25579cc9 100644
--- a/org.eclipse.help/src/org/eclipse/help/internal/index/IndexAssembler.java
+++ b/org.eclipse.help/src/org/eclipse/help/internal/index/IndexAssembler.java
@@ -208,7 +208,7 @@ public class IndexAssembler {
* Normalizes topic hrefs, by prepending the plug-in id to form an href.
* e.g. "path/myfile.html" -> "/my.plugin/path/myfile.html"
*/
- private class NormalizeHandler extends ProcessorHandler {
+ private static class NormalizeHandler extends ProcessorHandler {
@Override
public short handle(UAElement element, String id) {
if (element instanceof Topic) {
diff --git a/org.eclipse.help/src/org/eclipse/help/internal/toc/TopicSorter.java b/org.eclipse.help/src/org/eclipse/help/internal/toc/TopicSorter.java
index 6c0bdb493..e42f02560 100644
--- a/org.eclipse.help/src/org/eclipse/help/internal/toc/TopicSorter.java
+++ b/org.eclipse.help/src/org/eclipse/help/internal/toc/TopicSorter.java
@@ -52,7 +52,7 @@ public class TopicSorter {
}
}
- private class TopicComparator implements Comparator<ITopic> {
+ private static class TopicComparator implements Comparator<ITopic> {
Collator collator = Collator.getInstance();
@Override
diff --git a/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/composite/explorer/ConfirmRestartDialog.java b/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/composite/explorer/ConfirmRestartDialog.java
index b1577f825..7c638fa1e 100644
--- a/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/composite/explorer/ConfirmRestartDialog.java
+++ b/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/composite/explorer/ConfirmRestartDialog.java
@@ -55,7 +55,7 @@ public class ConfirmRestartDialog extends Dialog {
}
- public class TaskContentProvider implements IStructuredContentProvider {
+ public static class TaskContentProvider implements IStructuredContentProvider {
Object[] input;
diff --git a/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/composite/explorer/TreeLabelProvider.java b/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/composite/explorer/TreeLabelProvider.java
index 8df69b103..5217f1034 100644
--- a/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/composite/explorer/TreeLabelProvider.java
+++ b/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/composite/explorer/TreeLabelProvider.java
@@ -41,7 +41,7 @@ public class TreeLabelProvider extends LabelProvider {
/*
* A set of related images
*/
- private class ImageSet {
+ private static class ImageSet {
// Use a map rather than array so the nuber of icons is not hard coded
Map<String, Image> images = new HashMap<>();
diff --git a/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/composite/model/TaskDependencies.java b/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/composite/model/TaskDependencies.java
index c81320181..419a4e68b 100644
--- a/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/composite/model/TaskDependencies.java
+++ b/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/composite/model/TaskDependencies.java
@@ -34,7 +34,7 @@ import org.eclipse.ui.internal.provisional.cheatsheets.ICompositeCheatSheetTask;
public class TaskDependencies {
- private class Dependency {
+ private static class Dependency {
private AbstractTask sourceTask;
private String requiredTaskId;
diff --git a/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/data/CheatSheetParser.java b/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/data/CheatSheetParser.java
index 57eef579f..e958acd17 100644
--- a/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/data/CheatSheetParser.java
+++ b/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/data/CheatSheetParser.java
@@ -1151,7 +1151,7 @@ public class CheatSheetParser implements IStatusContainer {
* plug-ins and those tasks have relative paths. It also only applies for cheat sheets
* located in running plug-ins.
*/
- private class NormalizeHandler extends ProcessorHandler {
+ private static class NormalizeHandler extends ProcessorHandler {
private static final String ELEMENT_PARAM = "param"; //$NON-NLS-1$
private static final String ATTRIBUTE_NAME = "name"; //$NON-NLS-1$
diff --git a/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/registry/CheatSheetRegistryReader.java b/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/registry/CheatSheetRegistryReader.java
index 7acdb57ba..bf74beec2 100644
--- a/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/registry/CheatSheetRegistryReader.java
+++ b/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/registry/CheatSheetRegistryReader.java
@@ -38,7 +38,7 @@ import org.eclipse.ui.internal.cheatsheets.Messages;
*/
public class CheatSheetRegistryReader extends RegistryReader implements IRegistryChangeListener {
- private class CategoryNode {
+ private static class CategoryNode {
private Category category;
private String path;
public CategoryNode(Category cat) {
@@ -63,7 +63,7 @@ public class CheatSheetRegistryReader extends RegistryReader implements IRegistr
/**
* Represents a taskEditor entry in the registry
*/
- public class TaskEditorNode {
+ public static class TaskEditorNode {
private String className;
private String iconPath;
private String id;
@@ -97,7 +97,7 @@ public class CheatSheetRegistryReader extends RegistryReader implements IRegistr
/**
* Represents a taskExplorer entry in the registry
*/
- public class TaskExplorerNode {
+ public static class TaskExplorerNode {
private String className;
private String iconPath;
private String name;
diff --git a/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/views/ErrorPage.java b/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/views/ErrorPage.java
index 94669eb48..6823a6094 100644
--- a/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/views/ErrorPage.java
+++ b/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/views/ErrorPage.java
@@ -32,7 +32,7 @@ public class ErrorPage extends Page {
/*
* Class used to sort status with errors first, then warnings
*/
- private class StatusSorter {
+ private static class StatusSorter {
private List<IStatus> errors = new ArrayList<>();
private List<IStatus> warnings = new ArrayList<>();
private List<IStatus> info = new ArrayList<>();

Back to the top