Author: koen.aers(a)jboss.com
Date: 2009-03-30 21:39:26 -0400 (Mon, 30 Mar 2009)
New Revision: 14383
Modified:
trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/properties/WrapperPropertySource.java
Log:
removed bug of the merge method
Modified:
trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/properties/WrapperPropertySource.java
===================================================================
---
trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/properties/WrapperPropertySource.java 2009-03-30
22:19:28 UTC (rev 14382)
+++
trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/properties/WrapperPropertySource.java 2009-03-31
01:39:26 UTC (rev 14383)
@@ -1,8 +1,5 @@
package org.jboss.tools.flow.common.properties;
-import java.util.Arrays;
-import java.util.List;
-
import org.eclipse.ui.views.properties.IPropertyDescriptor;
import org.eclipse.ui.views.properties.IPropertySource;
import org.jboss.tools.flow.common.wrapper.Wrapper;
@@ -68,9 +65,14 @@
}
protected IPropertyDescriptor[] merge(IPropertyDescriptor[] first, IPropertyDescriptor[]
second) {
- List<IPropertyDescriptor> result = Arrays.asList(first);
- result.addAll(Arrays.asList(second));
- return (IPropertyDescriptor[])result.toArray();
+ IPropertyDescriptor[] result = new IPropertyDescriptor[first.length + second.length];
+ for (int i = 0; i < first.length; i++) {
+ result[i] = first[i];
+ }
+ for (int i = first.length; i < result.length; i++) {
+ result[i] = second[i - first.length];
+ }
+ return result;
}
}
Show replies by date