diff options
author | Pascal Rapicault | 2009-05-09 00:42:06 +0000 |
---|---|---|
committer | Pascal Rapicault | 2009-05-09 00:42:06 +0000 |
commit | 917e9e1252c30099fe0226b37de01665d48b4fdc (patch) | |
tree | 0e8831330e99e20133dcb005e347e9fe5e64d2a8 /bundles/org.eclipse.equinox.p2.repository | |
parent | 90c5831b83c7f3e20d39afceabecabfdaf21bf3b (diff) | |
download | rt.equinox.p2-917e9e1252c30099fe0226b37de01665d48b4fdc.tar.gz rt.equinox.p2-917e9e1252c30099fe0226b37de01665d48b4fdc.tar.xz rt.equinox.p2-917e9e1252c30099fe0226b37de01665d48b4fdc.zip |
Bug 275493 - NPE in the log
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.repository')
-rw-r--r-- | bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/RepositoryStatusHelper.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/RepositoryStatusHelper.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/RepositoryStatusHelper.java index c5c2d5bb3..840e487b2 100644 --- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/RepositoryStatusHelper.java +++ b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/RepositoryStatusHelper.java @@ -236,13 +236,13 @@ public abstract class RepositoryStatusHelper { if (((IncomingFileTransferException) t).getErrorCode() == 401) throw new AuthenticationFailedException(); IStatus status = ((IncomingFileTransferException) t).getStatus(); - t = status.getException(); + t = status == null ? t : status.getException(); // From Use of Browse } else if (t instanceof BrowseFileTransferException) { if (((BrowseFileTransferException) t).getErrorCode() == 401) throw new AuthenticationFailedException(); IStatus status = ((BrowseFileTransferException) t).getStatus(); - t = status.getException(); + t = status == null ? t : status.getException(); } if (t == null || !(t instanceof IOException)) @@ -279,7 +279,8 @@ public abstract class RepositoryStatusHelper { if (t instanceof FileNotFoundException) throw (FileNotFoundException) t; if (t instanceof CoreException) { - Throwable e = ((CoreException) t).getStatus().getException(); + IStatus status = ((CoreException) t).getStatus(); + Throwable e = status == null ? null : status.getException(); if (e instanceof FileNotFoundException) throw (FileNotFoundException) e; } |