diff options
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/pack200/Application.java')
-rw-r--r-- | bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/pack200/Application.java | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/pack200/Application.java b/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/pack200/Application.java index a0455ef14..15050c799 100644 --- a/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/pack200/Application.java +++ b/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/pack200/Application.java @@ -1,10 +1,10 @@ /******************************************************************************* - * Copyright (c) 2007, 2016 IBM Corporation and others. All rights reserved. This + * Copyright (c) 2007, 2018 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 - * - * Contributors: + * + * Contributors: * IBM Corporation - initial API and implementation ******************************************************************************/ package org.eclipse.equinox.internal.p2.artifact.optimizers.pack200; @@ -18,15 +18,16 @@ import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository; import org.eclipse.equinox.p2.repository.artifact.IArtifactRepositoryManager; public class Application extends OptimizerApplication { - //Application return code + // Application return code private static final Integer NON_WRITTABLE_REPOSITORY = -1; - //Application arguments + // Application arguments private static final String ARTIFACT_REPOSITORY_ARG = "-artifactRepository"; //$NON-NLS-1$ private static final String ARTIFACT_REPOSITORY_SHORT_ARG = "-ar"; //$NON-NLS-1$ private URI artifactRepositoryLocation; + @Override public Object start(IApplicationContext context) throws Exception { Map<?, ?> args = context.getArguments(); initializeFromArguments((String[]) args.get("application.args")); //$NON-NLS-1$ @@ -49,14 +50,15 @@ public class Application extends OptimizerApplication { if (args == null) return; for (int i = 0; i < args.length; i++) { - // check for args with parameters. If we are at the last argument or - // if the next one has a '-' as the first character, then we can't have + // check for args with parameters. If we are at the last argument or + // if the next one has a '-' as the first character, then we can't have // an arg with a param so continue. if (i == args.length - 1 || args[i + 1].startsWith("-")) //$NON-NLS-1$ continue; String arg = args[++i]; - if (args[i - 1].equalsIgnoreCase(ARTIFACT_REPOSITORY_ARG) || args[i - 1].equalsIgnoreCase(ARTIFACT_REPOSITORY_SHORT_ARG)) + if (args[i - 1].equalsIgnoreCase(ARTIFACT_REPOSITORY_ARG) + || args[i - 1].equalsIgnoreCase(ARTIFACT_REPOSITORY_SHORT_ARG)) artifactRepositoryLocation = new URI(arg); } } |