Author: vyemialyanchyk
Date: 2010-02-09 09:40:23 -0500 (Tue, 09 Feb 2010)
New Revision: 20200
Modified:
branches/hibernatetools-switch-to-hibernate-core-3.3/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ConsoleConfiguration.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5817 - fix update - additional check for null
Modified:
branches/hibernatetools-switch-to-hibernate-core-3.3/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ConsoleConfiguration.java
===================================================================
---
branches/hibernatetools-switch-to-hibernate-core-3.3/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ConsoleConfiguration.java 2010-02-09
14:40:04 UTC (rev 20199)
+++
branches/hibernatetools-switch-to-hibernate-core-3.3/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ConsoleConfiguration.java 2010-02-09
14:40:23 UTC (rev 20200)
@@ -649,22 +649,26 @@
}
if (configXMLFile == null && classLoader != null) {
URL url = classLoader.findResource("hibernate.cfg.xml"); //$NON-NLS-1$
- URI uri = null;
- try {
- uri = url.toURI();
- configXMLFile = new File(uri);
- } catch (URISyntaxException e) {
- // ignore
+ if (url != null) {
+ URI uri = null;
+ try {
+ uri = url.toURI();
+ configXMLFile = new File(uri);
+ } catch (URISyntaxException e) {
+ // ignore
+ }
}
}
if (configXMLFile == null) {
URL url =
Environment.class.getClassLoader().getResource("hibernate.cfg.xml");
//$NON-NLS-1$
- URI uri = null;
- try {
- uri = url.toURI();
- configXMLFile = new File(uri);
- } catch (URISyntaxException e) {
- // ignore
+ if (url != null) {
+ URI uri = null;
+ try {
+ uri = url.toURI();
+ configXMLFile = new File(uri);
+ } catch (URISyntaxException e) {
+ // ignore
+ }
}
}
return configXMLFile;