Bug 567259: Fix documentation build for java > 1.8
update tycho to 1.5.0
fixed invalid documentation links
Change-Id: Ibc16fe274bac9d4eee188108fd75a0f89e88654b
diff --git a/plugins/org.eclipse.ease.help/pom.xml b/plugins/org.eclipse.ease.help/pom.xml
index d31a9aa..d717670 100644
--- a/plugins/org.eclipse.ease.help/pom.xml
+++ b/plugins/org.eclipse.ease.help/pom.xml
@@ -1,4 +1,5 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>org.eclipse.ease.help</artifactId>
@@ -59,7 +60,6 @@
<jvmOption>-DhttpnonProxyHosts=*.eclipse.org</jvmOption>
</jvmOptions>
<additionalArguments>
- <additionalArgument>${javadoc-args}</additionalArgument>
<additionalArgument>
-link
http://docs.oracle.com/javase/8/docs/api/
diff --git a/plugins/org.eclipse.ease.lang.python/src/org/eclipse/ease/lang/python/debugger/IPyFrame.java b/plugins/org.eclipse.ease.lang.python/src/org/eclipse/ease/lang/python/debugger/IPyFrame.java
index fd95b52..1c15519 100644
--- a/plugins/org.eclipse.ease.lang.python/src/org/eclipse/ease/lang/python/debugger/IPyFrame.java
+++ b/plugins/org.eclipse.ease.lang.python/src/org/eclipse/ease/lang/python/debugger/IPyFrame.java
@@ -54,7 +54,7 @@
/**
* Get variables visible from current frame.
*
- * @return variableName -> variableContent
+ * @return variableName -> variableContent
*/
Map<String, Object> getVariables();
diff --git a/plugins/org.eclipse.ease.lang.python/src/org/eclipse/ease/lang/python/debugger/PythonDebugger.java b/plugins/org.eclipse.ease.lang.python/src/org/eclipse/ease/lang/python/debugger/PythonDebugger.java
index bb73584..177f953 100644
--- a/plugins/org.eclipse.ease.lang.python/src/org/eclipse/ease/lang/python/debugger/PythonDebugger.java
+++ b/plugins/org.eclipse.ease.lang.python/src/org/eclipse/ease/lang/python/debugger/PythonDebugger.java
@@ -19,7 +19,6 @@
import org.eclipse.ease.ExitException;
import org.eclipse.ease.IDebugEngine;
import org.eclipse.ease.IExecutionListener;
-import org.eclipse.ease.IScriptEngine;
import org.eclipse.ease.Script;
import org.eclipse.ease.debugging.AbstractEaseDebugger;
import org.eclipse.ease.debugging.EaseDebugFrame;
@@ -44,7 +43,7 @@
private final IPyFrame fFrame;
/**
- * Constructor parses information from {@link IPyFrame} to correct parameters for {@link EaseDebugFrame#ScriptDebugFrame(Script, int, int)}.
+ * Constructor parses information from {@link IPyFrame} to correct parameters for {@link EaseDebugFrame#EaseDebugFrame(Script, int, int)}.
*
* @param frame
* {@link IPyFrame} with information about the current execution frame.
@@ -102,7 +101,7 @@
private boolean fBreakpointsDisabled = false;
/**
- * @see AbstractEaseDebugger#AbstractScriptDebugger(IScriptEngine, boolean)
+ * @see AbstractEaseDebugger#AbstractEaseDebugger(IDebugEngine, boolean)
*/
public PythonDebugger(final IDebugEngine engine, final boolean showDynamicCode) {
super(engine, showDynamicCode);
diff --git a/plugins/org.eclipse.ease.ui.scripts/src/org/eclipse/ease/ui/scripts/preferences/PreferencesHelper.java b/plugins/org.eclipse.ease.ui.scripts/src/org/eclipse/ease/ui/scripts/preferences/PreferencesHelper.java
index d07a11f..8103b46 100644
--- a/plugins/org.eclipse.ease.ui.scripts/src/org/eclipse/ease/ui/scripts/preferences/PreferencesHelper.java
+++ b/plugins/org.eclipse.ease.ui.scripts/src/org/eclipse/ease/ui/scripts/preferences/PreferencesHelper.java
@@ -73,7 +73,7 @@
}
/**
- * Returns a collection of script locations as stored in the preferences. Converts preference data to {@link IEntry} elements.
+ * Returns a collection of script locations as stored in the preferences. Converts preference data to {@link IScriptLocation} elements.
*
* @return all configured script locations
*/
diff --git a/plugins/org.eclipse.ease.ui.scripts/src/org/eclipse/ease/ui/scripts/ui/ScriptDragSource.java b/plugins/org.eclipse.ease.ui.scripts/src/org/eclipse/ease/ui/scripts/ui/ScriptDragSource.java
index 71fdd8d..eb7f1a4 100644
--- a/plugins/org.eclipse.ease.ui.scripts/src/org/eclipse/ease/ui/scripts/ui/ScriptDragSource.java
+++ b/plugins/org.eclipse.ease.ui.scripts/src/org/eclipse/ease/ui/scripts/ui/ScriptDragSource.java
@@ -19,7 +19,7 @@
import org.eclipse.swt.dnd.TreeDragSourceEffect;
/**
- * Source for a script D&D event.
+ * Source for a script D&D event.
*/
public class ScriptDragSource extends TreeDragSourceEffect {
@@ -27,7 +27,7 @@
/**
* Constructor. Gets its macros from a tree selection.
- *
+ *
* @param tree
* tree to read from
*/
@@ -38,7 +38,7 @@
/**
* Does everything to add drag support to a given tree.
- *
+ *
* @param treeViewer
* tree to add drag support to
*/
diff --git a/plugins/org.eclipse.ease.ui.scripts/src/org/eclipse/ease/ui/scripts/ui/ScriptPopupMenu.java b/plugins/org.eclipse.ease.ui.scripts/src/org/eclipse/ease/ui/scripts/ui/ScriptPopupMenu.java
index 38e151c..8d450ee 100644
--- a/plugins/org.eclipse.ease.ui.scripts/src/org/eclipse/ease/ui/scripts/ui/ScriptPopupMenu.java
+++ b/plugins/org.eclipse.ease.ui.scripts/src/org/eclipse/ease/ui/scripts/ui/ScriptPopupMenu.java
@@ -18,7 +18,7 @@
public class ScriptPopupMenu extends AbstractPopupMenu {
- private final List<AbstractPopupItem> mItems = new ArrayList<AbstractPopupItem>();
+ private final List<AbstractPopupItem> mItems = new ArrayList<>();
public ScriptPopupMenu(final String name) {
super(name);
@@ -34,10 +34,6 @@
addPopup(item);
}
- /**
- * @param segment
- * @return
- */
public boolean hasSubMenu(final String name) {
for (final AbstractPopupItem item : mItems) {
if (item.getDisplayName().equals(name))
@@ -47,10 +43,6 @@
return false;
}
- /**
- * @param segment
- * @return
- */
public ScriptPopupMenu getSubMenu(final String name) {
for (final AbstractPopupItem item : mItems) {
if ((item.getDisplayName().equals(name)) && (item instanceof ScriptPopupMenu))
diff --git a/plugins/org.eclipse.ease.ui/src/org/eclipse/ease/ui/completion/CodeCompletionAggregator.java b/plugins/org.eclipse.ease.ui/src/org/eclipse/ease/ui/completion/CodeCompletionAggregator.java
index 040bb64..fd688a9 100644
--- a/plugins/org.eclipse.ease.ui/src/org/eclipse/ease/ui/completion/CodeCompletionAggregator.java
+++ b/plugins/org.eclipse.ease.ui/src/org/eclipse/ease/ui/completion/CodeCompletionAggregator.java
@@ -130,7 +130,7 @@
}
/**
- * Sets the given script engine for all registered completion providers. Calls {@link ICompletionProvider#setScriptEngine(IScriptEngine)}.
+ * Sets the given script engine for all registered completion providers.
*
* @param scriptEngine
* {@link IScriptEngine} to be set.
diff --git a/plugins/org.eclipse.ease.ui/src/org/eclipse/ease/ui/dnd/ShellDropTarget.java b/plugins/org.eclipse.ease.ui/src/org/eclipse/ease/ui/dnd/ShellDropTarget.java
index f820ba2..738ca67 100644
--- a/plugins/org.eclipse.ease.ui/src/org/eclipse/ease/ui/dnd/ShellDropTarget.java
+++ b/plugins/org.eclipse.ease.ui/src/org/eclipse/ease/ui/dnd/ShellDropTarget.java
@@ -96,8 +96,8 @@
*
* @param parent
* control accepting drops
- * @param javaScriptShell
- * shell for DND action execution
+ * @param engineProvider
+ * container providing a script engine
*/
public static void addDropSupport(final Control parent, final IScriptEngineProvider engineProvider) {
final DropTarget target = new DropTarget(parent, DND.DROP_COPY | DND.DROP_MOVE);
diff --git a/plugins/org.eclipse.ease.ui/src/org/eclipse/ease/ui/tools/DecoratedLabelProvider.java b/plugins/org.eclipse.ease.ui/src/org/eclipse/ease/ui/tools/DecoratedLabelProvider.java
index 2833119..bf0ad24 100644
--- a/plugins/org.eclipse.ease.ui/src/org/eclipse/ease/ui/tools/DecoratedLabelProvider.java
+++ b/plugins/org.eclipse.ease.ui/src/org/eclipse/ease/ui/tools/DecoratedLabelProvider.java
@@ -55,7 +55,7 @@
/*
* (non-Javadoc)
- *
+ *
* @see org.eclipse.jface.viewers.DelegatingStyledCellLabelProvider.IStyledLabelProvider#getImage(java.lang.Object)
*/
@Override
@@ -65,7 +65,7 @@
/*
* (non-Javadoc)
- *
+ *
* @see org.eclipse.jface.viewers.DelegatingStyledCellLabelProvider.IStyledLabelProvider#getStyledText(java.lang.Object)
*/
@Override
@@ -81,7 +81,7 @@
/*
* (non-Javadoc)
- *
+ *
* @see org.eclipse.jface.viewers.IBaseLabelProvider#addListener(org.eclipse.jface.viewers.ILabelProviderListener)
*/
@Override
@@ -91,7 +91,7 @@
/*
* (non-Javadoc)
- *
+ *
* @see org.eclipse.jface.viewers.IBaseLabelProvider#dispose()
*/
@Override
@@ -101,7 +101,7 @@
/*
* (non-Javadoc)
- *
+ *
* @see org.eclipse.jface.viewers.IBaseLabelProvider#isLabelProperty(java.lang.Object, java.lang.String)
*/
@Override
@@ -111,7 +111,7 @@
/*
* (non-Javadoc)
- *
+ *
* @see org.eclipse.jface.viewers.IBaseLabelProvider#removeListener(org.eclipse.jface.viewers.ILabelProviderListener)
*/
@Override
@@ -121,7 +121,7 @@
/*
* (non-Javadoc)
- *
+ *
* @see org.eclipse.jface.viewers.IColorProvider#getBackground(java.lang.Object)
*/
@Override
@@ -134,7 +134,7 @@
/*
* (non-Javadoc)
- *
+ *
* @see org.eclipse.jface.viewers.IColorProvider#getForeground(java.lang.Object)
*/
@Override
@@ -147,7 +147,7 @@
/*
* (non-Javadoc)
- *
+ *
* @see org.eclipse.jface.viewers.IFontProvider#getFont(java.lang.Object)
*/
@Override
@@ -168,8 +168,8 @@
}
/**
- * Creates a {@link NavigatorDecoratingLabelProvider}
- *
+ * Creates a NavigatorDecoratingLabelProvider.
+ *
* @param commonLabelProvider
* the label provider to use
*/
@@ -179,7 +179,7 @@
/*
* (non-Javadoc)
- *
+ *
* @see org.eclipse.jface.viewers.StyledCellLabelProvider#initialize(org.eclipse.jface.viewers.ColumnViewer, org.eclipse.jface.viewers.ViewerColumn)
*/
@Override
@@ -194,7 +194,7 @@
/*
* (non-Javadoc)
- *
+ *
* @see org.eclipse.jface.viewers.DecoratingStyledCellLabelProvider#dispose()
*/
@Override
@@ -205,11 +205,11 @@
}
private void refresh() {
- ColumnViewer viewer = getViewer();
+ final ColumnViewer viewer = getViewer();
if (viewer == null) {
return;
}
- boolean showColoredLabels = showColoredLabels();
+ final boolean showColoredLabels = showColoredLabels();
if (showColoredLabels != isOwnerDrawEnabled()) {
setOwnerDrawEnabled(showColoredLabels);
viewer.refresh();
@@ -224,26 +224,21 @@
/*
* (non-Javadoc)
- *
+ *
* @see org.eclipse.jface.util.IPropertyChangeListener#propertyChange(org.eclipse.jface.util.PropertyChangeEvent)
*/
@Override
public void propertyChange(final PropertyChangeEvent event) {
- String property = event.getProperty();
+ final String property = event.getProperty();
if (property.equals(JFacePreferences.QUALIFIER_COLOR) || property.equals(JFacePreferences.COUNTER_COLOR)
|| property.equals(JFacePreferences.DECORATIONS_COLOR) || property.equals(IWorkbenchPreferenceConstants.USE_COLORED_LABELS)) {
- Display.getDefault().asyncExec(new Runnable() {
- @Override
- public void run() {
- refresh();
- }
- });
+ Display.getDefault().asyncExec(() -> refresh());
}
}
/*
* (non-Javadoc)
- *
+ *
* @see org.eclipse.jface.viewers.ILabelProvider#getText(java.lang.Object)
*/
@Override
diff --git a/plugins/org.eclipse.ease.ui/src/org/eclipse/ease/ui/view/ScriptHistoryText.java b/plugins/org.eclipse.ease.ui/src/org/eclipse/ease/ui/view/ScriptHistoryText.java
index cf06804..5ccc455 100644
--- a/plugins/org.eclipse.ease.ui/src/org/eclipse/ease/ui/view/ScriptHistoryText.java
+++ b/plugins/org.eclipse.ease.ui/src/org/eclipse/ease/ui/view/ScriptHistoryText.java
@@ -218,8 +218,8 @@
/**
* Print the script command.
*
- * @param text
- * text to print
+ * @param message
+ * message to print
*/
public void printCommand(final String message) {
if (message != null) {
diff --git a/plugins/org.eclipse.ease/src/org/eclipse/ease/ICodeFactory.java b/plugins/org.eclipse.ease/src/org/eclipse/ease/ICodeFactory.java
index 46aaf19..fc35016 100644
--- a/plugins/org.eclipse.ease/src/org/eclipse/ease/ICodeFactory.java
+++ b/plugins/org.eclipse.ease/src/org/eclipse/ease/ICodeFactory.java
@@ -94,8 +94,7 @@
String classInstantiation(Class<?> clazz, String[] parameters);
/**
- * Create code to call a wrapped function. Create code to call a script function that was wrapped using
- * {@link #createFunctionWrapper(IEnvironment, String, Method)} before.
+ * Create code to call a wrapped function.
*
* @param method
* method to be called
diff --git a/plugins/org.eclipse.ease/src/org/eclipse/ease/ICompletionContext.java b/plugins/org.eclipse.ease/src/org/eclipse/ease/ICompletionContext.java
index 1df82e6..1ad4478 100644
--- a/plugins/org.eclipse.ease/src/org/eclipse/ease/ICompletionContext.java
+++ b/plugins/org.eclipse.ease/src/org/eclipse/ease/ICompletionContext.java
@@ -61,7 +61,7 @@
Collection<ModuleDefinition> getLoadedModules();
/**
- * Get a list of included resource. Returns a map of resource objects -> resource content.
+ * Get a list of included resource. Returns a map of resource objects -> resource content.
*
* @return map of included resources
*/
diff --git a/plugins/org.eclipse.ease/src/org/eclipse/ease/ISecurityCheck.java b/plugins/org.eclipse.ease/src/org/eclipse/ease/ISecurityCheck.java
index 8c14425..99c585b 100644
--- a/plugins/org.eclipse.ease/src/org/eclipse/ease/ISecurityCheck.java
+++ b/plugins/org.eclipse.ease/src/org/eclipse/ease/ISecurityCheck.java
@@ -23,9 +23,8 @@
/**
* Verification to be performed before a certain engine action is executed.
* <p>
- * For {@value ActionType#INJECT_CODE} following parameters are provided:<br/>
- * data[0] ... {@link Script} instance<br/>
- * data[1] ... boolean indicator if script should be run in the UI thread
+ * For {@link ActionType#INJECT_CODE} following parameters are provided: data[0] ... {@link Script} instance data[1] ... boolean indicator if script should
+ * be run in the UI thread
* </p>
* When <code>false</code> is returned the action will be silently skipped if possible. On {@link SecurityException}s the exception message will be provided
* as user feedback.
diff --git a/plugins/org.eclipse.ease/src/org/eclipse/ease/ScriptExecutionException.java b/plugins/org.eclipse.ease/src/org/eclipse/ease/ScriptExecutionException.java
index 66b925b..98e2e94 100644
--- a/plugins/org.eclipse.ease/src/org/eclipse/ease/ScriptExecutionException.java
+++ b/plugins/org.eclipse.ease/src/org/eclipse/ease/ScriptExecutionException.java
@@ -58,8 +58,6 @@
*
* @param message
* error message
- * @param lineNumber
- * number of the line where the error happened
* @param columnNumber
* number of the column where the error happened
* @param lineSource
diff --git a/plugins/org.eclipse.ease/src/org/eclipse/ease/debugging/IScriptRegistry.java b/plugins/org.eclipse.ease/src/org/eclipse/ease/debugging/IScriptRegistry.java
index f36926a..35024a0 100644
--- a/plugins/org.eclipse.ease/src/org/eclipse/ease/debugging/IScriptRegistry.java
+++ b/plugins/org.eclipse.ease/src/org/eclipse/ease/debugging/IScriptRegistry.java
@@ -40,7 +40,7 @@
/**
* Get the {@link IResource} identified by this {@link Script}.
*
- * @param resource
+ * @param script
* {@link Script} to get {@link IResource} for.
* @return {@link IResource} identified by {@link Script} or {@code null} if no mapping found.
*/
diff --git a/plugins/org.eclipse.ease/src/org/eclipse/ease/sign/VerifySignature.java b/plugins/org.eclipse.ease/src/org/eclipse/ease/sign/VerifySignature.java
index b3cb304..1f11724 100644
--- a/plugins/org.eclipse.ease/src/org/eclipse/ease/sign/VerifySignature.java
+++ b/plugins/org.eclipse.ease/src/org/eclipse/ease/sign/VerifySignature.java
@@ -81,20 +81,20 @@
public static VerifySignature getInstance(final ScriptType scriptType, final InputStream inputStream, final InputStream signatureInputStream)
throws ScriptSignatureException {
- if (scriptType == null || inputStream == null)
+ if ((scriptType == null) || (inputStream == null))
throw new ScriptSignatureException("One or more parameters are not provided");
- ICodeParser iCodeParser = scriptType.getCodeParser();
-
+ final ICodeParser iCodeParser = scriptType.getCodeParser();
+
if (iCodeParser == null) {
return null;
}
-
+
if (signatureInputStream == null) {
- SignatureInfo signatureInfo = iCodeParser.getSignatureInfo(inputStream);
+ final SignatureInfo signatureInfo = iCodeParser.getSignatureInfo(inputStream);
if (signatureInfo != null) {
- if (signatureInfo.getSignature() == null || signatureInfo.getProvider() == null || signatureInfo.getMessageDigestAlgo() == null
- || signatureInfo.getCertificateChain() == null || signatureInfo.getContentOnly() == null)
+ if ((signatureInfo.getSignature() == null) || (signatureInfo.getProvider() == null) || (signatureInfo.getMessageDigestAlgo() == null)
+ || (signatureInfo.getCertificateChain() == null) || (signatureInfo.getContentOnly() == null))
throw new ScriptSignatureException("Error while parsing script. Try again.");
return new VerifySignature(signatureInfo);
@@ -103,14 +103,14 @@
return null;
} else {
- SignatureInfo signatureInfo = iCodeParser.getSignatureInfo(signatureInputStream);
+ final SignatureInfo signatureInfo = iCodeParser.getSignatureInfo(signatureInputStream);
if (signatureInfo != null) {
- if (signatureInfo.getSignature() == null || signatureInfo.getProvider() == null || signatureInfo.getMessageDigestAlgo() == null
- || signatureInfo.getCertificateChain() == null)
+ if ((signatureInfo.getSignature() == null) || (signatureInfo.getProvider() == null) || (signatureInfo.getMessageDigestAlgo() == null)
+ || (signatureInfo.getCertificateChain() == null))
throw new ScriptSignatureException("Error while parsing script. Try again.");
- BufferedInputStream bInput = new BufferedInputStream(inputStream);
- StringBuffer sBuf = new StringBuffer();
+ final BufferedInputStream bInput = new BufferedInputStream(inputStream);
+ final StringBuffer sBuf = new StringBuffer();
int cur;
try {
@@ -121,7 +121,7 @@
return new VerifySignature(signatureInfo);
- } catch (IOException e) {
+ } catch (final IOException e) {
Logger.error(Activator.PLUGIN_ID, e.getMessage(), e);
throw new ScriptSignatureException("An IO error occurred while reading file.", e);
@@ -129,7 +129,7 @@
try {
if (bInput != null)
bInput.close();
- } catch (IOException e) {
+ } catch (final IOException e) {
Logger.error(Activator.PLUGIN_ID, e.getMessage(), e);
}
@@ -166,7 +166,7 @@
certificateFactory = CertificateFactory.getInstance("X.509");
return certificateFactory.generateCertificate(new ByteArrayInputStream(bytesCert));
- } catch (CertificateException e) {
+ } catch (final CertificateException e) {
throw new ScriptSignatureException("Error while retrieving certificate.", e);
}
}
@@ -180,15 +180,15 @@
*/
private List<Certificate> getCertificateChain() throws ScriptSignatureException {
- String certChainString[] = fSignatureInfo.getCertificateChain();
- int noOfCert = certChainString.length;
- byte[][] certChainByte = new byte[noOfCert][];
+ final String certChainString[] = fSignatureInfo.getCertificateChain();
+ final int noOfCert = certChainString.length;
+ final byte[][] certChainByte = new byte[noOfCert][];
for (int i = 0; i < noOfCert; i++)
certChainByte[i] = SignatureHelper.convertBase64ToBytes(certChainString[i]);
- ArrayList<Certificate> certificateList = new ArrayList<>();
- for (byte cert[] : certChainByte)
+ final ArrayList<Certificate> certificateList = new ArrayList<>();
+ for (final byte cert[] : certChainByte)
certificateList.add(getCertificate(cert));
return certificateList;
@@ -204,8 +204,8 @@
public boolean isSelfSignedCertificate() throws ScriptSignatureException {
if (fSignatureInfo != null) {
- ArrayList<Certificate> certificateList = (ArrayList<Certificate>) getCertificateChain();
- Certificate certificate = certificateList.get(0);
+ final ArrayList<Certificate> certificateList = (ArrayList<Certificate>) getCertificateChain();
+ final Certificate certificate = certificateList.get(0);
return SignatureHelper.isSelfSignedCertificate(certificate);
}
@@ -227,35 +227,35 @@
*/
public boolean isCertChainValid(InputStream trustStoreLocation, char[] trustStorePassword) throws ScriptSignatureException {
- if ((trustStoreLocation == null && trustStorePassword != null) || (trustStoreLocation != null && trustStorePassword == null))
+ if (((trustStoreLocation == null) && (trustStorePassword != null)) || ((trustStoreLocation != null) && (trustStorePassword == null)))
throw new ScriptSignatureException("Either both or none of the parameters should be null");
if (fSignatureInfo != null) {
InputStream iStream = null;
try {
- if (trustStoreLocation == null && trustStorePassword == null) {
+ if ((trustStoreLocation == null) && (trustStorePassword == null)) {
// TODO check following command for windows
iStream = new FileInputStream(System.getProperty("java.home") + "/lib/security/" + "cacerts");
trustStorePassword = "changeit".toCharArray();
} else
iStream = ResourceTools.getInputStream(trustStoreLocation);
- CertificateFactory certificateFactory = CertificateFactory.getInstance("X.509");
+ final CertificateFactory certificateFactory = CertificateFactory.getInstance("X.509");
- ArrayList<Certificate> certificateList = (ArrayList<Certificate>) getCertificateChain();
+ final ArrayList<Certificate> certificateList = (ArrayList<Certificate>) getCertificateChain();
- int certLength = certificateList.size();
+ final int certLength = certificateList.size();
if (SignatureHelper.isSelfSignedCertificate(certificateList.get(certLength - 1)))
certificateList.remove(certLength - 1);
- CertPath certPath = certificateFactory.generateCertPath(certificateList);
+ final CertPath certPath = certificateFactory.generateCertPath(certificateList);
- CertPathValidator validator = CertPathValidator.getInstance("PKIX");
+ final CertPathValidator validator = CertPathValidator.getInstance("PKIX");
- KeyStore keystore = KeyStore.getInstance("JKS");
+ final KeyStore keystore = KeyStore.getInstance("JKS");
keystore.load(iStream, trustStorePassword);
- PKIXParameters params = new PKIXParameters(keystore);
+ final PKIXParameters params = new PKIXParameters(keystore);
params.setRevocationEnabled(true);
// If certificate does not contain OSCP or CRL responder than that certificate will be considered invalid
@@ -267,29 +267,29 @@
validator.validate(certPath, params);
return true;
- } catch (CertificateException e) {
+ } catch (final CertificateException e) {
throw new ScriptSignatureException("One or more certificates can't be loaded.", e);
- } catch (NoSuchAlgorithmException e) {
+ } catch (final NoSuchAlgorithmException e) {
throw new ScriptSignatureException("Algorithm used for securing truststore can't be found. Chose another Truststore.", e);
- } catch (KeyStoreException e) {
+ } catch (final KeyStoreException e) {
throw new ScriptSignatureException("Truststore can't be loaded.");
- } catch (IOException e) {
+ } catch (final IOException e) {
if (e.getCause() instanceof UnrecoverableKeyException)
throw new ScriptSignatureException("Invalid Truststore Password.", e);
- else if (e.getCause() instanceof FileNotFoundException || e.getCause() instanceof SecurityException)
+ else if ((e.getCause() instanceof FileNotFoundException) || (e.getCause() instanceof SecurityException))
throw new ScriptSignatureException("File can't be read. Chose another Truststore or try again.", e);
Logger.error(Activator.PLUGIN_ID, Arrays.toString(e.getStackTrace()), e);
throw new ScriptSignatureException("Error loading Truststore. Try again.", e);
- } catch (InvalidAlgorithmParameterException e) {
+ } catch (final InvalidAlgorithmParameterException e) {
Logger.error(Activator.PLUGIN_ID, Arrays.toString(e.getStackTrace()), e);
throw new ScriptSignatureException("Can't perform validation.", e);
- } catch (CertPathValidatorException e) {
+ } catch (final CertPathValidatorException e) {
// if any invalidation occurs, exception will be caught here
throw new ScriptSignatureException(e.getMessage());
@@ -297,7 +297,7 @@
try {
if (iStream != null)
iStream.close();
- } catch (IOException e) {
+ } catch (final IOException e) {
Logger.error(Activator.PLUGIN_ID, Arrays.toString(e.getStackTrace()), e);
}
}
@@ -307,7 +307,7 @@
/**
* Checks the validity of certificate. If certificate is CA signed, then it checks the validity of CA with trust-store. It uses default truststore present
- * at JRE_PATH/lib/security/cacerts and "changeit" as password. If password has been modified, use {@link #isCertChainValid(String, char[])}.
+ * at JRE_PATH/lib/security/cacerts and "changeit" as password. If password has been modified, use {@link #isCertChainValid(InputStream, char[])}.
*
* @return <code>true</code> if certificate is valid and trusted or <code>false</code> if certificate is invalid or not trusted
* @throws ScriptSignatureException
@@ -328,15 +328,16 @@
public boolean verify() throws ScriptSignatureException {
if (fSignatureInfo != null) {
- byte[] signByte = SignatureHelper.convertBase64ToBytes(fSignatureInfo.getSignature());
- byte[] certByte = SignatureHelper.convertBase64ToBytes(fSignatureInfo.getCertificateChain()[0]);
- Certificate userCert = getCertificate(certByte);
+ final byte[] signByte = SignatureHelper.convertBase64ToBytes(fSignatureInfo.getSignature());
+ final byte[] certByte = SignatureHelper.convertBase64ToBytes(fSignatureInfo.getCertificateChain()[0]);
+ final Certificate userCert = getCertificate(certByte);
try {
- PublicKey publicKey = userCert.getPublicKey();
- String encryptionAlgo = publicKey.getAlgorithm();
+ final PublicKey publicKey = userCert.getPublicKey();
+ final String encryptionAlgo = publicKey.getAlgorithm();
- Signature signature = Signature.getInstance(fSignatureInfo.getMessageDigestAlgo() + "with" + encryptionAlgo, fSignatureInfo.getProvider());
+ final Signature signature = Signature.getInstance(fSignatureInfo.getMessageDigestAlgo() + "with" + encryptionAlgo,
+ fSignatureInfo.getProvider());
// initialize signature instance with public key
signature.initVerify(publicKey);
@@ -346,17 +347,17 @@
return signature.verify(signByte);
- } catch (SignatureException e) {
+ } catch (final SignatureException e) {
Logger.error(Activator.PLUGIN_ID, "Signature object not initialized properly or signature is not readable.", e);
throw new ScriptSignatureException("Signature is not readable.", e);
- } catch (NoSuchAlgorithmException e) {
+ } catch (final NoSuchAlgorithmException e) {
throw new ScriptSignatureException("Algorithm used by signature is not recognized by provider.", e);
- } catch (InvalidKeyException e) {
+ } catch (final InvalidKeyException e) {
throw new ScriptSignatureException("Public key is invalid.", e);
- } catch (NoSuchProviderException e) {
+ } catch (final NoSuchProviderException e) {
throw new ScriptSignatureException("No such provider is registered in Security Providers' list.", e);
}
diff --git a/releng/org.eclipse.ease.releng/pom.xml b/releng/org.eclipse.ease.releng/pom.xml
index a30d052..c41c77f 100644
--- a/releng/org.eclipse.ease.releng/pom.xml
+++ b/releng/org.eclipse.ease.releng/pom.xml
@@ -15,7 +15,7 @@
<properties>
<!-- used plugin versions -->
- <tycho.version>1.3.0</tycho.version>
+ <tycho.version>1.5.0</tycho.version>
<tycho.extras.version>${tycho.version}</tycho.extras.version>
<maven.compiler.version>3.6.1</maven.compiler.version>
<maven.javadoc.version>2.9.1</maven.javadoc.version>
@@ -290,7 +290,7 @@
</offlineLink>
<offlineLink>
<url>../../org.eclipse.ease.help/help/api-docs/javadoc/</url>
- <location>https://hudson.eclipse.org/ease/job/ease-build-core/javadoc/</location>
+ <location>https://ci.eclipse.org/ease/job/ease.build.core/JavaDoc</location>
</offlineLink>
</offlineLinks>
</configuration>