Author: vyemialyanchyk
Date: 2010-03-02 14:15:26 -0500 (Tue, 02 Mar 2010)
New Revision: 20571
Modified:
branches/jbosstools-3.1.x/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/utils/ProjectUtils.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5944 - fix for 3.1.0.CR3
Modified:
branches/jbosstools-3.1.x/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/utils/ProjectUtils.java
===================================================================
---
branches/jbosstools-3.1.x/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/utils/ProjectUtils.java 2010-03-02
17:46:20 UTC (rev 20570)
+++
branches/jbosstools-3.1.x/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/utils/ProjectUtils.java 2010-03-02
19:15:26 UTC (rev 20571)
@@ -148,9 +148,10 @@
String[] natures = description.getNatureIds();
String[] newNatures = new String[natures.length - 1];
- for(int i = 0; i < natures.length; i++) {
- if (!natures[i].equals(nature) )
- newNatures[i] = natures[i];
+ for(int i = 0, j = 0; i < natures.length; i++) {
+ if (!natures[i].equals(nature)) {
+ newNatures[j++] = natures[i];
+ }
}
description.setNatureIds(newNatures);
project.setDescription(description, monitor);