-
Notifications
You must be signed in to change notification settings - Fork 162
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FORGE-1460: Fixed CompositeResult cast
- Loading branch information
Showing
3 changed files
with
46 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
ui/impl/src/main/java/org/jboss/forge/addon/ui/impl/result/CompositeResultImpl.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/** | ||
* Copyright 2014 Red Hat, Inc. and/or its affiliates. | ||
* | ||
* Licensed under the Eclipse Public License version 1.0, available at | ||
* http://www.eclipse.org/legal/epl-v10.html | ||
*/ | ||
|
||
package org.jboss.forge.addon.ui.impl.result; | ||
|
||
import java.util.List; | ||
|
||
import org.jboss.forge.addon.ui.result.CompositeResult; | ||
import org.jboss.forge.addon.ui.result.Result; | ||
import org.jboss.forge.furnace.util.Assert; | ||
|
||
/** | ||
* | ||
* @author <a href="ggastald@redhat.com">George Gastaldi</a> | ||
*/ | ||
public class CompositeResultImpl implements CompositeResult | ||
{ | ||
public final List<Result> results; | ||
|
||
public CompositeResultImpl(List<Result> results) | ||
{ | ||
Assert.notNull(results, "Result list cannot be null"); | ||
this.results = results; | ||
} | ||
|
||
@Override | ||
public List<Result> getResults() | ||
{ | ||
return results; | ||
} | ||
|
||
public String getMessage() | ||
{ | ||
throw new UnsupportedOperationException( | ||
"getMessage() should not be called in a CompositeResult. Call getResults() instead."); | ||
} | ||
|
||
} |