You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@reef.apache.org by "Markus Weimer (JIRA)" <ji...@apache.org> on 2015/06/16 18:22:00 UTC
[jira] [Resolved] (REEF-370) Fix violations of MissingSwitchDefault
checkstyle
[ https://issues.apache.org/jira/browse/REEF-370?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Markus Weimer resolved REEF-370.
--------------------------------
Resolution: Fixed
Fixed via [#225|https://github.com/apache/incubator-reef/pull/225]
> Fix violations of MissingSwitchDefault checkstyle
> -------------------------------------------------
>
> Key: REEF-370
> URL: https://issues.apache.org/jira/browse/REEF-370
> Project: REEF
> Issue Type: Sub-task
> Components: All
> Reporter: Mariia Mykhailova
> Assignee: Mariia Mykhailova
> Priority: Minor
> Fix For: 0.12
>
>
> http://checkstyle.sourceforge.net/config_coding.html#MissingSwitchDefault requires that every switch statement has a default clause. In our code some switch statements enumerate all possible cases (for example, in enum) but don't have a default to protect against newly appearing cases. Others don't enumerate all possible cases. I plan to add missing cases to each enumeration (so that preserves current behavior for existing cases) and add default clause which throws exception (like in D:\incubator-reef\lang\java\reef-common\src\main\java\org\apache\reef\runtime\common\driver\task\TaskRepresenter.java, line 109).
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)