ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gin...@apache.org
Subject ant-ivyde git commit: Trim exceptions
Date Wed, 01 Nov 2017 21:30:19 GMT
Repository: ant-ivyde
Updated Branches:
  refs/heads/master ecf9ef902 -> eec4eac35


Trim exceptions

Project: http://git-wip-us.apache.org/repos/asf/ant-ivyde/repo
Commit: http://git-wip-us.apache.org/repos/asf/ant-ivyde/commit/eec4eac3
Tree: http://git-wip-us.apache.org/repos/asf/ant-ivyde/tree/eec4eac3
Diff: http://git-wip-us.apache.org/repos/asf/ant-ivyde/diff/eec4eac3

Branch: refs/heads/master
Commit: eec4eac352afe3623b9e314655473e5dd776f7a5
Parents: ecf9ef9
Author: Gintas Grigelionis <gintas@apache.org>
Authored: Wed Nov 1 22:29:58 2017 +0100
Committer: Gintas Grigelionis <gintas@apache.org>
Committed: Wed Nov 1 22:29:58 2017 +0100

----------------------------------------------------------------------
 .../ivyde/eclipse/cp/IvyClasspathContainerHelper.java    | 10 ++--------
 .../java/org/apache/ivyde/eclipse/cp/SettingsSetup.java  |  4 ++--
 .../org/apache/ivyde/internal/eclipse/CachedIvy.java     |  4 ++--
 .../eclipse/IvyDERuntimeClasspathEntryResolver.java      |  3 +--
 .../eclipse/cpcontainer/ClasspathEntriesResolver.java    |  3 +--
 .../cpcontainer/IvyClasspathContainerSerializer.java     |  2 +-
 .../eclipse/cpcontainer/IvyClasspathContainerState.java  |  4 ++--
 .../ivyde/internal/eclipse/resolve/IvyResolver.java      |  2 +-
 .../eclipse/retrieve/StandaloneRetrieveSetupState.java   |  4 ++--
 .../WorkspaceResourceChangeListener.java                 | 11 +++--------
 10 files changed, 17 insertions(+), 30 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ant-ivyde/blob/eec4eac3/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cp/IvyClasspathContainerHelper.java
----------------------------------------------------------------------
diff --git a/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cp/IvyClasspathContainerHelper.java
b/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cp/IvyClasspathContainerHelper.java
index 960b179..e6ffd48 100644
--- a/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cp/IvyClasspathContainerHelper.java
+++ b/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cp/IvyClasspathContainerHelper.java
@@ -158,14 +158,8 @@ public final class IvyClasspathContainerHelper {
                         IClasspathContainer cp = JavaCore.getClasspathContainer(path, javaProject);
                         if (cp instanceof IvyClasspathContainerImpl) {
                             IvyClasspathContainerImpl ivycp = (IvyClasspathContainerImpl)
cp;
-                            ResolvedPath settingsPath;
-                            try {
-                                settingsPath = ivycp.getConf().getInheritedSettingsSetup()
-                                        .getResolvedIvySettingsPath(ivycp.getConf().getProject());
-                            } catch (IvyDEException e) {
-                                // cannot resolve the ivy settings so just ignore
-                                continue;
-                            }
+                            ResolvedPath settingsPath = ivycp.getConf().getInheritedSettingsSetup()
+                                    .getResolvedIvySettingsPath(ivycp.getConf().getProject());
                             if (settingsPath.getResolvedPath().equals(
                                 ivySettings.getProjectRelativePath().toString())) {
                                 containers.add(ivycp);

http://git-wip-us.apache.org/repos/asf/ant-ivyde/blob/eec4eac3/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cp/SettingsSetup.java
----------------------------------------------------------------------
diff --git a/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cp/SettingsSetup.java
b/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cp/SettingsSetup.java
index 61993f7..ae9c0b9 100644
--- a/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cp/SettingsSetup.java
+++ b/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cp/SettingsSetup.java
@@ -55,7 +55,7 @@ public class SettingsSetup {
         this.ivyUserDir = setup.ivyUserDir;
     }
 
-    public ResolvedPath getResolvedIvySettingsPath(IProject project) throws IvyDEException
{
+    public ResolvedPath getResolvedIvySettingsPath(IProject project) {
         return new ResolvedPath(ivySettingsPath, project);
     }
 
@@ -104,7 +104,7 @@ public class SettingsSetup {
         this.ivyUserDir = ivyUserDir;
     }
 
-    public ResolvedPath getResolvedIvyUserDir(IProject project) throws IvyDEException {
+    public ResolvedPath getResolvedIvyUserDir(IProject project) {
         return new ResolvedPath(ivyUserDir, project);
     }
 

http://git-wip-us.apache.org/repos/asf/ant-ivyde/blob/eec4eac3/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/CachedIvy.java
----------------------------------------------------------------------
diff --git a/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/CachedIvy.java
b/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/CachedIvy.java
index 9d871b5..eb6216e 100644
--- a/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/CachedIvy.java
+++ b/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/CachedIvy.java
@@ -82,11 +82,11 @@ public abstract class CachedIvy {
 
     protected abstract String getIvyXmlPath();
 
-    protected abstract ResolvedPath getIvySettingsPath() throws IvyDEException;
+    protected abstract ResolvedPath getIvySettingsPath();
 
     protected abstract boolean isLoadSettingsOnDemandPath();
 
-    protected abstract ResolvedPath getIvyUserDir() throws IvyDEException;
+    protected abstract ResolvedPath getIvyUserDir();
 
     protected abstract Collection getPropertyFiles() throws IvyDEException;
 

http://git-wip-us.apache.org/repos/asf/ant-ivyde/blob/eec4eac3/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/IvyDERuntimeClasspathEntryResolver.java
----------------------------------------------------------------------
diff --git a/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/IvyDERuntimeClasspathEntryResolver.java
b/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/IvyDERuntimeClasspathEntryResolver.java
index a34c10d..8e63c79 100644
--- a/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/IvyDERuntimeClasspathEntryResolver.java
+++ b/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/IvyDERuntimeClasspathEntryResolver.java
@@ -36,7 +36,6 @@ import org.eclipse.jdt.core.IClasspathContainer;
 import org.eclipse.jdt.core.IClasspathEntry;
 import org.eclipse.jdt.core.IJavaProject;
 import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jdt.core.JavaModelException;
 import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
 import org.eclipse.jdt.launching.IRuntimeClasspathEntry;
 import org.eclipse.jdt.launching.IRuntimeClasspathEntry2;
@@ -65,7 +64,7 @@ public class IvyDERuntimeClasspathEntryResolver implements IRuntimeClasspathEntr
     }
 
     private IRuntimeClasspathEntry[] computeDefaultContainerEntries(IRuntimeClasspathEntry
entry,
-            IJavaProject project) throws JavaModelException, CoreException {
+            IJavaProject project) throws CoreException {
         IvyClasspathContainerImpl ivycp;
 
         if (project == null) {

http://git-wip-us.apache.org/repos/asf/ant-ivyde/blob/eec4eac3/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/cpcontainer/ClasspathEntriesResolver.java
----------------------------------------------------------------------
diff --git a/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/cpcontainer/ClasspathEntriesResolver.java
b/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/cpcontainer/ClasspathEntriesResolver.java
index b563f71..aa82ac0 100644
--- a/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/cpcontainer/ClasspathEntriesResolver.java
+++ b/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/cpcontainer/ClasspathEntriesResolver.java
@@ -17,7 +17,6 @@
  */
 package org.apache.ivyde.internal.eclipse.cpcontainer;
 
-import java.io.IOException;
 import java.util.HashSet;
 import java.util.Iterator;
 import java.util.Set;
@@ -62,7 +61,7 @@ public class ClasspathEntriesResolver extends IvyResolver {
     }
 
     protected void postResolveOrRefresh(Ivy ivy, ModuleDescriptor md, ResolveResult resolveResult,
-            IProgressMonitor monitor) throws IOException {
+            IProgressMonitor monitor) {
         IvyClasspathContainerMapper mapper = new IvyClasspathContainerMapper(monitor, ivy,
conf,
                 resolveResult);
 

http://git-wip-us.apache.org/repos/asf/ant-ivyde/blob/eec4eac3/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/cpcontainer/IvyClasspathContainerSerializer.java
----------------------------------------------------------------------
diff --git a/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/cpcontainer/IvyClasspathContainerSerializer.java
b/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/cpcontainer/IvyClasspathContainerSerializer.java
index 6ee8825..c9fb8de 100644
--- a/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/cpcontainer/IvyClasspathContainerSerializer.java
+++ b/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/cpcontainer/IvyClasspathContainerSerializer.java
@@ -439,7 +439,7 @@ public class IvyClasspathContainerSerializer {
         return att;
     }
 
-    private String getAttribute(NamedNodeMap attributes, String name) throws IOException
{
+    private String getAttribute(NamedNodeMap attributes, String name) {
         Node node = attributes.getNamedItem(name);
         if (node == null) {
             return null;

http://git-wip-us.apache.org/repos/asf/ant-ivyde/blob/eec4eac3/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/cpcontainer/IvyClasspathContainerState.java
----------------------------------------------------------------------
diff --git a/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/cpcontainer/IvyClasspathContainerState.java
b/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/cpcontainer/IvyClasspathContainerState.java
index 0cd8191..1537637 100644
--- a/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/cpcontainer/IvyClasspathContainerState.java
+++ b/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/cpcontainer/IvyClasspathContainerState.java
@@ -42,7 +42,7 @@ public class IvyClasspathContainerState extends CachedIvy {
         reset();
     }
 
-    protected ResolvedPath getIvySettingsPath() throws IvyDEException {
+    protected ResolvedPath getIvySettingsPath() {
         return conf.getInheritedSettingsSetup().getResolvedIvySettingsPath(getProject());
     }
 
@@ -62,7 +62,7 @@ public class IvyClasspathContainerState extends CachedIvy {
         return conf.getInheritedSettingsSetup().isLoadSettingsOnDemand();
     }
 
-    protected ResolvedPath getIvyUserDir() throws IvyDEException {
+    protected ResolvedPath getIvyUserDir() {
         return conf.getInheritedSettingsSetup().getResolvedIvyUserDir(getProject());
     }
 

http://git-wip-us.apache.org/repos/asf/ant-ivyde/blob/eec4eac3/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/resolve/IvyResolver.java
----------------------------------------------------------------------
diff --git a/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/resolve/IvyResolver.java
b/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/resolve/IvyResolver.java
index dd20288..34920cc 100644
--- a/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/resolve/IvyResolver.java
+++ b/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/resolve/IvyResolver.java
@@ -192,7 +192,7 @@ public class IvyResolver {
     }
 
     protected void postResolveOrRefresh(Ivy ivy, ModuleDescriptor md, ResolveResult resolveResult,
-            IProgressMonitor monitor) throws IOException {
+            IProgressMonitor monitor) {
         // nothing to do by default
     }
 

http://git-wip-us.apache.org/repos/asf/ant-ivyde/blob/eec4eac3/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/retrieve/StandaloneRetrieveSetupState.java
----------------------------------------------------------------------
diff --git a/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/retrieve/StandaloneRetrieveSetupState.java
b/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/retrieve/StandaloneRetrieveSetupState.java
index 2a781f8..d56a0a9 100644
--- a/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/retrieve/StandaloneRetrieveSetupState.java
+++ b/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/retrieve/StandaloneRetrieveSetupState.java
@@ -32,7 +32,7 @@ public class StandaloneRetrieveSetupState extends CachedIvy {
         this.setup = setup;
     }
 
-    protected ResolvedPath getIvySettingsPath() throws IvyDEException {
+    protected ResolvedPath getIvySettingsPath() {
         return setup.getInheritedSettingSetup().getResolvedIvySettingsPath(setup.getProject());
     }
 
@@ -44,7 +44,7 @@ public class StandaloneRetrieveSetupState extends CachedIvy {
         return setup.getProject();
     }
 
-    protected ResolvedPath getIvyUserDir() throws IvyDEException {
+    protected ResolvedPath getIvyUserDir() {
         return setup.getInheritedSettingSetup().getResolvedIvyUserDir(setup.getProject());
     }
 

http://git-wip-us.apache.org/repos/asf/ant-ivyde/blob/eec4eac3/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/workspaceresolver/WorkspaceResourceChangeListener.java
----------------------------------------------------------------------
diff --git a/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/workspaceresolver/WorkspaceResourceChangeListener.java
b/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/workspaceresolver/WorkspaceResourceChangeListener.java
index 281503c..a633524 100644
--- a/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/workspaceresolver/WorkspaceResourceChangeListener.java
+++ b/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/workspaceresolver/WorkspaceResourceChangeListener.java
@@ -36,7 +36,6 @@ import org.eclipse.core.resources.IResourceChangeListener;
 import org.eclipse.core.resources.IResourceDelta;
 import org.eclipse.core.resources.IWorkspaceRoot;
 import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.OperationCanceledException;
@@ -75,12 +74,8 @@ public class WorkspaceResourceChangeListener implements IResourceChangeListener
                     default:
                         return;
                 }
-                try {
-                    if (IvyNatureHelper.hasNature(project)) {
-                        projectClosed(project);
-                    }
-                } catch (CoreException e) {
-                    // project doesn't exist or is not open: ignore
+                if (IvyNatureHelper.hasNature(project)) {
+                    projectClosed(project);
                 }
             } else if (event.getType() == IResourceChangeEvent.POST_CHANGE) {
                 if (!IvyPlugin.getPreferenceStoreHelper().getAutoResolveOnOpen()) {
@@ -95,7 +90,7 @@ public class WorkspaceResourceChangeListener implements IResourceChangeListener
         }
     }
 
-    private void projectClosed(final IProject project) throws JavaModelException {
+    private void projectClosed(final IProject project) {
         // Check if one of Ivy projects is being removed
         List containers = IvyClasspathContainerHelper.getContainers(project);
         if (containers.isEmpty()) {


Mime
View raw message