Author: dgolovin
Date: 2008-01-03 20:54:58 -0500 (Thu, 03 Jan 2008)
New Revision: 5501
Modified:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/EclipseResourceUtil.java
Log:
http://jira.jboss.org/jira/browse/JBIDE-1544
Need add @catalogProperty@@schemaProperty@ back to persistence.xml templates file in
seam-gen.
JUnit tests also added.
Modified:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/EclipseResourceUtil.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/EclipseResourceUtil.java 2008-01-04
01:54:54 UTC (rev 5500)
+++
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/EclipseResourceUtil.java 2008-01-04
01:54:58 UTC (rev 5501)
@@ -499,7 +499,7 @@
}
public static IType getValidType(IProject project, String className) {
- if (className == null && className.length() == 0) return null;
+ if (className == null || className.length() == 0) return null;
IJavaProject javaProject = getJavaProject(project);
if(javaProject == null) return null;
IFile f = null;
@@ -546,7 +546,7 @@
* Returns true only if project has no sources but output contains *.class file
*/
public static boolean isContainedInOutput(IProject project, String className) {
- if (className == null && className.length() == 0) return false;
+ if (className == null || className.length() == 0) return false;
IJavaProject javaProject = getJavaProject(project);
if(javaProject == null) return false;
try {