From 31170413ae3786bf44564e813d7291354e939a77 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Tue, 20 Nov 2012 19:07:31 +0100 Subject: API CHANGE: com.sun.star.lang.IllegalArgumentException ... derives from com.sun.star.uno.RuntimeException instead of com.sun.star.uno.Exception. Only test that breaks with this change is jurt_uno/AnyConverter_Test, which for mysterious reasons effectively tests that IllegalArgumentException is a subclass of Exception and not RuntimeException. Presumably this is just a generic exception test that happens to use IllegalArgumentException. Some further testing indicates there are no problems expected at runtime: Running "make subsequentcheck" with all Java test code compiled against a ridl.jar that does not contain the change, running against a soffice that uses ridl.jar and rdbs with the change + ridl.jar with the change on the test side yields exactly the same AnyConverter_Test failure, with no other failures. Change-Id: Iad183de76ec7e0d56648084e97cdcc160b5b033d --- wizards/com/sun/star/wizards/common/NumericalHelper.java | 2 +- .../com/sun/star/wizards/common/PlaceholderTextElement.java | 2 +- wizards/com/sun/star/wizards/common/PropertySetHelper.java | 5 ----- wizards/com/sun/star/wizards/common/SystemDialog.java | 4 ++-- wizards/com/sun/star/wizards/query/Finalizer.java | 2 +- wizards/com/sun/star/wizards/report/DBColumn.java | 2 +- wizards/com/sun/star/wizards/report/ReportTextDocument.java | 4 ++-- wizards/com/sun/star/wizards/ui/FilterComponent.java | 10 +++++----- wizards/com/sun/star/wizards/ui/UnoDialog.java | 6 +++--- wizards/com/sun/star/wizards/ui/WizardDialog.java | 6 +++--- 10 files changed, 19 insertions(+), 24 deletions(-) (limited to 'wizards/com') diff --git a/wizards/com/sun/star/wizards/common/NumericalHelper.java b/wizards/com/sun/star/wizards/common/NumericalHelper.java index 22eb3b1c7a03..e25a706056b0 100644 --- a/wizards/com/sun/star/wizards/common/NumericalHelper.java +++ b/wizards/com/sun/star/wizards/common/NumericalHelper.java @@ -1476,7 +1476,7 @@ public class NumericalHelper } catch (com.sun.star.lang.IllegalArgumentException e) { - DebugHelper.exception(e); +//TODO does not do anything anyway DebugHelper.exception(e); } // reverse again to get the number return romanNumber.reverse().toString(); diff --git a/wizards/com/sun/star/wizards/common/PlaceholderTextElement.java b/wizards/com/sun/star/wizards/common/PlaceholderTextElement.java index ca3e22015ae0..a6e69da9ef60 100644 --- a/wizards/com/sun/star/wizards/common/PlaceholderTextElement.java +++ b/wizards/com/sun/star/wizards/common/PlaceholderTextElement.java @@ -61,7 +61,7 @@ public class PlaceholderTextElement extends TextElement XTextContent xTextContent = createPlaceHolder(xmsf, placeHolderText, hint); xTextRange.getText().insertTextContent(xTextRange.getStart(), xTextContent, true); } - catch (Exception ex) + catch (com.sun.star.lang.IllegalArgumentException ex) { ex.printStackTrace(); } diff --git a/wizards/com/sun/star/wizards/common/PropertySetHelper.java b/wizards/com/sun/star/wizards/common/PropertySetHelper.java index 3e3246b5797a..787b8eeef6d0 100644 --- a/wizards/com/sun/star/wizards/common/PropertySetHelper.java +++ b/wizards/com/sun/star/wizards/common/PropertySetHelper.java @@ -93,11 +93,6 @@ public class PropertySetHelper DebugHelper.writeInfo(e.getMessage()); DebugHelper.exception(e); } - catch (com.sun.star.lang.IllegalArgumentException e) - { - DebugHelper.writeInfo(e.getMessage()); - DebugHelper.exception(e); - } catch (com.sun.star.lang.WrappedTargetException e) { DebugHelper.writeInfo(e.getMessage()); diff --git a/wizards/com/sun/star/wizards/common/SystemDialog.java b/wizards/com/sun/star/wizards/common/SystemDialog.java index 02a5b7962832..58ab35ce7092 100644 --- a/wizards/com/sun/star/wizards/common/SystemDialog.java +++ b/wizards/com/sun/star/wizards/common/SystemDialog.java @@ -152,7 +152,7 @@ public class SystemDialog sStorePath = sPathList[0]; } } - catch (com.sun.star.uno.Exception exception) + catch (com.sun.star.lang.IllegalArgumentException exception) { exception.printStackTrace(); } @@ -199,7 +199,7 @@ public class SystemDialog return xFilePicker.getFiles(); } } - catch (com.sun.star.uno.Exception exception) + catch (com.sun.star.lang.IllegalArgumentException exception) { exception.printStackTrace(); } diff --git a/wizards/com/sun/star/wizards/query/Finalizer.java b/wizards/com/sun/star/wizards/query/Finalizer.java index f2b351e57cbe..844c06bb8c37 100644 --- a/wizards/com/sun/star/wizards/query/Finalizer.java +++ b/wizards/com/sun/star/wizards/query/Finalizer.java @@ -146,7 +146,7 @@ public class Finalizer m_queryWizard.setControlProperty("txtSummary", "Text", CurDBMetaData.getSummaryString()); return sCurQueryName; } - catch (com.sun.star.uno.Exception exception) + catch (IllegalArgumentException exception) { exception.printStackTrace(System.err); return PropertyNames.EMPTY_STRING; diff --git a/wizards/com/sun/star/wizards/report/DBColumn.java b/wizards/com/sun/star/wizards/report/DBColumn.java index 83358f2faef8..78064756c425 100644 --- a/wizards/com/sun/star/wizards/report/DBColumn.java +++ b/wizards/com/sun/star/wizards/report/DBColumn.java @@ -341,7 +341,7 @@ public class DBColumn } } } - catch (Exception exception) + catch (IllegalArgumentException exception) { System.err.println(exception); } diff --git a/wizards/com/sun/star/wizards/report/ReportTextDocument.java b/wizards/com/sun/star/wizards/report/ReportTextDocument.java index 3a05e7ca0847..5204ab1d8178 100644 --- a/wizards/com/sun/star/wizards/report/ReportTextDocument.java +++ b/wizards/com/sun/star/wizards/report/ReportTextDocument.java @@ -184,7 +184,7 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen oViewHandler.selectFirstPage(oTextTableHandler); // xProgressBar.end(); } - catch (Exception e) + catch (IllegalArgumentException e) { Logger.getLogger(ReportTextDocument.class.getName()).log(Level.SEVERE, null, e); } @@ -274,7 +274,7 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen } } } - catch (Exception e) + catch (IllegalArgumentException e) { Logger.getLogger(ReportTextDocument.class.getName()).log(Level.SEVERE, null, e); } diff --git a/wizards/com/sun/star/wizards/ui/FilterComponent.java b/wizards/com/sun/star/wizards/ui/FilterComponent.java index e9a756ffefd2..4e706f3623c3 100644 --- a/wizards/com/sun/star/wizards/ui/FilterComponent.java +++ b/wizards/com/sun/star/wizards/ui/FilterComponent.java @@ -756,7 +756,7 @@ public class FilterComponent } return false; } - catch (Exception exception) + catch (IllegalArgumentException exception) { exception.printStackTrace(System.err); return false; @@ -817,7 +817,7 @@ public class FilterComponent Helper.setUnoPropertyValue(UnoDialog.getModel(ControlElements[SOTXTVALUE]), "EffectiveValue", _filtercondition.Value); } } - catch (Exception e) + catch (IllegalArgumentException e) { e.printStackTrace(System.err); } @@ -858,7 +858,7 @@ public class FilterComponent { iselected = (short[]) AnyConverter.toArray(Helper.getUnoPropertyValue(UnoDialog.getModel(ControlElements[SOLSTOPERATOR]), PropertyNames.SELECTED_ITEMS)); } - catch (Exception e) + catch (IllegalArgumentException e) { e.printStackTrace(System.err); } @@ -883,7 +883,7 @@ public class FilterComponent short[] SelFields = (short[]) AnyConverter.toArray(Helper.getUnoPropertyValue(UnoDialog.getModel(ControlElements[SOLSTFIELDNAME]), PropertyNames.SELECTED_ITEMS)); return FieldNames[SelFields[0]]; } - catch (Exception exception) + catch (IllegalArgumentException exception) { exception.printStackTrace(System.err); } @@ -923,7 +923,7 @@ public class FilterComponent return -1; } } - catch (Exception exception) + catch (IllegalArgumentException exception) { exception.printStackTrace(System.err); } diff --git a/wizards/com/sun/star/wizards/ui/UnoDialog.java b/wizards/com/sun/star/wizards/ui/UnoDialog.java index 583751de9874..cdc7b8bfe58c 100644 --- a/wizards/com/sun/star/wizards/ui/UnoDialog.java +++ b/wizards/com/sun/star/wizards/ui/UnoDialog.java @@ -532,7 +532,7 @@ public class UnoDialog implements EventNames int iCurStep = AnyConverter.toInt(getControlProperty(controlname, PropertyNames.PROPERTY_STEP)); setControlProperty(controlname, PropertyNames.PROPERTY_STEP, new Integer(iStep)); } - catch (com.sun.star.uno.Exception exception) + catch (com.sun.star.lang.IllegalArgumentException exception) { exception.printStackTrace(System.err); } @@ -563,7 +563,7 @@ public class UnoDialog implements EventNames setControlProperty(controlname, PropertyNames.PROPERTY_STEP, UIConsts.INVISIBLESTEP); } } - catch (com.sun.star.uno.Exception exception) + catch (com.sun.star.lang.IllegalArgumentException exception) { exception.printStackTrace(System.err); } @@ -580,7 +580,7 @@ public class UnoDialog implements EventNames Helper.setUnoPropertyValue(xDialogModel, PropertyNames.PROPERTY_STEP, 99); Helper.setUnoPropertyValue(xDialogModel, PropertyNames.PROPERTY_STEP, new Integer(ncurstep)); } - catch (com.sun.star.uno.Exception exception) + catch (com.sun.star.lang.IllegalArgumentException exception) { exception.printStackTrace(System.err); } diff --git a/wizards/com/sun/star/wizards/ui/WizardDialog.java b/wizards/com/sun/star/wizards/ui/WizardDialog.java index 5904ec6ccc9b..e7c3323befff 100644 --- a/wizards/com/sun/star/wizards/ui/WizardDialog.java +++ b/wizards/com/sun/star/wizards/ui/WizardDialog.java @@ -208,7 +208,7 @@ public abstract class WizardDialog extends UnoDialog2 implements VetoableChangeL { return AnyConverter.toInt(Helper.getUnoPropertyValue(oRoadmap, "CurrentItemID")); } - catch (com.sun.star.uno.Exception exception) + catch (com.sun.star.lang.IllegalArgumentException exception) { exception.printStackTrace(System.err); return -1; @@ -616,7 +616,7 @@ public abstract class WizardDialog extends UnoDialog2 implements VetoableChangeL bIsEnabled = AnyConverter.toBoolean(Helper.getUnoPropertyValue(xRoadmapItem, PropertyNames.PROPERTY_ENABLED)); return bIsEnabled; } - catch (com.sun.star.uno.Exception exception) + catch (com.sun.star.lang.IllegalArgumentException exception) { exception.printStackTrace(System.err); return false; @@ -706,7 +706,7 @@ public abstract class WizardDialog extends UnoDialog2 implements VetoableChangeL { return AnyConverter.toInt(Helper.getUnoPropertyValue(this.MSFDialogModel, PropertyNames.PROPERTY_STEP)); } - catch (com.sun.star.uno.Exception exception) + catch (com.sun.star.lang.IllegalArgumentException exception) { exception.printStackTrace(System.err); return -1; -- cgit