summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpshi2012-09-11 04:31:41 (EDT)
committer lzhu2012-09-11 04:31:41 (EDT)
commitcc17a71b15ac83fa1eb03bfdadbe27709b124bc9 (patch)
tree990d848e3eaa4703c643957534c2b5f97f0c4ebf
parent3d994fbf7dd104f82392879dfca7180d7772f017 (diff)
downloadorg.eclipse.datatools.enablement.oda-cc17a71b15ac83fa1eb03bfdadbe27709b124bc9.zip
org.eclipse.datatools.enablement.oda-cc17a71b15ac83fa1eb03bfdadbe27709b124bc9.tar.gz
org.eclipse.datatools.enablement.oda-cc17a71b15ac83fa1eb03bfdadbe27709b124bc9.tar.bz2
Fix 53287 Ping fail when new data source from connection profile which
is from flatfile using relative file uri Resolution: When ping with the external connection profile, we can not get resource identifies, so throw exception. Always return ping success when the resource identifies is null.
-rw-r--r--plugins/org.eclipse.datatools.connectivity.oda.flatfile/src/org/eclipse/datatools/connectivity/oda/flatfile/ResourceLocator.java16
1 files changed, 10 insertions, 6 deletions
diff --git a/plugins/org.eclipse.datatools.connectivity.oda.flatfile/src/org/eclipse/datatools/connectivity/oda/flatfile/ResourceLocator.java b/plugins/org.eclipse.datatools.connectivity.oda.flatfile/src/org/eclipse/datatools/connectivity/oda/flatfile/ResourceLocator.java
index b31cf38..8f1291a 100644
--- a/plugins/org.eclipse.datatools.connectivity.oda.flatfile/src/org/eclipse/datatools/connectivity/oda/flatfile/ResourceLocator.java
+++ b/plugins/org.eclipse.datatools.connectivity.oda.flatfile/src/org/eclipse/datatools/connectivity/oda/flatfile/ResourceLocator.java
@@ -43,6 +43,15 @@ public final class ResourceLocator
if ( stream != null)
return stream;
+ if ( homeFolder == null )
+ {
+ throw new InvalidResourceException( InvalidResourceException.ERROR_INVALID_RESOURCE,
+ MessageFormat.format( Messages.getString( "connection_CANNOT_OPEN_FLAT_FILE_URI" ), //$NON-NLS-1$
+ new Object[]{
+ fileURI
+ } ) );
+ }
+
stream = getResourceInputStream( homeFolder, table );
return stream;
@@ -143,12 +152,7 @@ public final class ResourceLocator
}
else
{
- throw new InvalidResourceException( InvalidResourceException.ERROR_INVALID_RESOURCE,
- MessageFormat.format( Messages.getString( "connection_CANNOT_OPEN_FLAT_FILE_URI" ), //$NON-NLS-1$
- new Object[]{
- fileURI,
- new FileNotFoundException( )
- } ) );
+ return null;
}
}
stream = new ResourceInputStream( uri.toURL( ).openStream( ), fileURI );