Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'bundles')
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.equinox/.classpath2
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.equinox/.settings/org.eclipse.jdt.core.prefs28
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.equinox/META-INF/MANIFEST.MF4
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.equinox/pom.xml2
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EclipseLauncherImpl.java4
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EclipseLauncherParser.java15
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxBundlesState.java20
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxFrameworkAdminFactoryImpl.java3
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxFwAdminImpl.java6
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxFwConfigFileParser.java8
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxLauncherData.java4
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxManipulatorImpl.java19
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/utils/FileUtils.java16
13 files changed, 76 insertions, 55 deletions
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.equinox/.classpath b/bundles/org.eclipse.equinox.frameworkadmin.equinox/.classpath
index 64c5e31b7..eca7bdba8 100644
--- a/bundles/org.eclipse.equinox.frameworkadmin.equinox/.classpath
+++ b/bundles/org.eclipse.equinox.frameworkadmin.equinox/.classpath
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.equinox/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.equinox.frameworkadmin.equinox/.settings/org.eclipse.jdt.core.prefs
index 20d22798f..1fd27358b 100644
--- a/bundles/org.eclipse.equinox.frameworkadmin.equinox/.settings/org.eclipse.jdt.core.prefs
+++ b/bundles/org.eclipse.equinox.frameworkadmin.equinox/.settings/org.eclipse.jdt.core.prefs
@@ -9,18 +9,23 @@ org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled
org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
+org.eclipse.jdt.core.compiler.annotation.nonnull.secondary=
org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
+org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary=
org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
+org.eclipse.jdt.core.compiler.annotation.nullable.secondary=
org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.doc.comment.support=enabled
org.eclipse.jdt.core.compiler.maxProblemPerUnit=1000
+org.eclipse.jdt.core.compiler.problem.APILeak=warning
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
@@ -32,7 +37,7 @@ org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=
org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
+org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=warning
org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
@@ -49,7 +54,7 @@ org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning
org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled
org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
@@ -58,7 +63,7 @@ org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
@@ -66,20 +71,22 @@ org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
+org.eclipse.jdt.core.compiler.problem.nonnullTypeVariableFromLegacyInvocation=warning
org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
org.eclipse.jdt.core.compiler.problem.nullReference=warning
org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.pessimisticNullAnalysisForFreeTypeVariables=warning
org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore
org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
-org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore
-org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=warning
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=warning
org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
@@ -88,12 +95,16 @@ org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled
org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
+org.eclipse.jdt.core.compiler.problem.terminalDeprecation=warning
org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled
org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning
org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentType=warning
+org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentTypeStrict=disabled
+org.eclipse.jdt.core.compiler.problem.unlikelyEqualsArgumentType=info
org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
@@ -101,6 +112,7 @@ org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
+org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore
org.eclipse.jdt.core.compiler.problem.unusedImport=error
org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
@@ -113,7 +125,7 @@ org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.5
+org.eclipse.jdt.core.compiler.source=1.8
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.equinox/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.frameworkadmin.equinox/META-INF/MANIFEST.MF
index 974defd85..eb61198b8 100644
--- a/bundles/org.eclipse.equinox.frameworkadmin.equinox/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.equinox.frameworkadmin.equinox/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.equinox.frameworkadmin.equinox;singleton:=true
-Bundle-Version: 1.0.800.qualifier
+Bundle-Version: 1.1.0.qualifier
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Import-Package: org.eclipse.equinox.frameworkadmin;version="[2.0.0,3.0.0)",
@@ -20,6 +20,6 @@ Import-Package: org.eclipse.equinox.frameworkadmin;version="[2.0.0,3.0.0)",
Export-Package: org.eclipse.equinox.internal.frameworkadmin.equinox;x-friends:="org.eclipse.equinox.p2.publisher,org.eclipse.equinox.p2.publisher.eclipse,org.eclipse.equinox.simpleconfigurator.manipulator",
org.eclipse.equinox.internal.frameworkadmin.equinox.utils;x-friends:="org.eclipse.equinox.p2.publisher.eclipse"
Require-Bundle: org.eclipse.equinox.common
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Service-Component: OSGI-INF/fwadmin.xml
Bundle-ActivationPolicy: lazy
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.equinox/pom.xml b/bundles/org.eclipse.equinox.frameworkadmin.equinox/pom.xml
index 753e67cd5..f3d9796e3 100644
--- a/bundles/org.eclipse.equinox.frameworkadmin.equinox/pom.xml
+++ b/bundles/org.eclipse.equinox.frameworkadmin.equinox/pom.xml
@@ -9,6 +9,6 @@
</parent>
<groupId>org.eclipse.equinox</groupId>
<artifactId>org.eclipse.equinox.frameworkadmin.equinox</artifactId>
- <version>1.0.800-SNAPSHOT</version>
+ <version>1.1.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EclipseLauncherImpl.java b/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EclipseLauncherImpl.java
index 49b774a31..5af29d764 100644
--- a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EclipseLauncherImpl.java
+++ b/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EclipseLauncherImpl.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * Copyright (c) 2007, 2017 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -62,7 +62,7 @@ public class EclipseLauncherImpl {
Utils.checkAbsoluteFile(launcherData.getFwJar(), "fwJar"); //$NON-NLS-1$
Utils.checkAbsoluteDir(cwd, "cwd"); //$NON-NLS-1$
- List<String> cmdList = new LinkedList<String>();
+ List<String> cmdList = new LinkedList<>();
if (launcherData.getJvm() != null)
cmdList.add(launcherData.getJvm().getAbsolutePath());
else
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EclipseLauncherParser.java b/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EclipseLauncherParser.java
index e87a69954..f7f7a8fce 100644
--- a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EclipseLauncherParser.java
+++ b/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EclipseLauncherParser.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2014 IBM Corporation and others.
+ * Copyright (c) 2007, 2017 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -151,7 +151,7 @@ public class EclipseLauncherParser {
}
private void getJVMArgs(List<String> lines, LauncherData launcherData) {
- ArrayList<String> vmargs = new ArrayList<String>(lines.size());
+ ArrayList<String> vmargs = new ArrayList<>(lines.size());
boolean foundVmArgs = false;
for (Iterator<String> iterator = lines.iterator(); iterator.hasNext();) {
String line = iterator.next();
@@ -179,7 +179,7 @@ public class EclipseLauncherParser {
}
private void getProgramArgs(List<String> lines, LauncherData launcherData) {
- ArrayList<String> args = new ArrayList<String>(lines.size());
+ ArrayList<String> args = new ArrayList<>(lines.size());
for (Iterator<String> iterator = lines.iterator(); iterator.hasNext();) {
String line = iterator.next();
if (EquinoxConstants.OPTION_VMARGS.equals(line))
@@ -295,7 +295,7 @@ public class EclipseLauncherParser {
}
//Tweak all the values to make them relative
File launcherFolder = launcherData.getLauncher().getParentFile();
- List<String> newlines = new ArrayList<String>();
+ List<String> newlines = new ArrayList<>();
newlines.addAll(Arrays.asList(launcherData.getProgramArgs()));
setStartup(newlines, launcherFolder.toURI());
@@ -326,9 +326,7 @@ public class EclipseLauncherParser {
//only write the file if we actually have content
if (newlines.size() > 0) {
- BufferedWriter bw = null;
- try {
- bw = new BufferedWriter(new FileWriter(launcherConfigFile));
+ try (BufferedWriter bw = new BufferedWriter(new FileWriter(launcherConfigFile));) {
for (int j = 0; j < newlines.size(); j++) {
String arg = newlines.get(j);
if (arg == null)
@@ -338,9 +336,6 @@ public class EclipseLauncherParser {
}
bw.flush();
Log.log(LogService.LOG_INFO, NLS.bind(Messages.log_launcherConfigSave, launcherConfigFile));
- } finally {
- if (bw != null)
- bw.close();
}
}
File previousLauncherIni = launcherData.getPreviousLauncherIni();
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxBundlesState.java b/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxBundlesState.java
index f5bba50d3..1536e5663 100644
--- a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxBundlesState.java
+++ b/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxBundlesState.java
@@ -214,13 +214,13 @@ public class EquinoxBundlesState implements BundlesState {
/**
* Map of URI->BundleDescription, where the key is the bundle location.
*/
- private HashMap<URI, BundleDescription> locationStateIndex = new HashMap<URI, BundleDescription>();
+ private HashMap<URI, BundleDescription> locationStateIndex = new HashMap<>();
/**
* Map of String->BundleDescription, where the key is the bundle name
* and version as defined by the {@link #getKey(BundleDescription)} method.
*/
- private HashMap<String, BundleDescription> nameVersionStateIndex = new HashMap<String, BundleDescription>();
+ private HashMap<String, BundleDescription> nameVersionStateIndex = new HashMap<>();
private final PlatformAdmin platformAdmin;
/**
@@ -414,7 +414,7 @@ public class EquinoxBundlesState implements BundlesState {
public BundleInfo[] convertState(BundleDescription[] bundles) {
BundleInfo[] originalBInfos = manipulator.getConfigData().getBundles();
- Map<URI, BundleInfo> bundleInfoMap = new HashMap<URI, BundleInfo>();
+ Map<URI, BundleInfo> bundleInfoMap = new HashMap<>();
for (int i = 0; i < originalBInfos.length; i++) {
bundleInfoMap.put(originalBInfos[i].getLocation(), originalBInfos[i]);
}
@@ -450,6 +450,7 @@ public class EquinoxBundlesState implements BundlesState {
return result;
}
+ @Override
public BundleInfo[] getExpectedState() throws FrameworkAdminRuntimeException {
SimpleBundlesState.checkAvailability(fwAdmin);
return convertState(state.getBundles());
@@ -459,8 +460,9 @@ public class EquinoxBundlesState implements BundlesState {
return platfromProperties;
}
+ @Override
public BundleInfo[] getPrerequisteBundles(BundleInfo bInfo) {
- Set<BundleDescription> set = new HashSet<BundleDescription>();
+ Set<BundleDescription> set = new HashSet<>();
URI realLocation = bInfo.getLocation();
BundleDescription bundle = getBundleByLocation(realLocation);
ImportPackageSpecification[] imports = bundle.getImportPackages();
@@ -485,6 +487,7 @@ public class EquinoxBundlesState implements BundlesState {
return (startLevel == BundleInfo.NO_LEVEL ? manipulator.getConfigData().getInitialBundleStartLevel() : startLevel);
}
+ @Override
public BundleInfo getSystemBundle() {
BundleDescription bundle = this.getSystemBundleDescription();
return (bundle != null ? convertSystemBundle(bundle) : null);
@@ -499,6 +502,7 @@ public class EquinoxBundlesState implements BundlesState {
return (EquinoxConstants.FW_SYMBOLIC_NAME.equals(bundle.getSymbolicName()) ? bundle : null);
}
+ @Override
public BundleInfo[] getSystemFragmentedBundles() {
BundleDescription bundle = this.getSystemBundleDescription();
if (bundle == null)
@@ -506,6 +510,7 @@ public class EquinoxBundlesState implements BundlesState {
return convertState(bundle.getFragments());
}
+ @Override
public String[] getUnsatisfiedConstraints(BundleInfo bInfo) {
URI realLocation = bInfo.getLocation();
BundleDescription description = getBundleByLocation(realLocation);
@@ -546,6 +551,7 @@ public class EquinoxBundlesState implements BundlesState {
}
}
+ @Override
public void installBundle(BundleInfo bInfo) throws FrameworkAdminRuntimeException {
SimpleBundlesState.checkAvailability(fwAdmin);
@@ -576,14 +582,17 @@ public class EquinoxBundlesState implements BundlesState {
}
}
+ @Override
public boolean isFullySupported() {
return true;
}
+ @Override
public boolean isResolved() {
return state.isResolved();
}
+ @Override
public boolean isResolved(BundleInfo bInfo) {
URI realLocation = bInfo.getLocation();
BundleDescription description = getBundleByLocation(realLocation);
@@ -592,6 +601,7 @@ public class EquinoxBundlesState implements BundlesState {
return description.isResolved();
}
+ @Override
public void resolve(boolean increment) {
state.resolve(increment);
}
@@ -648,6 +658,7 @@ public class EquinoxBundlesState implements BundlesState {
soFactory = platformAdmin.getFactory();
}
+ @Override
public String toString() {
if (state == null)
return null;
@@ -678,6 +689,7 @@ public class EquinoxBundlesState implements BundlesState {
return sb.toString();
}
+ @Override
public void uninstallBundle(BundleInfo bInfo) throws FrameworkAdminRuntimeException {
SimpleBundlesState.checkAvailability(fwAdmin);
long id = DEFAULT_TIMESTAMP;
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxFrameworkAdminFactoryImpl.java b/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxFrameworkAdminFactoryImpl.java
index 72989059b..7a0659faa 100644
--- a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxFrameworkAdminFactoryImpl.java
+++ b/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxFrameworkAdminFactoryImpl.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * Copyright (c) 2007, 2017 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -15,6 +15,7 @@ import org.eclipse.equinox.internal.provisional.frameworkadmin.FrameworkAdmin;
import org.eclipse.equinox.internal.provisional.frameworkadmin.FrameworkAdminFactory;
public class EquinoxFrameworkAdminFactoryImpl extends FrameworkAdminFactory {
+ @Override
public FrameworkAdmin createFrameworkAdmin() throws InstantiationException, IllegalAccessException, ClassNotFoundException {
String className = System.getProperty(ConfiguratorManipulatorFactory.SYSTEM_PROPERTY_KEY);
if (className == null)
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxFwAdminImpl.java b/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxFwAdminImpl.java
index 9553849b1..d031e02f1 100644
--- a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxFwAdminImpl.java
+++ b/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxFwAdminImpl.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others.
+ * Copyright (c) 2007, 2017 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -76,16 +76,19 @@ public class EquinoxFwAdminImpl implements FrameworkAdmin {
return configuratorManipulator;
}
+ @Override
public Manipulator getManipulator() {
return new EquinoxManipulatorImpl(context, this, platformAdmin, startLevelService, false);
}
+ @Override
public Manipulator getRunningManipulator() {
if (!this.runningFw)
return null;
return new EquinoxManipulatorImpl(context, this, platformAdmin, startLevelService, true);
}
+ @Override
public boolean isActive() {
return active;
}
@@ -113,6 +116,7 @@ public class EquinoxFwAdminImpl implements FrameworkAdmin {
return false;
}
+ @Override
public Process launch(Manipulator manipulator, File cwd) throws IllegalArgumentException, FrameworkAdminRuntimeException, IOException {
//return new EclipseLauncherImpl(context, this).launch(manipulator, cwd);
return new EclipseLauncherImpl(this).launch(manipulator, cwd);
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxFwConfigFileParser.java b/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxFwConfigFileParser.java
index a80c2754c..3faa2fe61 100644
--- a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxFwConfigFileParser.java
+++ b/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxFwConfigFileParser.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2013 IBM Corporation and others.
+ * Copyright (c) 2007, 2017 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -26,7 +26,7 @@ import org.osgi.framework.Constants;
import org.osgi.service.log.LogService;
public class EquinoxFwConfigFileParser {
- private static final Set<String> KNOWN_PROPERTIES = new HashSet<String>(Arrays.asList(new String[] {EquinoxConstants.PROP_BUNDLES, EquinoxConstants.PROP_FW_EXTENSIONS, EquinoxConstants.PROP_INITIAL_STARTLEVEL, EquinoxConstants.PROP_BUNDLES_STARTLEVEL}));
+ private static final Set<String> KNOWN_PROPERTIES = new HashSet<>(Arrays.asList(new String[] {EquinoxConstants.PROP_BUNDLES, EquinoxConstants.PROP_FW_EXTENSIONS, EquinoxConstants.PROP_INITIAL_STARTLEVEL, EquinoxConstants.PROP_BUNDLES_STARTLEVEL}));
private static final String CONFIG_DIR = "@config.dir/"; //$NON-NLS-1$
private static final String KEY_ECLIPSE_PROV_DATA_AREA = "eclipse.p2.data.area"; //$NON-NLS-1$
private static final String KEY_ORG_ECLIPSE_EQUINOX_SIMPLECONFIGURATOR_CONFIGURL = "org.eclipse.equinox.simpleconfigurator.configUrl"; //$NON-NLS-1$
@@ -114,7 +114,7 @@ public class EquinoxFwConfigFileParser {
if (value == null || value.length() == 0)
return null;
- List<BundleInfo> bundles = new ArrayList<BundleInfo>();
+ List<BundleInfo> bundles = new ArrayList<>();
String[] bInfoStrings = Utils.getTokens(value, ","); //$NON-NLS-1$
for (int i = 0; i < bInfoStrings.length; i++) {
String entry = bInfoStrings[i].trim();
@@ -564,7 +564,7 @@ public class EquinoxFwConfigFileParser {
if (bundles == null || sharedBundles == null || bundles.length != sharedBundles.length)
return false;
- List<BundleInfo> compareList = new ArrayList<BundleInfo>(Arrays.asList(bundles));
+ List<BundleInfo> compareList = new ArrayList<>(Arrays.asList(bundles));
compareList.removeAll(Arrays.asList(sharedBundles));
return compareList.isEmpty();
}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxLauncherData.java b/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxLauncherData.java
index 869115bd4..c27f3ee2c 100644
--- a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxLauncherData.java
+++ b/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxLauncherData.java
@@ -1,5 +1,6 @@
/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others. All rights reserved. This
+ * Copyright (c) 2008, 2017 IBM Corporation and others.
+ * All rights reserved. This
* program and the accompanying materials are made available under the terms of
* the Eclipse Public License v1.0 which accompanies this distribution, and is
* available at http://www.eclipse.org/legal/epl-v10.html
@@ -18,6 +19,7 @@ public class EquinoxLauncherData extends LauncherData {
super(fwName, fwVersion, launcherName, launcherVersion);
}
+ @Override
public void setLauncher(File launcherFile) {
if (previousLauncher == null && launcherFile != null && !launcherFile.equals(getLauncher()))
previousLauncher = EquinoxManipulatorImpl.getLauncherConfigLocation(this);
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxManipulatorImpl.java b/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxManipulatorImpl.java
index c91dd13ee..22673cbc9 100644
--- a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxManipulatorImpl.java
+++ b/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxManipulatorImpl.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2015 IBM Corporation and others.
+ * Copyright (c) 2007, 2017 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -29,9 +29,6 @@ import org.osgi.service.log.LogService;
import org.osgi.service.startlevel.StartLevel;
import org.osgi.util.tracker.ServiceTracker;
-/**
- *
- */
public class EquinoxManipulatorImpl implements Manipulator {
private static final long DEFAULT_LASTMODIFIED = 0L;
private static final boolean LOG_ILLEGALSTATEEXCEPTION = false;
@@ -144,6 +141,7 @@ public class EquinoxManipulatorImpl implements Manipulator {
configData.setInitialBundleStartLevel(4);
}
+ @Override
public BundlesState getBundlesState() throws FrameworkAdminRuntimeException {
if (context == null)
return new SimpleBundlesState(fwAdmin, this, EquinoxConstants.FW_SYMBOLIC_NAME);
@@ -157,10 +155,12 @@ public class EquinoxManipulatorImpl implements Manipulator {
return new EquinoxBundlesState(context, fwAdmin, this, platformAdmin, platformProperties);
}
+ @Override
public ConfigData getConfigData() throws FrameworkAdminRuntimeException {
return configData;
}
+ @Override
public BundleInfo[] getExpectedState() throws IllegalArgumentException, FrameworkAdminRuntimeException {
//Log.log(LogService.LOG_DEBUG, this, "getExpectedState()", "BEGIN");
SimpleBundlesState.checkAvailability(fwAdmin);
@@ -173,6 +173,7 @@ public class EquinoxManipulatorImpl implements Manipulator {
return bundleState.getExpectedState();
}
+ @Override
public LauncherData getLauncherData() throws FrameworkAdminRuntimeException {
return launcherData;
}
@@ -233,6 +234,7 @@ public class EquinoxManipulatorImpl implements Manipulator {
return props;
}
+ @Override
public long getTimeStamp() {
long ret = this.getTimeStampWithoutFwPersistentData();
if (this.launcherData.isClean())
@@ -260,6 +262,7 @@ public class EquinoxManipulatorImpl implements Manipulator {
return ret;
}
+ @Override
public void initialize() {
Log.log(LogService.LOG_DEBUG, this, "initialize()", "BEGIN"); //$NON-NLS-1$ //$NON-NLS-2$
configData.initialize();
@@ -324,9 +327,7 @@ public class EquinoxManipulatorImpl implements Manipulator {
configData.setInitialBundleStartLevel(startLevelService.getInitialBundleStartLevel());
}
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator#load()
- */
+ @Override
public void load() throws IllegalStateException, IOException, FrameworkAdminRuntimeException {
Log.log(LogService.LOG_DEBUG, this, "load()", "BEGIN"); //$NON-NLS-1$//$NON-NLS-2$
loadWithoutFwPersistentData();
@@ -371,6 +372,7 @@ public class EquinoxManipulatorImpl implements Manipulator {
}
// Save all parameter in memory into proper config files.
+ @Override
public void save(boolean backup) throws IOException, FrameworkAdminRuntimeException {
Log.log(LogService.LOG_DEBUG, this, "save()", "BEGIN"); //$NON-NLS-1$//$NON-NLS-2$
SimpleBundlesState.checkAvailability(fwAdmin);
@@ -430,6 +432,7 @@ public class EquinoxManipulatorImpl implements Manipulator {
}
}
+ @Override
public void setConfigData(ConfigData configData) {
this.configData.initialize();
this.configData.setInitialBundleStartLevel(configData.getInitialBundleStartLevel());
@@ -493,6 +496,7 @@ public class EquinoxManipulatorImpl implements Manipulator {
return null;
}
+ @Override
public void setLauncherData(LauncherData value) {
launcherData.initialize();
launcherData.setFwConfigLocation(value.getFwConfigLocation());
@@ -528,6 +532,7 @@ public class EquinoxManipulatorImpl implements Manipulator {
return false;
}
+ @Override
public String toString() {
StringBuffer sb = new StringBuffer();
sb.append("++++++++++++++++++++++++++++++++++++++++++\n" + "Class:" + this.getClass().getName() + "\n"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/utils/FileUtils.java b/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/utils/FileUtils.java
index 24dd3b719..7b8029f88 100644
--- a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/utils/FileUtils.java
+++ b/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/utils/FileUtils.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2012 IBM Corporation and others.
+ * Copyright (c) 2007, 2017 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -207,25 +207,15 @@ public class FileUtils {
* Loads an ini file, returning a list of all non-blank lines in the file.
*/
public static List<String> loadFile(File file) throws IOException {
- BufferedReader br = null;
- try {
- br = new BufferedReader(new FileReader(file));
-
+ try (BufferedReader br = new BufferedReader(new FileReader(file));) {
String line;
- List<String> list = new ArrayList<String>();
+ List<String> list = new ArrayList<>();
while ((line = br.readLine()) != null) {
//skip whitespace
if (line.trim().length() > 0)
list.add(line);
}
return list;
- } finally {
- if (br != null)
- try {
- br.close();
- } catch (IOException e) {
- //Ignore
- }
}
}

Back to the top