Fix compiler warnings about missing switch cases for PatchLine.Type

Add explicit case statements for all enumeration values to
prevent compiler warnings.

Change-Id: Ia7d31b9d2559f564eee6b6692fd224a683089831
This commit is contained in:
David Pursehouse
2012-12-05 15:45:27 +09:00
parent 77516310a6
commit 590d0423a5
3 changed files with 10 additions and 0 deletions

View File

@@ -295,6 +295,8 @@ public abstract class AbstractPatchContentTable extends NavigationTable<Object>
case INSERT: case INSERT:
case REPLACE: case REPLACE:
return true; return true;
case CONTEXT:
break;
} }
} else if (o instanceof CommentList) { } else if (o instanceof CommentList) {
return true; return true;

View File

@@ -593,6 +593,8 @@ public class SideBySideTable extends AbstractPatchContentTable {
m.addStyleName("wdi"); m.addStyleName("wdi");
} }
break; break;
case REPLACE:
break;
} }
m.append(lineHtml); m.append(lineHtml);
m.closeTd(); m.closeTd();

View File

@@ -70,6 +70,8 @@ public class UnifiedDiffTable extends AbstractPatchContentTable {
case INSERT: case INSERT:
createCommentEditor(row + 1, PC, pl.getLineB(), (short) 1); createCommentEditor(row + 1, PC, pl.getLineB(), (short) 1);
break; break;
case REPLACE:
break;
} }
} }
} }
@@ -159,6 +161,8 @@ public class UnifiedDiffTable extends AbstractPatchContentTable {
case INSERT: case INSERT:
createCommentEditor(row + 1, PC, pl.getLineB(), (short) 1); createCommentEditor(row + 1, PC, pl.getLineB(), (short) 1);
break; break;
case REPLACE:
break;
} }
} }
@@ -537,6 +541,8 @@ public class UnifiedDiffTable extends AbstractPatchContentTable {
m.append("+"); m.append("+");
m.append(text); m.append(text);
break; break;
case REPLACE:
break;
} }
m.closeTd(); m.closeTd();
} }