From ab2268e6c25400b4a99490fc2dbae791ec178118 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Kubitz?= Date: Wed, 7 Jun 2023 15:49:20 +0200 Subject: [PATCH] Add missing "static" modifier for constants To reduce memory per instance --- .../equinox/internal/p2/operations/RequestFlexer.java | 8 ++++---- .../equinox/internal/p2/ui/dialogs/RemediationGroup.java | 8 ++++---- .../equinox/internal/p2/updatesite/SiteBundle.java | 2 +- .../equinox/internal/p2/updatesite/SiteFeature.java | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/internal/p2/operations/RequestFlexer.java b/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/internal/p2/operations/RequestFlexer.java index 733c9ce6e1..491f6cc42a 100644 --- a/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/internal/p2/operations/RequestFlexer.java +++ b/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/internal/p2/operations/RequestFlexer.java @@ -27,10 +27,10 @@ import org.eclipse.equinox.p2.query.*; public class RequestFlexer { - final String INCLUSION_RULES = "org.eclipse.equinox.p2.internal.inclusion.rules"; //$NON-NLS-1$ - final String INCLUSION_OPTIONAL = "OPTIONAL"; //$NON-NLS-1$ - final String INCLUSION_STRICT = "STRICT"; //$NON-NLS-1$ - final String EXPLANATION_ENABLEMENT = "org.eclipse.equinox.p2.director.explain"; //$NON-NLS-1$ + static final String INCLUSION_RULES = "org.eclipse.equinox.p2.internal.inclusion.rules"; //$NON-NLS-1$ + static final String INCLUSION_OPTIONAL = "OPTIONAL"; //$NON-NLS-1$ + static final String INCLUSION_STRICT = "STRICT"; //$NON-NLS-1$ + static final String EXPLANATION_ENABLEMENT = "org.eclipse.equinox.p2.director.explain"; //$NON-NLS-1$ IPlanner planner; diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/RemediationGroup.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/RemediationGroup.java index 4596c241bb..7dceef7f03 100644 --- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/RemediationGroup.java +++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/RemediationGroup.java @@ -34,10 +34,10 @@ import org.eclipse.swt.widgets.*; public class RemediationGroup { - final int ALLOWPARTIALINSTALL_INDEX = 0; - final int ALLOWDIFFERENTVERSION_INDEX = 1; - final int ALLOWINSTALLEDUPDATE_INDEX = 2; - final int ALLOWINSTALLEDREMOVAL_INDEX = 3; + static final int ALLOWPARTIALINSTALL_INDEX = 0; + static final int ALLOWDIFFERENTVERSION_INDEX = 1; + static final int ALLOWINSTALLEDUPDATE_INDEX = 2; + static final int ALLOWINSTALLEDREMOVAL_INDEX = 3; private RemediationOperation remediationOperation; Composite remediationComposite; diff --git a/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/SiteBundle.java b/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/SiteBundle.java index e783dd0741..eb3a06ca9f 100644 --- a/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/SiteBundle.java +++ b/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/SiteBundle.java @@ -31,7 +31,7 @@ public class SiteBundle { private String os; private String patch; - private final boolean resolved = false; + private static final boolean resolved = false; private SiteModel site; private String type; private URL url; diff --git a/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/SiteFeature.java b/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/SiteFeature.java index 663ba4520f..1ee4df81ae 100644 --- a/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/SiteFeature.java +++ b/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/SiteFeature.java @@ -37,7 +37,7 @@ public class SiteFeature { private String os; private String patch; - private final boolean resolved = false; + private static final boolean resolved = false; private SiteModel site; private String type; private URL url;