[jbosstools-issues] [JBoss JIRA] (JBIDE-25098) Provide a status preserving the stacktrace in DownloadRuntimeOperationUtility.downloadAndUnzip

Martin Malina (JIRA) issues at jboss.org
Tue Oct 10 05:35:00 EDT 2017


     [ https://issues.jboss.org/browse/JBIDE-25098?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Malina closed JBIDE-25098.
---------------------------------


Merged in master. Closing.

> Provide a status preserving the stacktrace in DownloadRuntimeOperationUtility.downloadAndUnzip
> ----------------------------------------------------------------------------------------------
>
>                 Key: JBIDE-25098
>                 URL: https://issues.jboss.org/browse/JBIDE-25098
>             Project: Tools (JBoss Tools)
>          Issue Type: Enhancement
>          Components: server
>    Affects Versions: 4.5.0.Final
>            Reporter: Aurélien Pupier
>            Assignee: Aurélien Pupier
>             Fix For: 4.5.1.AM3
>
>
> in org.jboss.tools.runtime.core.util.internal.DownloadRuntimeOperationUtility.downloadAndUnzip(String, String, String, boolean, String, String, TaskModel, IProgressMonitor)
> a status is directly returned instead of following the guidelines explained in the javadoc for CoreException.getStatus to recreate a Status which will preserve the stacktrace
> {noformat}
> IStatus org.eclipse.core.runtime.CoreException.getStatus()
> Returns the status object for this exception. 
> IMPORTANT:
>  The result must NOT be used for logging, error reporting, or as a method return value, since that code pattern hides the original stack trace. Instead, create a new Status with your plug-in ID and this CoreException, and use that new status for error reporting or as a method return value. For example, instead of: 
>       yourPlugin.getLog().log(exception.getStatus());
>    
> Use:       IStatus result = new Status(exception.getStatus().getSeverity(), pluginId, message, exception);
>       yourPlugin.getLog().log(result);
>    
> Returns:a status object
> {noformat}



--
This message was sent by Atlassian JIRA
(v7.5.0#75005)



More information about the jbosstools-issues mailing list