[Japi-cvs] SF.net SVN: japi:[1323] libs/swing-action/trunk/src/prj/net/sf/japi/swing/ action
Status: Beta
Brought to you by:
christianhujer
From: <chr...@us...> - 2009-05-23 14:38:12
|
Revision: 1323 http://japi.svn.sourceforge.net/japi/?rev=1323&view=rev Author: christianhujer Date: 2009-05-23 14:38:10 +0000 (Sat, 23 May 2009) Log Message: ----------- Fix PMD issues. Modified Paths: -------------- libs/swing-action/trunk/src/prj/net/sf/japi/swing/action/DefaultActionBuilder.java libs/swing-action/trunk/src/prj/net/sf/japi/swing/action/DisposeAction.java libs/swing-action/trunk/src/prj/net/sf/japi/swing/action/DummyAction.java libs/swing-action/trunk/src/prj/net/sf/japi/swing/action/ReflectionAction.java libs/swing-action/trunk/src/prj/net/sf/japi/swing/action/ToggleAction.java Modified: libs/swing-action/trunk/src/prj/net/sf/japi/swing/action/DefaultActionBuilder.java =================================================================== --- libs/swing-action/trunk/src/prj/net/sf/japi/swing/action/DefaultActionBuilder.java 2009-05-23 14:32:28 UTC (rev 1322) +++ libs/swing-action/trunk/src/prj/net/sf/japi/swing/action/DefaultActionBuilder.java 2009-05-23 14:38:10 UTC (rev 1323) @@ -89,10 +89,10 @@ if (baseName == null) { throw new NullPointerException("null bundle name not allowed"); } - @NotNull final ResourceBundle newBundle = getBundle(baseName); + final ResourceBundle newBundle = getBundle(baseName); addBundle(newBundle); try { - @Nullable final String additionalBundles = newBundle.getString("ActionBuilder.additionalBundles"); + final String additionalBundles = newBundle.getString("ActionBuilder.additionalBundles"); if (additionalBundles != null) { for (final String additionalBundle : additionalBundles.split("\\s+")) { addBundle(additionalBundle); @@ -149,7 +149,7 @@ } for (int i = 0; i < menu.getItemCount(); i++) { final JMenuItem item = menu.getItem(i); - if (item == null) { + if (item == null) { // NOPMD // Ignore Separators } else if (item.getAction() == action) { return item; @@ -465,7 +465,7 @@ public JMenu createMenu(final boolean store, final String menuKey, final String... keys) throws Error { final JMenu menu = new JMenu(createAction(store, menuKey)); for (final String key : keys) { - if (key != null && key.length() == 0) { + if (key != null && key.length() == 0) { // NOPMD /* ignore this for empty menus */ } else if (key == null || "-".equals(key) || "|".equals(key)) { menu.addSeparator(); @@ -545,7 +545,7 @@ throw new MissingResourceException(this + " has no definition for popup " + popupKey, getClass().getName(), popupKey + ".menu"); } for (final String key : popupDefinition.split("\\s+")) { - if (key != null && key.length() == 0) { + if (key != null && key.length() == 0) { // NOPMD /* ignore this for empty menus */ } else if (key == null || "-".equals(key) || "|".equals(key)) { menu.addSeparator(); @@ -581,7 +581,7 @@ throw new MissingResourceException(this + " has no definition for menu " + menuKey, getClass().getName(), menuKey + ".menu"); } for (final String key : menuDefinition.split("\\s+")) { - if (key != null && key.length() == 0) { + if (key != null && key.length() == 0) { // NOPMD /* ignore this for empty menus */ } else if (key == null || "-".equals(key) || "|".equals(key)) { menu.addSeparator(); @@ -635,7 +635,7 @@ throw new MissingResourceException(this + " has no definition for popup " + popupKey, getClass().getName(), popupKey + ".menu"); } for (final String key : popupDefinition.split("\\s+")) { - if (key != null && key.length() == 0) { + if (key != null && key.length() == 0) { // NOPMD /* ignore this for empty menus */ } else if (key == null || "-".equals(key) || "|".equals(key)) { menu.addSeparator(); @@ -678,7 +678,7 @@ throw new MissingResourceException(this + " has no definition for menu " + menuKey, getClass().getName(), menuKey + ".menu"); } for (final String key : menuDefinition.split("\\s+")) { - if (key != null && key.length() == 0) { + if (key != null && key.length() == 0) { // NOPMD /* ignore this for empty menus */ } else if (key == null || "-".equals(key) || "|".equals(key)) { menu.addSeparator(); @@ -896,7 +896,7 @@ * @throws IllegalStateException if no preferences are associated */ public int showOnetimeConfirmDialog(@Nullable final Component parentComponent, final int optionType, final int messageType, @NotNull final String key, final Object... args) throws IllegalStateException { - @NonNls String showString = getString(key + ".show"); + String showString = getString(key + ".show"); if (showString == null) { showString = getString(key + ".showDefault"); } @@ -933,7 +933,7 @@ * @throws IllegalStateException if no preferences are associated */ public void showOnetimeMessageDialog(@Nullable final Component parentComponent, final int messageType, @NotNull final String key, final Object... args) throws IllegalStateException { - @NonNls String showString = getString(key + ".show"); + String showString = getString(key + ".show"); if (showString == null) { showString = getString(key + ".showDefault"); } Modified: libs/swing-action/trunk/src/prj/net/sf/japi/swing/action/DisposeAction.java =================================================================== --- libs/swing-action/trunk/src/prj/net/sf/japi/swing/action/DisposeAction.java 2009-05-23 14:32:28 UTC (rev 1322) +++ libs/swing-action/trunk/src/prj/net/sf/japi/swing/action/DisposeAction.java 2009-05-23 14:38:10 UTC (rev 1323) @@ -75,7 +75,7 @@ } /** {@inheritDoc} */ - @Override protected Object clone() throws CloneNotSupportedException { + @Override protected Object clone() throws CloneNotSupportedException { // NOPMD return super.clone(); } Modified: libs/swing-action/trunk/src/prj/net/sf/japi/swing/action/DummyAction.java =================================================================== --- libs/swing-action/trunk/src/prj/net/sf/japi/swing/action/DummyAction.java 2009-05-23 14:32:28 UTC (rev 1322) +++ libs/swing-action/trunk/src/prj/net/sf/japi/swing/action/DummyAction.java 2009-05-23 14:38:10 UTC (rev 1323) @@ -47,7 +47,7 @@ } /** {@inheritDoc} */ - @Override protected Object clone() throws CloneNotSupportedException { + @Override protected Object clone() throws CloneNotSupportedException { // NOPMD return super.clone(); } Modified: libs/swing-action/trunk/src/prj/net/sf/japi/swing/action/ReflectionAction.java =================================================================== --- libs/swing-action/trunk/src/prj/net/sf/japi/swing/action/ReflectionAction.java 2009-05-23 14:32:28 UTC (rev 1322) +++ libs/swing-action/trunk/src/prj/net/sf/japi/swing/action/ReflectionAction.java 2009-05-23 14:38:10 UTC (rev 1323) @@ -130,7 +130,7 @@ putValue(REFLECTION_METHOD, null); } if (REFLECTION_METHOD.equals(key)) { - if (!(newValue == null || newValue instanceof Method)) { + if (!(newValue == null || newValue instanceof Method)) { // NOPMD if (newValue instanceof String) { throw new IllegalArgumentException("Value for key REFLECTION_METHOD must be of type " + Method.class.getName() + " but was " + String.class.getName() + " so you might want to use the key REFLECTION_METHOD_NAME instead."); } else { @@ -139,7 +139,7 @@ } } if (REFLECTION_TARGET.equals(key)) { - if (newValue == null) { + if (newValue == null) { // NOPMD putValue(REFLECTION_METHOD, null); } } @@ -272,7 +272,7 @@ } /** {@inheritDoc} */ - @Override protected Object clone() throws CloneNotSupportedException { + @Override protected Object clone() throws CloneNotSupportedException { // NOPMD return super.clone(); } Modified: libs/swing-action/trunk/src/prj/net/sf/japi/swing/action/ToggleAction.java =================================================================== --- libs/swing-action/trunk/src/prj/net/sf/japi/swing/action/ToggleAction.java 2009-05-23 14:32:28 UTC (rev 1322) +++ libs/swing-action/trunk/src/prj/net/sf/japi/swing/action/ToggleAction.java 2009-05-23 14:38:10 UTC (rev 1323) @@ -96,7 +96,7 @@ } /** {@inheritDoc} */ - @Override protected Object clone() throws CloneNotSupportedException { + @Override protected Object clone() throws CloneNotSupportedException { // NOPMD return super.clone(); } @@ -127,7 +127,7 @@ */ @Override public void putValue(final String key, final Object newValue) throws IllegalArgumentException { if (REFLECTION_PROPERTY_NAME.equals(key)) { - if (newValue != null && !(newValue instanceof String)) { + if (newValue != null && !(newValue instanceof String)) { // NOPMD throw new IllegalArgumentException("Value for key REFLECTION_PROPERTY_NAME must be of type " + String.class.getName() + " but was " + newValue.getClass().getName()); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |