]> source.dussan.org Git - vaadin-framework.git/commitdiff
#3548 - Table.setColumnCollapsed should not throw IllegalAccessException
authorArtur Signell <artur.signell@itmill.com>
Wed, 13 Oct 2010 19:55:47 +0000 (19:55 +0000)
committerArtur Signell <artur.signell@itmill.com>
Wed, 13 Oct 2010 19:55:47 +0000 (19:55 +0000)
svn changeset:15539/svn branch:6.5

WebContent/release-notes.html
src/com/vaadin/ui/Table.java
tests/src/com/vaadin/tests/components/table/ColumnCollapsingAndColumnExpansion.java

index 4d1a5d67ef5dcc3d06fd7af49e6f1a95762a2ab1..60142dccf95f90d5034dc8dae4a9ec02add6ec83 100644 (file)
@@ -50,7 +50,7 @@ contains a number of significant enhancements.</p>
 <p>The following changes can break backward compatibility in applications using an earlier version of Vaadin:</p>
 
 <ul>
-  <li>TBA</li>
+  <li>Table.setColumnCollapsed throws IllegalStateException instead of IllegalAccessException is collapsing is not allowed.</li>
 </ul>
 
 <h3>Change Log, Future Releases, and Upgrading</h3>
index 86c5df41b066507e0cd2ca0a4f130448dce0ac2a..790c44d09eb147c58521a6e878b3b44a48178b86 100644 (file)
@@ -1113,12 +1113,13 @@ public class Table extends AbstractSelect implements Action.Container,
      *            the propertyID identifying the column.
      * @param collapsed
      *            the desired collapsedness.
-     * @throws IllegalAccessException
+     * @throws IllegalStateException
+     *             if column collapsing is not allowed
      */
     public void setColumnCollapsed(Object propertyId, boolean collapsed)
-            throws IllegalAccessException {
+            throws IllegalStateException {
         if (!isColumnCollapsingAllowed()) {
-            throw new IllegalAccessException("Column collapsing not allowed!");
+            throw new IllegalStateException("Column collapsing not allowed!");
         }
 
         if (collapsed) {
index 271b6175f3fd831392d2b1ce0d3fe3084b8feefc..9bf77f42bd70b9b3a40faaef623b890eb41e003d 100644 (file)
@@ -35,13 +35,8 @@ public class ColumnCollapsingAndColumnExpansion extends TestBase {
             }\r
 \r
             public void handleAction(Action action, Object sender, Object target) {\r
-                try {\r
-                    table.setColumnCollapsed("Col2",\r
-                            !table.isColumnCollapsed("Col2"));\r
-                } catch (IllegalAccessException e) {\r
-                    // TODO Auto-generated catch block\r
-                    e.printStackTrace();\r
-                }\r
+                table.setColumnCollapsed("Col2",\r
+                        !table.isColumnCollapsed("Col2"));\r
 \r
             }\r
         });\r
@@ -61,12 +56,7 @@ public class ColumnCollapsingAndColumnExpansion extends TestBase {
         Button hide = new Button("Collapse", new ClickListener() {\r
 \r
             public void buttonClick(ClickEvent event) {\r
-                try {\r
-                    table.setColumnCollapsed(tf.getValue(), true);\r
-                } catch (IllegalAccessException e) {\r
-                    // TODO Auto-generated catch block\r
-                    e.printStackTrace();\r
-                }\r
+                table.setColumnCollapsed(tf.getValue(), true);\r
             }\r
 \r
         });\r
@@ -74,12 +64,7 @@ public class ColumnCollapsingAndColumnExpansion extends TestBase {
         Button show = new Button("Show", new ClickListener() {\r
 \r
             public void buttonClick(ClickEvent event) {\r
-                try {\r
-                    table.setColumnCollapsed(tf.getValue(), false);\r
-                } catch (IllegalAccessException e) {\r
-                    // TODO Auto-generated catch block\r
-                    e.printStackTrace();\r
-                }\r
+                table.setColumnCollapsed(tf.getValue(), false);\r
             }\r
 \r
         });\r