diff options
Diffstat (limited to 'src/eclipseAgent/lombok/launch')
-rwxr-xr-x[-rw-r--r--] | src/eclipseAgent/lombok/launch/PatchFixesHider.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/eclipseAgent/lombok/launch/PatchFixesHider.java b/src/eclipseAgent/lombok/launch/PatchFixesHider.java index 3c70d81d..5c409603 100644..100755 --- a/src/eclipseAgent/lombok/launch/PatchFixesHider.java +++ b/src/eclipseAgent/lombok/launch/PatchFixesHider.java @@ -551,7 +551,7 @@ final class PatchFixesHider { // Since Eclipse doesn't honor the "insert at specified location" for already existing members, // we'll just add them last newChildren.addAll(modifiedChildren); - return newChildren.toArray(new RewriteEvent[newChildren.size()]); + return newChildren.toArray(new RewriteEvent[0]); } public static int getTokenEndOffsetFixed(TokenScanner scanner, int token, int startOffset, Object domNode) throws CoreException { @@ -570,7 +570,7 @@ final class PatchFixesHider { for (IMethod m : methods) { if (m.getNameRange().getLength() > 0 && !m.getNameRange().equals(m.getSourceRange())) result.add(m); } - return result.size() == methods.length ? methods : result.toArray(new IMethod[result.size()]); + return result.size() == methods.length ? methods : result.toArray(new IMethod[0]); } public static SearchMatch[] removeGenerated(SearchMatch[] returnValue) { @@ -591,7 +591,7 @@ final class PatchFixesHider { } result.add(searchResult); } - return result.toArray(new SearchMatch[result.size()]); + return result.toArray(new SearchMatch[0]); } public static SearchResultGroup[] createFakeSearchResult(SearchResultGroup[] returnValue, |