japi-cvs Mailing List for JAPI (Page 22)
Status: Beta
Brought to you by:
christianhujer
You can subscribe to this list here.
| 2006 |
Jan
|
Feb
|
Mar
|
Apr
(115) |
May
(11) |
Jun
(5) |
Jul
(2) |
Aug
(10) |
Sep
(35) |
Oct
(14) |
Nov
(49) |
Dec
(27) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2007 |
Jan
(57) |
Feb
(1) |
Mar
|
Apr
(2) |
May
(25) |
Jun
(134) |
Jul
(76) |
Aug
(34) |
Sep
(27) |
Oct
(5) |
Nov
|
Dec
(1) |
| 2008 |
Jan
(3) |
Feb
|
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(63) |
Nov
(30) |
Dec
(43) |
| 2009 |
Jan
(10) |
Feb
(420) |
Mar
(67) |
Apr
(3) |
May
(61) |
Jun
(21) |
Jul
(19) |
Aug
|
Sep
(6) |
Oct
(16) |
Nov
(1) |
Dec
|
| 2010 |
Jan
(1) |
Feb
|
Mar
|
Apr
(7) |
May
(3) |
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
|
From: <chr...@us...> - 2009-02-15 12:32:16
|
Revision: 885
http://japi.svn.sourceforge.net/japi/?rev=885&view=rev
Author: christianhujer
Date: 2009-02-15 12:32:13 +0000 (Sun, 15 Feb 2009)
Log Message:
-----------
Fixed checkstyle issues. Includes change of all TODO comments into a format with date.
Modified Paths:
--------------
libs/swing-prefs/trunk/src/prj/net/sf/japi/swing/prefs/PreferencesPane.java
libs/swing-prefs/trunk/src/tst/test/net/sf/japi/swing/prefs/PreferencesPaneTest.java
Modified: libs/swing-prefs/trunk/src/prj/net/sf/japi/swing/prefs/PreferencesPane.java
===================================================================
--- libs/swing-prefs/trunk/src/prj/net/sf/japi/swing/prefs/PreferencesPane.java 2009-02-15 12:31:59 UTC (rev 884)
+++ libs/swing-prefs/trunk/src/prj/net/sf/japi/swing/prefs/PreferencesPane.java 2009-02-15 12:32:13 UTC (rev 885)
@@ -232,7 +232,7 @@
/** Action method for help. */
@ActionMethod
public void help() {
- // TODO
+ // TODO:2009-02-15:christianhujer:Implement help feature.
}
/** Action method for ok. */
Modified: libs/swing-prefs/trunk/src/tst/test/net/sf/japi/swing/prefs/PreferencesPaneTest.java
===================================================================
--- libs/swing-prefs/trunk/src/tst/test/net/sf/japi/swing/prefs/PreferencesPaneTest.java 2009-02-15 12:31:59 UTC (rev 884)
+++ libs/swing-prefs/trunk/src/tst/test/net/sf/japi/swing/prefs/PreferencesPaneTest.java 2009-02-15 12:32:13 UTC (rev 885)
@@ -49,9 +49,9 @@
final JTextField tf1 = prefs1.getTextfield();
tf1.setText(tf1.getText() + "_");
list.setSelectedIndex(1);
- // TODO: Check whether the dialog (apply changes? yes | no | cancel) is shown
- // TODO: Tell Dialog to select "No"
- // TODO: Check whether revert() was called and actually reverted the value.
+ // TODO:2009-02-15:christianhujer:Check whether the dialog (apply changes? yes | no | cancel) is shown
+ // TODO:2009-02-15:christianhujer:Tell Dialog to select "No"
+ // TODO:2009-02-15:christianhujer:Check whether revert() was called and actually reverted the value.
}
} // class PreferencesPaneTest
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2009-02-15 12:32:03
|
Revision: 884
http://japi.svn.sourceforge.net/japi/?rev=884&view=rev
Author: christianhujer
Date: 2009-02-15 12:31:59 +0000 (Sun, 15 Feb 2009)
Log Message:
-----------
Fixed checkstyle issues. Includes change of all TODO comments into a format with date.
Modified Paths:
--------------
libs/swing-misc/trunk/src/prj/net/sf/japi/swing/misc/SwingUtilities2.java
Modified: libs/swing-misc/trunk/src/prj/net/sf/japi/swing/misc/SwingUtilities2.java
===================================================================
--- libs/swing-misc/trunk/src/prj/net/sf/japi/swing/misc/SwingUtilities2.java 2009-02-15 12:31:48 UTC (rev 883)
+++ libs/swing-misc/trunk/src/prj/net/sf/japi/swing/misc/SwingUtilities2.java 2009-02-15 12:31:59 UTC (rev 884)
@@ -26,8 +26,12 @@
/** JAPI Swing Utilities.
* @author <a href="mailto:ch...@ri...">Christian Hujer</a>
*/
-public class SwingUtilities2 {
+public final class SwingUtilities2 {
+ /** Utility class - do not instanciate. */
+ private SwingUtilities2() {
+ }
+
/** Find the Window for a Component.
* Searches for a Frame or a Dialog which is the parent component of the supplied argument.
* Windows are treated like normal Components since in Java Windows can't stand for themselves but must have another Window as a parent.
@@ -38,7 +42,7 @@
public static Window getWindowForComponent(final Component c) {
if (c == null) {
return null;
- // TODO: implement handling of null
+ // TODO:2009-02-15:christianhujer:Implement handling of null.
// return getRootFrame();
}
if (c instanceof Frame || c instanceof Dialog) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2009-02-15 12:31:52
|
Revision: 883
http://japi.svn.sourceforge.net/japi/?rev=883&view=rev
Author: christianhujer
Date: 2009-02-15 12:31:48 +0000 (Sun, 15 Feb 2009)
Log Message:
-----------
Fixed checkstyle issues. Includes change of all TODO comments into a format with date.
Modified Paths:
--------------
libs/swing-keyprefs/trunk/src/prj/net/sf/japi/swing/prefs/keys/ActionKeyDisplay.java
Modified: libs/swing-keyprefs/trunk/src/prj/net/sf/japi/swing/prefs/keys/ActionKeyDisplay.java
===================================================================
--- libs/swing-keyprefs/trunk/src/prj/net/sf/japi/swing/prefs/keys/ActionKeyDisplay.java 2009-02-15 12:31:38 UTC (rev 882)
+++ libs/swing-keyprefs/trunk/src/prj/net/sf/japi/swing/prefs/keys/ActionKeyDisplay.java 2009-02-15 12:31:48 UTC (rev 883)
@@ -31,7 +31,8 @@
import javax.swing.JButton;
import javax.swing.JComponent;
import javax.swing.JRadioButton;
-import javax.swing.KeyStroke;import javax.swing.AbstractButton;
+import javax.swing.KeyStroke;
+import javax.swing.AbstractButton;
import javax.swing.border.LineBorder;
import net.sf.japi.swing.ActionBuilder;
import net.sf.japi.swing.ActionBuilderFactory;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2009-02-15 12:31:42
|
Revision: 882
http://japi.svn.sourceforge.net/japi/?rev=882&view=rev
Author: christianhujer
Date: 2009-02-15 12:31:38 +0000 (Sun, 15 Feb 2009)
Log Message:
-----------
Fixed checkstyle issues. Includes change of all TODO comments into a format with date.
Modified Paths:
--------------
libs/swing-bookmarks/trunk/src/prj/net/sf/japi/swing/bookmarks/BookmarkManager.java
libs/swing-bookmarks/trunk/src/prj/net/sf/japi/swing/bookmarks/BookmarkTransferHandler.java
Modified: libs/swing-bookmarks/trunk/src/prj/net/sf/japi/swing/bookmarks/BookmarkManager.java
===================================================================
--- libs/swing-bookmarks/trunk/src/prj/net/sf/japi/swing/bookmarks/BookmarkManager.java 2009-02-15 12:31:27 UTC (rev 881)
+++ libs/swing-bookmarks/trunk/src/prj/net/sf/japi/swing/bookmarks/BookmarkManager.java 2009-02-15 12:31:38 UTC (rev 882)
@@ -97,15 +97,15 @@
load();
} catch (final IOException e) {
e.printStackTrace();
- // TODO:christianhujer:improve dialog
+ // TODO:2009-02-15:christianhujer:improve dialog
showMessageDialog(bookmarkable.getBookmarkBlocker(), ACTION_BUILDER.getString("bookmarksCreated.message"));
} catch (final ParserConfigurationException e) {
e.printStackTrace();
- // TODO:christianhujer:improve dialog
+ // TODO:2009-02-15:christianhujer:improve dialog
showMessageDialog(bookmarkable.getBookmarkBlocker(), ACTION_BUILDER.getString("bookmarksCreated.message"));
} catch (final SAXException e) {
e.printStackTrace();
- // TODO:christianhujer:improve dialog
+ // TODO:2009-02-15:christianhujer:improve dialog
showMessageDialog(bookmarkable.getBookmarkBlocker(), ACTION_BUILDER.getString("bookmarksCreated.message"));
}
}
Modified: libs/swing-bookmarks/trunk/src/prj/net/sf/japi/swing/bookmarks/BookmarkTransferHandler.java
===================================================================
--- libs/swing-bookmarks/trunk/src/prj/net/sf/japi/swing/bookmarks/BookmarkTransferHandler.java 2009-02-15 12:31:27 UTC (rev 881)
+++ libs/swing-bookmarks/trunk/src/prj/net/sf/japi/swing/bookmarks/BookmarkTransferHandler.java 2009-02-15 12:31:38 UTC (rev 882)
@@ -44,7 +44,7 @@
*/
@Override
public boolean canImport(final JComponent comp, final DataFlavor[] transferFlavors) {
- // TODO:christianhujer:Proper implementation.
+ // TODO:2009-02-15:christianhujer:Proper implementation.
return true;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2009-02-15 12:31:30
|
Revision: 881
http://japi.svn.sourceforge.net/japi/?rev=881&view=rev
Author: christianhujer
Date: 2009-02-15 12:31:27 +0000 (Sun, 15 Feb 2009)
Log Message:
-----------
Fixed checkstyle issues. Includes change of all TODO comments into a format with date.
Modified Paths:
--------------
libs/swing-app/trunk/src/prj/net/sf/japi/swing/app/Application.java
libs/swing-app/trunk/src/prj/net/sf/japi/swing/app/Document.java
Modified: libs/swing-app/trunk/src/prj/net/sf/japi/swing/app/Application.java
===================================================================
--- libs/swing-app/trunk/src/prj/net/sf/japi/swing/app/Application.java 2009-02-15 12:31:16 UTC (rev 880)
+++ libs/swing-app/trunk/src/prj/net/sf/japi/swing/app/Application.java 2009-02-15 12:31:27 UTC (rev 881)
@@ -160,7 +160,7 @@
public void addDocument(@NotNull final Document<D> doc) {
documents.add(doc);
doc.addDocumentListener(this);
- // TODO:christianhujer:handle frames with a menu.
+ // TODO:2009-02-15:christianhujer:handle frames with a menu.
final DocumentFrame<D> docFrame = doc.createDocumentFrame();
docFrame.addInternalFrameListener(this);
desktop.add(docFrame);
@@ -242,7 +242,7 @@
final Document<D> currentDocument = this.currentDocument;
if (currentDocument != null) {
if (close(currentDocument)) {
- // TODO:christianhujer:Finish implementation
+ // TODO:2009-02-15:christianhujer:Finish implementation
documents.remove(currentDocument);
}
}
@@ -303,14 +303,14 @@
*/
private boolean close(@NotNull final Document<D> doc) {
if (doc.hasChanged()) {
- // TODO:christianhujer:Finish implementation
+ // TODO:2009-02-15:christianhujer:Finish implementation
final int result = actionBuilder.showConfirmDialog(desktop.getSelectedFrame(), JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.WARNING_MESSAGE, "documentNotSaved", doc.getTitle());
switch (result) {
case JOptionPane.YES_OPTION:
- // TODO:christianhujer:try saving. If that fails, cancel.
+ // TODO:2009-02-15:christianhujer:try saving. If that fails, cancel.
break;
case JOptionPane.NO_OPTION:
- // TODO:christianhujer:force closing.
+ // TODO:2009-02-15:christianhujer:force closing.
break;
case JOptionPane.CANCEL_OPTION:
return false;
@@ -336,7 +336,7 @@
while (iterator.hasNext()) {
final Document<D> doc = iterator.next();
if (close(doc)) {
- // TODO:christianhujer:Finish implementation
+ // TODO:2009-02-15:christianhujer:Finish implementation
iterator.remove();
}
}
@@ -345,7 +345,7 @@
/** Action Quit. */
@ActionMethod
public void fileQuit() {
- // TODO:christianhujer:This should ask about each document with unsaved changes.
+ // TODO:2009-02-15:christianhujer:This should ask about each document with unsaved changes.
if (!isUserPermissionForQuitRequired() || isQuitAllowedByUser()) {
appFrame.dispose();
}
@@ -381,7 +381,7 @@
* @return <code>true</code> if one or more documents have unsaved changes, <code>false</code> if all changes are saved.
*/
public boolean hasUnsavedChanges() {
- // TODO:christianhujer:Finish implementation.
+ // TODO:2009-02-15:christianhujer:Finish implementation.
return true;
}
Modified: libs/swing-app/trunk/src/prj/net/sf/japi/swing/app/Document.java
===================================================================
--- libs/swing-app/trunk/src/prj/net/sf/japi/swing/app/Document.java 2009-02-15 12:31:16 UTC (rev 880)
+++ libs/swing-app/trunk/src/prj/net/sf/japi/swing/app/Document.java 2009-02-15 12:31:27 UTC (rev 881)
@@ -51,7 +51,7 @@
@Nullable private String uri;
/** The title of this document. */
- // TODO:christianhujer:@Nullable or @NotNull
+ // TODO:2009-02-15:christianhujer:@Nullable or @NotNull
private String title;
/** The changed state of this document. */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2009-02-15 12:31:20
|
Revision: 880
http://japi.svn.sourceforge.net/japi/?rev=880&view=rev
Author: christianhujer
Date: 2009-02-15 12:31:16 +0000 (Sun, 15 Feb 2009)
Log Message:
-----------
Fixed checkstyle issues. Includes change of all TODO comments into a format with date.
Modified Paths:
--------------
libs/swing-action/trunk/src/prj/net/sf/japi/swing/DefaultActionBuilder.java
libs/swing-action/trunk/src/prj/net/sf/japi/swing/ReflectionAction.java
libs/swing-action/trunk/src/prj/net/sf/japi/swing/ToggleAction.java
Modified: libs/swing-action/trunk/src/prj/net/sf/japi/swing/DefaultActionBuilder.java
===================================================================
--- libs/swing-action/trunk/src/prj/net/sf/japi/swing/DefaultActionBuilder.java 2009-02-15 12:31:01 UTC (rev 879)
+++ libs/swing-action/trunk/src/prj/net/sf/japi/swing/DefaultActionBuilder.java 2009-02-15 12:31:16 UTC (rev 880)
@@ -852,7 +852,7 @@
return JOptionPane.PLAIN_MESSAGE;
}
if (!typeText.endsWith("_MESSAGE")) {
- System.err.println("Warning: Illegal type value " + typeText + " for dialog " + dialogKey); // TODO:christianhujer:I18N/L10N
+ System.err.println("Warning: Illegal type value " + typeText + " for dialog " + dialogKey); // TODO:2009-02-15:christianhujer:I18N/L10N
return JOptionPane.PLAIN_MESSAGE;
}
if ("PLAIN_MESSAGE".equals(typeText)) {
@@ -873,11 +873,11 @@
return f.getInt(null);
}
} catch (final NoSuchFieldException e) {
- System.err.println("Warning: Field " + typeText + " not found in JOptionPane (dialog: " + dialogKey + ")."); // TODO:christianhujer:I18N/L10N
- e.printStackTrace(); //TODO:christianhujer:Replace with proper logging.
+ System.err.println("Warning: Field " + typeText + " not found in JOptionPane (dialog: " + dialogKey + ")."); // TODO:2009-02-15:christianhujer:I18N/L10N
+ e.printStackTrace(); //TODO:2009-02-15:christianhujer:Replace with proper logging.
} catch (final IllegalAccessException e) {
- System.err.println("Warning: Field " + typeText + " not accessible in JOptionPane (dialog: " + dialogKey + ")."); // TODO:christianhujer:I18N/L10N
- e.printStackTrace(); //TODO:christianhujer:Replace with proper logging.
+ System.err.println("Warning: Field " + typeText + " not accessible in JOptionPane (dialog: " + dialogKey + ")."); // TODO:2009-02-15:christianhujer:I18N/L10N
+ e.printStackTrace(); //TODO:2009-02-15:christianhujer:Replace with proper logging.
}
return JOptionPane.PLAIN_MESSAGE;
}
Modified: libs/swing-action/trunk/src/prj/net/sf/japi/swing/ReflectionAction.java
===================================================================
--- libs/swing-action/trunk/src/prj/net/sf/japi/swing/ReflectionAction.java 2009-02-15 12:31:01 UTC (rev 879)
+++ libs/swing-action/trunk/src/prj/net/sf/japi/swing/ReflectionAction.java 2009-02-15 12:31:16 UTC (rev 880)
@@ -166,13 +166,13 @@
if (!isEnabled()) { return; }
final Object instance = getValue(REFLECTION_TARGET);
try {
- // TODO:christianhujer:Special value for REFLECTION_ARGUMENTS which determines whether to use ActionEvent.
+ // TODO:2009-02-15:christianhujer:Special value for REFLECTION_ARGUMENTS which determines whether to use ActionEvent.
final Method method = getMethod(instance);
if (method != null) {
final Object[] arguments = getArguments(method, e);
method.invoke(instance, arguments);
} else {
- // TODO:christianhujer:Improve logging / debugging
+ // TODO:2009-02-15:christianhujer:Improve logging / debugging
System.err.println("Missing implementation for action " + getValue(ACTION_ID));
}
} catch (final IllegalAccessException ex) {
@@ -187,7 +187,7 @@
if (title != null) {
// source cannot be null because the ActionEvent constructor will not allow a null source.
@NotNull final Object source = e.getSource();
- final Component parent = source instanceof Component ? (Component) source : null; // TODO:christianhujer:find better alternative to null
+ final Component parent = source instanceof Component ? (Component) source : null; // TODO:2009-02-15:christianhujer:find better alternative to null
actionBuilder.showMessageDialog(parent, dialogKey, cause.getLocalizedMessage());
return;
}
Modified: libs/swing-action/trunk/src/prj/net/sf/japi/swing/ToggleAction.java
===================================================================
--- libs/swing-action/trunk/src/prj/net/sf/japi/swing/ToggleAction.java 2009-02-15 12:31:01 UTC (rev 879)
+++ libs/swing-action/trunk/src/prj/net/sf/japi/swing/ToggleAction.java 2009-02-15 12:31:16 UTC (rev 880)
@@ -87,7 +87,7 @@
} catch (final IllegalAccessException ex) {
assert false : ex;
} catch (final InvocationTargetException ex) {
- // XXX:christianhujer:workaround bug in IntelliJ IDEA (ex is NOT ignored)
+ // XXX:2009-02-15:christianhujer:workaround bug in IntelliJ IDEA (ex is NOT ignored)
//noinspection ThrowInsideCatchBlockWhichIgnoresCaughtException
ex.printStackTrace();
throw new RuntimeException(ex.getCause());
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2009-02-15 12:31:10
|
Revision: 879
http://japi.svn.sourceforge.net/japi/?rev=879&view=rev
Author: christianhujer
Date: 2009-02-15 12:31:01 +0000 (Sun, 15 Feb 2009)
Log Message:
-----------
Fixed checkstyle issues. Includes change of all TODO comments into a format with date.
Modified Paths:
--------------
libs/logging/trunk/src/prj/net/sf/japi/log/StandardLogger.java
Modified: libs/logging/trunk/src/prj/net/sf/japi/log/StandardLogger.java
===================================================================
--- libs/logging/trunk/src/prj/net/sf/japi/log/StandardLogger.java 2009-02-15 12:30:51 UTC (rev 878)
+++ libs/logging/trunk/src/prj/net/sf/japi/log/StandardLogger.java 2009-02-15 12:31:01 UTC (rev 879)
@@ -28,7 +28,7 @@
public final class StandardLogger<Level extends Enum<Level>> implements Logger<Level> {
/** The minimum enabled level. */
- private Level enabledLevel; // TODO:christianhujer:init with reasonable value
+ private Level enabledLevel; // TODO:2009-02-15:christianhujer:init with reasonable value
/** The ResourceBundle to get messages from. */
private final ResourceBundle bundle;
@@ -49,7 +49,7 @@
public void log(final Level level, final String key, final Object... params) {
if (level.ordinal() >= enabledLevel.ordinal()) {
- // TODO:christianhujer:alternatively use MessageFormat
+ // TODO:2009-02-15:christianhujer:alternatively use MessageFormat
logImpl(level, null, String.format(bundle.getString(key), params));
}
}
@@ -62,7 +62,7 @@
public void log(final Level level, final Throwable t, final String key, final Object... params) {
if (level.ordinal() >= enabledLevel.ordinal()) {
- // TODO:christianhujer:alternatively use MessageFormat
+ // TODO:2009-02-15:christianhujer:alternatively use MessageFormat
logImpl(level, t, String.format(bundle.getString(key), params));
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2009-02-15 12:30:54
|
Revision: 878
http://japi.svn.sourceforge.net/japi/?rev=878&view=rev
Author: christianhujer
Date: 2009-02-15 12:30:51 +0000 (Sun, 15 Feb 2009)
Log Message:
-----------
Fixed checkstyle issues. Includes change of all TODO comments into a format with date.
Modified Paths:
--------------
libs/lang/trunk/src/prj/net/sf/japi/lang/PropertyComparator.java
Modified: libs/lang/trunk/src/prj/net/sf/japi/lang/PropertyComparator.java
===================================================================
--- libs/lang/trunk/src/prj/net/sf/japi/lang/PropertyComparator.java 2009-02-15 12:30:40 UTC (rev 877)
+++ libs/lang/trunk/src/prj/net/sf/japi/lang/PropertyComparator.java 2009-02-15 12:30:51 UTC (rev 878)
@@ -73,7 +73,7 @@
} catch (final IllegalAccessException e) {
throw new IllegalAccessError(e.getMessage());
} catch (final InvocationTargetException e) {
- throw new RuntimeException(e); // TODO:christianhujer:use something better than RuntimeException
+ throw new RuntimeException(e); // TODO:2009-02-15:christianhujer:use something better than RuntimeException
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2009-02-15 12:30:44
|
Revision: 877
http://japi.svn.sourceforge.net/japi/?rev=877&view=rev
Author: christianhujer
Date: 2009-02-15 12:30:40 +0000 (Sun, 15 Feb 2009)
Log Message:
-----------
Fixed checkstyle issues. Includes change of all TODO comments into a format with date.
Modified Paths:
--------------
libs/argparser/trunk/src/prj/net/sf/japi/io/args/CommandWithHelp.java
libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/ArgParserTest.java
Modified: libs/argparser/trunk/src/prj/net/sf/japi/io/args/CommandWithHelp.java
===================================================================
--- libs/argparser/trunk/src/prj/net/sf/japi/io/args/CommandWithHelp.java 2009-02-15 11:59:43 UTC (rev 876)
+++ libs/argparser/trunk/src/prj/net/sf/japi/io/args/CommandWithHelp.java 2009-02-15 12:30:40 UTC (rev 877)
@@ -41,7 +41,7 @@
@NotNull private final ResourceBundle ownBundle = ResourceBundle.getBundle("net.sf.japi.io.args.messages");
/** Help Option. */
- // TODO:cher:Determine terminal width and perform automatic line wrapping.
+ // TODO:2009-02-15:christianhujer:Determine terminal width and perform automatic line wrapping.
@Option(type = OptionType.TERMINAL, value = {"h", "help"})
public void help() {
final Set<Method> optionMethods = ArgParser.getOptionMethods(this);
Modified: libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/ArgParserTest.java
===================================================================
--- libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/ArgParserTest.java 2009-02-15 11:59:43 UTC (rev 876)
+++ libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/ArgParserTest.java 2009-02-15 12:30:40 UTC (rev 877)
@@ -382,7 +382,7 @@
Assert.assertEquals("Option value must be stored.", "fooInput", command.getInput());
Assert.assertTrue("Run must be called even with zero arguments.", command.isRunCalled());
Assert.assertEquals("Argument list for invocation without arguments must be empty.", 0, command.getArgs().size());
- // TODO:cher:-W as an option should either be disallowed or disable GNU style option parsing.
+ // TODO:2009-02-15:christianhujer:-W as an option should either be disallowed or disable GNU style option parsing.
}
/**
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2009-02-15 12:12:38
|
Revision: 868
http://japi.svn.sourceforge.net/japi/?rev=868&view=rev
Author: christianhujer
Date: 2009-02-15 11:58:09 +0000 (Sun, 15 Feb 2009)
Log Message:
-----------
Improved Unit tests, e.g. add messages, bring expected and actual in right order, use assertEquals.
Modified Paths:
--------------
historic/trunk/src/test/net/sf/japi/util/PairTest.java
Modified: historic/trunk/src/test/net/sf/japi/util/PairTest.java
===================================================================
--- historic/trunk/src/test/net/sf/japi/util/PairTest.java 2009-02-15 11:06:41 UTC (rev 867)
+++ historic/trunk/src/test/net/sf/japi/util/PairTest.java 2009-02-15 11:58:09 UTC (rev 868)
@@ -78,9 +78,9 @@
*/
public void testEquals() throws Exception {
assertFalse("A pair must not be equal to random objects.", oUT.equals(new Object()));
- assertTrue("A pair must be equal to itself", oUT.equals(oUT));
- assertTrue("A pair must be equal to another pair with same first and second", oUT.equals(new Pair<Object,Object>(first, second)));
- assertTrue("A pair must be equal to another pair with equal first and second", oUT.equals(new Pair<Object,Object>(new String(first.toCharArray()), new String(second.toCharArray()))));
+ assertEquals("A pair must be equal to itself", oUT, oUT);
+ assertEquals("A pair must be equal to another pair with same first and second", oUT, new Pair<Object, Object>(first, second));
+ assertEquals("A pair must be equal to another pair with equal first and second", oUT, new Pair<Object, Object>(new String(first.toCharArray()), new String(second.toCharArray())));
}
} // class PairTest
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2009-02-15 12:12:37
|
Revision: 869
http://japi.svn.sourceforge.net/japi/?rev=869&view=rev
Author: christianhujer
Date: 2009-02-15 11:58:33 +0000 (Sun, 15 Feb 2009)
Log Message:
-----------
Improved Unit tests, e.g. add messages, bring expected and actual in right order, use assertEquals.
Modified Paths:
--------------
libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/BasicCommandTest.java
libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/MethodOptionComparatorTest.java
libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/MissingArgumentExceptionTest.java
libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/TerminalExceptionTest.java
libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/UnknownOptionExceptionTest.java
libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/AbstractConverterTest.java
libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/AbstractPrimitiveConverterTest.java
libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/ConstructorConverterTest.java
libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/ConverterRegistryTest.java
Modified: libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/BasicCommandTest.java
===================================================================
--- libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/BasicCommandTest.java 2009-02-15 11:58:09 UTC (rev 868)
+++ libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/BasicCommandTest.java 2009-02-15 11:58:33 UTC (rev 869)
@@ -38,32 +38,23 @@
@Test
public void testBasicCommand() throws Exception {
final BasicCommand basicCommand = new CommandDummy();
- Assert.assertEquals(0, basicCommand.run(new ArrayList<String>()));
+ Assert.assertEquals("Command dummy must run successful.", 0, basicCommand.run(new ArrayList<String>()));
}
/**
- * Tests that {@link BasicCommand#setExiting(Boolean)} works.
+ * Tests that {@link BasicCommand#setExiting(Boolean)} and {@link BasicCommand#isExiting()} work.
* @throws Exception (unexpected)
*/
@Test
- public void testSetExiting() throws Exception {
+ public void testExiting() throws Exception {
final BasicCommand basicCommand = new CommandDummy();
basicCommand.setExiting(false);
- Assert.assertFalse(basicCommand.isExiting());
+ Assert.assertFalse("Exiting value must be stored.", basicCommand.isExiting());
basicCommand.setExiting(true);
- Assert.assertTrue(basicCommand.isExiting());
+ Assert.assertTrue("Exiting value must be stored.", basicCommand.isExiting());
}
/**
- * Tests that {@link BasicCommand#isExiting()} works.
- * @throws Exception (unexpected)
- */
- @Test
- public void testIsExiting() throws Exception {
- testSetExiting();
- }
-
- /**
* Tests that {@link BasicCommand#help()} works.
* @throws Exception (unexpected)
*/
@@ -81,7 +72,7 @@
public void testGetBundle() throws Exception {
final BasicCommand basicCommand = new CommandDummy();
final ResourceBundle bundle = basicCommand.getBundle();
- Assert.assertNotNull(bundle);
+ Assert.assertNotNull("CommandDummy must have a bundle.", bundle);
}
/**
@@ -95,61 +86,38 @@
public void testGetString() {
final RBMockCommand mock = new RBMockCommand();
mock.setReturnOwnBundle(false);
- Assert.assertEquals("String1FromDefaultBundle", mock.getString("testGetString1"));
- Assert.assertEquals("String2FromDefaultBundle", mock.getString("testGetString2"));
+ Assert.assertEquals("if setReturnOwnBundle(false), getString() must retrieve from default bundle.", "String1FromDefaultBundle", mock.getString("testGetString1"));
+ Assert.assertEquals("if setReturnOwnBundle(false), getString() must retrieve from default bundle.", "String2FromDefaultBundle", mock.getString("testGetString2"));
mock.setReturnOwnBundle(true);
- Assert.assertEquals("String1FromMyBundle", mock.getString("testGetString1"));
- Assert.assertEquals("String2FromDefaultBundle", mock.getString("testGetString2"));
+ Assert.assertEquals("if setReturnOwnBundle(true), getString() must retrieve from own bundle.", "String1FromMyBundle", mock.getString("testGetString1"));
+ Assert.assertEquals("if setReturnOwnBundle(true), getString() must retrieve from own bundle.", "String2FromDefaultBundle", mock.getString("testGetString2"));
}
/**
* Tests that {@link BasicCommand#getHelpHeader()} returns the value from the correct bundle.
+ * Also, the help header must always be terminated with '\n', which will be auto-appended by {@link BasicCommand#getHelpHeader()}.
+ * @see <a href="http://sourceforge.net/tracker/index.php?func=detail&aid=1812417&group_id=149894&atid=776737">[ 1812417 ] auto-add newline to help header and footer</a>
*/
@Test
public void testGetHelpHeader() {
final RBMockCommand mock = new RBMockCommand();
mock.setReturnOwnBundle(false);
- Assert.assertEquals("HelpHeaderFromDefaultBundle", mock.getString("helpHeader"));
+ Assert.assertEquals("if setReturnOwnBundle(false), getHelpHeader() must retrieve from default bundle and end with newline.", "HelpHeaderFromDefaultBundle\n", mock.getHelpHeader());
mock.setReturnOwnBundle(true);
- Assert.assertEquals("HelpHeaderFromMyBundle", mock.getString("helpHeader"));
+ Assert.assertEquals("if setReturnOwnBundle(true), getHelpHeader() must retrieve from own bundle and end with newline.", "HelpHeaderFromMyBundle\n", mock.getHelpHeader());
}
/**
- * Tests that {@link BasicCommand#getHelpHeader()} returns either the empty String or a String ending on "\n".
+ * Tests that {@link BasicCommand#getHelpFooter()} returns either the empty String or a String ending on "\n".
* @see <a href="http://sourceforge.net/tracker/index.php?func=detail&aid=1812417&group_id=149894&atid=776737">[ 1812417 ] auto-add newline to help header and footer</a>
*/
@Test
- public void testGetHelpHeaderNewline() {
- final RBMockCommand mock = new RBMockCommand();
- mock.setReturnOwnBundle(false);
- Assert.assertEquals("HelpHeaderFromDefaultBundle\n", mock.getHelpHeader());
- mock.setReturnOwnBundle(true);
- Assert.assertEquals("HelpHeaderFromMyBundle\n", mock.getHelpHeader());
- }
-
- /**
- * Tests that {@link BasicCommand#getHelpFooter()} returns the value from the correct bundle.
- */
- @Test
public void testGetHelpFooter() {
final RBMockCommand mock = new RBMockCommand();
mock.setReturnOwnBundle(false);
- Assert.assertEquals("HelpFooterFromDefaultBundle", mock.getString("helpFooter"));
+ Assert.assertEquals("if setReturnOwnBundle(false), getHelpFooter() must retrieve from default bundle and end with newline.", "HelpFooterFromDefaultBundle\n", mock.getHelpFooter());
mock.setReturnOwnBundle(true);
- Assert.assertEquals("HelpFooterFromMyBundle", mock.getString("helpFooter"));
+ Assert.assertEquals("if setReturnOwnBundle(true), getHelpFooter() must retrieve from own bundle and end with newline.", "HelpFooterFromMyBundle\n", mock.getHelpFooter());
}
- /**
- * Tests that {@link BasicCommand#getHelpFooter()} returns either the empty String or a String ending on "\n".
- * @see <a href="http://sourceforge.net/tracker/index.php?func=detail&aid=1812417&group_id=149894&atid=776737">[ 1812417 ] auto-add newline to help header and footer</a>
- */
- @Test
- public void testGetHelpFooterNewline() {
- final RBMockCommand mock = new RBMockCommand();
- mock.setReturnOwnBundle(false);
- Assert.assertEquals("HelpFooterFromDefaultBundle\n", mock.getHelpFooter());
- mock.setReturnOwnBundle(true);
- Assert.assertEquals("HelpFooterFromMyBundle\n", mock.getHelpFooter());
- }
-
} // class BasicCommandTest
Modified: libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/MethodOptionComparatorTest.java
===================================================================
--- libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/MethodOptionComparatorTest.java 2009-02-15 11:58:09 UTC (rev 868)
+++ libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/MethodOptionComparatorTest.java 2009-02-15 11:58:33 UTC (rev 869)
@@ -62,7 +62,7 @@
final Class<MockCommand> cmdClass = MockCommand.class;
final Method mC1 = cmdClass.getMethod("c1");
final Method mC2 = cmdClass.getMethod("c2");
- Assert.assertTrue("-c and -C must not be the same.", comparator.compare(mC1, mC2) != 0);
+ Assert.assertNotSame("-c and -C must not be the same.", 0, comparator.compare(mC1, mC2));
}
/** Mock Command with methods that should be properly sorted.
Modified: libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/MissingArgumentExceptionTest.java
===================================================================
--- libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/MissingArgumentExceptionTest.java 2009-02-15 11:58:09 UTC (rev 868)
+++ libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/MissingArgumentExceptionTest.java 2009-02-15 11:58:33 UTC (rev 869)
@@ -37,7 +37,7 @@
@Test
public void testMissingArgumentException() throws Exception {
final MissingArgumentException exception = new MissingArgumentException("foo");
- Assert.assertEquals(exception.getOption(), "foo");
+ Assert.assertEquals("foo", exception.getOption());
}
/**
Modified: libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/TerminalExceptionTest.java
===================================================================
--- libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/TerminalExceptionTest.java 2009-02-15 11:58:09 UTC (rev 868)
+++ libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/TerminalExceptionTest.java 2009-02-15 11:58:33 UTC (rev 869)
@@ -37,7 +37,7 @@
@Test
public void testTerminalException() throws Exception {
final TerminalException exception = new TerminalException();
- Assert.assertEquals(exception.getReturnCode(), 0);
+ Assert.assertEquals("The default return code for TerminalException must be 0 (no error, e.g. for --help).", 0, exception.getReturnCode());
}
/**
@@ -48,7 +48,7 @@
@Test
public void testGetReturnCode() throws Exception {
final TerminalException exception = new TerminalException(1);
- Assert.assertEquals(exception.getReturnCode(), 1);
+ Assert.assertEquals("A specified return code must be stored.", 1, exception.getReturnCode());
}
} // class TerminalExceptionTest
Modified: libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/UnknownOptionExceptionTest.java
===================================================================
--- libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/UnknownOptionExceptionTest.java 2009-02-15 11:58:09 UTC (rev 868)
+++ libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/UnknownOptionExceptionTest.java 2009-02-15 11:58:33 UTC (rev 869)
@@ -39,7 +39,7 @@
public void testUnknownOptionException() throws Exception {
final String[] options = { "foo", "bar" };
final UnknownOptionException exception = new UnknownOptionException(options.clone());
- Assert.assertTrue(Arrays.equals(options, exception.getUnknownOptions()));
+ Assert.assertTrue("Options which have been unknown must be stored with the exceptions.", Arrays.equals(options, exception.getUnknownOptions()));
}
/**
Modified: libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/AbstractConverterTest.java
===================================================================
--- libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/AbstractConverterTest.java 2009-02-15 11:58:09 UTC (rev 868)
+++ libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/AbstractConverterTest.java 2009-02-15 11:58:33 UTC (rev 869)
@@ -80,7 +80,7 @@
*/
@Test
public void testGetTargetClass() throws Exception {
- Assert.assertSame(targetClass, converter.getTargetClass());
+ Assert.assertSame("The target class must be stored.", targetClass, converter.getTargetClass());
}
/**
@@ -90,9 +90,9 @@
@Test
public void testGetDescription() throws Exception {
final String description = converter.getDescription();
- Assert.assertNotNull(description);
- Assert.assertTrue(description.length() > 0);
- Assert.assertEquals(description, converter.getDescription(Locale.getDefault()));
+ Assert.assertNotNull("The description must not be null.", description);
+ Assert.assertTrue("The description must not be empty.", description.length() > 0);
+ Assert.assertEquals("The description must be returned in the default locale.", description, converter.getDescription(Locale.getDefault()));
}
/**
@@ -102,9 +102,9 @@
@Test
public void testGetDisplayName() throws Exception {
final String displayName = converter.getDisplayName();
- Assert.assertNotNull(displayName);
- Assert.assertTrue(displayName.length() > 0);
- Assert.assertEquals(displayName, converter.getDisplayName(Locale.getDefault()));
+ Assert.assertNotNull("The display name must not be null.", displayName);
+ Assert.assertTrue("The display name must not be empty.", displayName.length() > 0);
+ Assert.assertEquals("The display name must be returned in the default locale.", displayName, converter.getDisplayName(Locale.getDefault()));
}
/** Returns the converter that's being tested.
Modified: libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/AbstractPrimitiveConverterTest.java
===================================================================
--- libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/AbstractPrimitiveConverterTest.java 2009-02-15 11:58:09 UTC (rev 868)
+++ libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/AbstractPrimitiveConverterTest.java 2009-02-15 11:58:33 UTC (rev 869)
@@ -95,7 +95,7 @@
*/
@Test
public void testGetTargetClass() throws Exception {
- Assert.assertSame(targetClass, converter.getTargetClass());
+ Assert.assertSame("The target class must be stored.", targetClass, converter.getTargetClass());
}
/**
@@ -105,9 +105,9 @@
@Test
public void testGetDescription() throws Exception {
final String description = converter.getDescription();
- Assert.assertNotNull(description);
- Assert.assertTrue(description.length() > 0);
- Assert.assertEquals(description, converter.getDescription(Locale.getDefault()));
+ Assert.assertNotNull("The description must not be null.", description);
+ Assert.assertTrue("The description must not be empty.", description.length() > 0);
+ Assert.assertEquals("The description must be returned in the default locale.", description, converter.getDescription(Locale.getDefault()));
}
/**
@@ -117,9 +117,9 @@
@Test
public void testGetDisplayName() throws Exception {
final String displayName = converter.getDisplayName();
- Assert.assertNotNull(displayName);
- Assert.assertTrue(displayName.length() > 0);
- Assert.assertEquals(displayName, converter.getDisplayName(Locale.getDefault()));
+ Assert.assertNotNull("The display name must not be null.", displayName);
+ Assert.assertTrue("The display name must not be empty.", displayName.length() > 0);
+ Assert.assertEquals("The display name must be returned in the default locale.", displayName, converter.getDisplayName(Locale.getDefault()));
}
/** Returns the converter that's being tested.
Modified: libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/ConstructorConverterTest.java
===================================================================
--- libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/ConstructorConverterTest.java 2009-02-15 11:58:09 UTC (rev 868)
+++ libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/ConstructorConverterTest.java 2009-02-15 11:58:33 UTC (rev 869)
@@ -37,8 +37,8 @@
@Test
public void testConstructorConverter() throws Exception {
final ConstructorConverter<String> conv = new ConstructorConverter<String>(String.class);
- Assert.assertEquals("foo", conv.convert("foo"));
- Assert.assertEquals("foo", conv.convert(Locale.GERMANY, "foo"));
+ Assert.assertEquals("Correct String must be returned.", "foo", conv.convert("foo"));
+ Assert.assertEquals("Correct String must be returned.", "foo", conv.convert(Locale.GERMANY, "foo"));
}
/** Tests that creating a ConstructorConverter works.
@@ -47,8 +47,8 @@
@Test
public void testConstructorConverter2() throws Exception {
final ConstructorConverter<File> conv = new ConstructorConverter<File>(File.class);
- Assert.assertEquals(new File("foo"), conv.convert("foo"));
- Assert.assertEquals(new File("foo"), conv.convert(Locale.GERMANY, "foo"));
+ Assert.assertEquals("Correct file must be returned.", new File("foo"), conv.convert("foo"));
+ Assert.assertEquals("Correct file muts be returned.", new File("foo"), conv.convert(Locale.GERMANY, "foo"));
}
/** Tests that creating a ConstructorConverter for non-public constructors fails.
@@ -67,12 +67,12 @@
final ConstructorConverter<String> conv1 = new ConstructorConverter<String>(String.class);
final ConstructorConverter<String> conv2 = new ConstructorConverter<String>(String.class);
final ConstructorConverter<File> conv3 = new ConstructorConverter<File>(File.class);
- Assert.assertTrue(conv1.equals(conv2));
- Assert.assertFalse(conv1.equals(new Object()));
+ Assert.assertEquals("Two Converter constructed for the same type must be equal.", conv1, conv2);
+ Assert.assertFalse("A Converter must not be equal to an arbitrary Object.", conv1.equals(new Object()));
//noinspection ObjectEqualsNull
- Assert.assertFalse(conv1.equals(null));
+ Assert.assertFalse("A Converter must not be equal to null.", conv1.equals(null));
//noinspection EqualsBetweenInconvertibleTypes
- Assert.assertFalse(conv1.equals(conv3));
+ Assert.assertFalse("A Converter must not be equal to a Converter for a different type.", conv1.equals(conv3));
}
/** Tests that {@link ConstructorConverter#hashCode()} works.
@@ -82,7 +82,7 @@
public void testHashCode() throws Exception {
final ConstructorConverter<File> conv = new ConstructorConverter<File>(File.class);
final Constructor<File> constructor = File.class.getConstructor(String.class);
- Assert.assertEquals(conv.hashCode(), constructor.hashCode());
+ Assert.assertEquals("The hashCode of a ConstructorConverter must be the hashCode of the constructor used.", conv.hashCode(), constructor.hashCode());
}
/** Tests that {@link ConstructorConverter#getConstructor(Class)} works.
@@ -91,7 +91,7 @@
@Test
public void testGetConstructor() throws Exception {
final Constructor<File> constructor = ConstructorConverter.getConstructor(File.class);
- Assert.assertEquals(File.class.getConstructor(String.class), constructor);
+ Assert.assertEquals("The Constructor returned by a ConstructorConverter must be the correct Constructor.", File.class.getConstructor(String.class), constructor);
}
/** Tests that {@link ConstructorConverter#getConstructor(Class)} throws an Exception for non-public constructors.
Modified: libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/ConverterRegistryTest.java
===================================================================
--- libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/ConverterRegistryTest.java 2009-02-15 11:58:09 UTC (rev 868)
+++ libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/ConverterRegistryTest.java 2009-02-15 11:58:33 UTC (rev 869)
@@ -120,7 +120,7 @@
@Test
public void testGetConstructorConverter() throws Exception {
Assert.assertEquals(new ConstructorConverter<String>(String.class), ConverterRegistry.getConstructorConverter(String.class));
- Assert.assertEquals(null, ConverterRegistry.getConstructorConverter(System.class));
+ Assert.assertNull(ConverterRegistry.getConstructorConverter(System.class));
}
/**
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2009-02-15 12:12:35
|
Revision: 872
http://japi.svn.sourceforge.net/japi/?rev=872&view=rev
Author: christianhujer
Date: 2009-02-15 11:59:06 +0000 (Sun, 15 Feb 2009)
Log Message:
-----------
Improved Unit tests, e.g. add messages, bring expected and actual in right order, use assertEquals.
Modified Paths:
--------------
libs/util/trunk/src/tst/test/net/sf/japi/util/Arrays2Test.java
Modified: libs/util/trunk/src/tst/test/net/sf/japi/util/Arrays2Test.java
===================================================================
--- libs/util/trunk/src/tst/test/net/sf/japi/util/Arrays2Test.java 2009-02-15 11:58:56 UTC (rev 871)
+++ libs/util/trunk/src/tst/test/net/sf/japi/util/Arrays2Test.java 2009-02-15 11:59:06 UTC (rev 872)
@@ -191,12 +191,12 @@
@Test
public void testLinearSearch() {
final int[] data = { 0, 1, 2, 3 };
- Assert.assertEquals(-1, Arrays2.linearSearch(-1, data));
- Assert.assertEquals(0, Arrays2.linearSearch(0, data));
- Assert.assertEquals(1, Arrays2.linearSearch(1, data));
- Assert.assertEquals(2, Arrays2.linearSearch(2, data));
- Assert.assertEquals(3, Arrays2.linearSearch(3, data));
- Assert.assertEquals(-1, Arrays2.linearSearch(4, data));
+ Assert.assertEquals("For an element not found, linearSearch must return -1.", -1, Arrays2.linearSearch(-1, data));
+ Assert.assertEquals("For an element found, linearSearch must return its index.", 0, Arrays2.linearSearch(0, data));
+ Assert.assertEquals("For an element found, linearSearch must return its index.", 1, Arrays2.linearSearch(1, data));
+ Assert.assertEquals("For an element found, linearSearch must return its index.", 2, Arrays2.linearSearch(2, data));
+ Assert.assertEquals("For an element found, linearSearch must return its index.", 3, Arrays2.linearSearch(3, data));
+ Assert.assertEquals("For an element not found, linearSearch must return -1.", -1, Arrays2.linearSearch(4, data));
}
} // class Arrays2Test
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2009-02-15 12:12:34
|
Revision: 874
http://japi.svn.sourceforge.net/japi/?rev=874&view=rev
Author: christianhujer
Date: 2009-02-15 11:59:25 +0000 (Sun, 15 Feb 2009)
Log Message:
-----------
Improved Unit tests, e.g. add messages, bring expected and actual in right order, use assertEquals.
Modified Paths:
--------------
progs/cardlearn/trunk/src/tst/test/net/sf/japi/cardlearn/TestCard.java
progs/cardlearn/trunk/src/tst/test/net/sf/japi/cardlearn/TestCardConfiguration.java
Modified: progs/cardlearn/trunk/src/tst/test/net/sf/japi/cardlearn/TestCard.java
===================================================================
--- progs/cardlearn/trunk/src/tst/test/net/sf/japi/cardlearn/TestCard.java 2009-02-15 11:59:14 UTC (rev 873)
+++ progs/cardlearn/trunk/src/tst/test/net/sf/japi/cardlearn/TestCard.java 2009-02-15 11:59:25 UTC (rev 874)
@@ -32,9 +32,9 @@
final Card card = new Card();
for (int i = 0; i < 6; i++) {
final String testValue = "foo" + i;
- Assert.assertFalse(testValue.equals(card.getField(i)));
+ Assert.assertFalse("Field value must initially be unset.", testValue.equals(card.getField(i)));
card.setField(i, testValue);
- Assert.assertEquals(card.getField(i), testValue);
+ Assert.assertEquals("Field value must be stored.", card.getField(i), testValue);
}
}
}
Modified: progs/cardlearn/trunk/src/tst/test/net/sf/japi/cardlearn/TestCardConfiguration.java
===================================================================
--- progs/cardlearn/trunk/src/tst/test/net/sf/japi/cardlearn/TestCardConfiguration.java 2009-02-15 11:59:14 UTC (rev 873)
+++ progs/cardlearn/trunk/src/tst/test/net/sf/japi/cardlearn/TestCardConfiguration.java 2009-02-15 11:59:25 UTC (rev 874)
@@ -32,9 +32,9 @@
final CardDatabaseConfig card = new CardDatabaseConfig();
for (int i = 0; i < 6; i++) {
final String testValue = "foo" + i;
- Assert.assertFalse(testValue.equals(card.getFieldname(i)));
+ Assert.assertFalse("Fieldname must initially be unset.", testValue.equals(card.getFieldname(i)));
card.setFieldname(i, testValue);
- Assert.assertEquals(card.getFieldname(i), testValue);
+ Assert.assertEquals("Fieldname must be stored.", card.getFieldname(i), testValue);
}
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2009-02-15 12:12:34
|
Revision: 871
http://japi.svn.sourceforge.net/japi/?rev=871&view=rev
Author: christianhujer
Date: 2009-02-15 11:58:56 +0000 (Sun, 15 Feb 2009)
Log Message:
-----------
Improved Unit tests, e.g. add messages, bring expected and actual in right order, use assertEquals.
Modified Paths:
--------------
libs/swing-action/trunk/src/tst/test/net/sf/japi/swing/ReflectionActionTest.java
Modified: libs/swing-action/trunk/src/tst/test/net/sf/japi/swing/ReflectionActionTest.java
===================================================================
--- libs/swing-action/trunk/src/tst/test/net/sf/japi/swing/ReflectionActionTest.java 2009-02-15 11:58:45 UTC (rev 870)
+++ libs/swing-action/trunk/src/tst/test/net/sf/japi/swing/ReflectionActionTest.java 2009-02-15 11:58:56 UTC (rev 871)
@@ -95,7 +95,7 @@
@Test
public void testPutValueMethodName() throws Exception {
testling.putValue(ReflectionAction.REFLECTION_METHOD_NAME, "foo");
- Assert.assertEquals("After setting the method name method name must be stored.", testling.getValue(ReflectionAction.REFLECTION_METHOD_NAME), "foo");
+ Assert.assertEquals("After setting the method name method name must be stored.", "foo", testling.getValue(ReflectionAction.REFLECTION_METHOD_NAME));
Assert.assertNull("After setting the method name method must be null.", testling.getValue(ReflectionAction.REFLECTION_METHOD));
}
@@ -137,7 +137,7 @@
testling.putValue(ReflectionAction.REFLECTION_METHOD, actionMock.getMethod());
testling.putValue(ReflectionAction.REFLECTION_TARGET, null);
Assert.assertNull("After setting REFLECTION_TARGET to null, REFLECTION_METHOD must be reset to null.", testling.getValue(ReflectionAction.REFLECTION_METHOD));
- Assert.assertEquals("After setting REFLECTION_TARGET to null, REFLECTION_METHOD_NAME must be unchanged.", testling.getValue(ReflectionAction.REFLECTION_METHOD_NAME), "foo");
+ Assert.assertEquals("After setting REFLECTION_TARGET to null, REFLECTION_METHOD_NAME must be unchanged.", "foo", testling.getValue(ReflectionAction.REFLECTION_METHOD_NAME));
}
/**
@@ -149,7 +149,7 @@
testling.putValue(ReflectionAction.REFLECTION_TARGET, actionMock);
testling.putValue(ReflectionAction.REFLECTION_METHOD_NAME, "someAction");
testling.actionPerformed(new ActionEvent(this, 0, null));
- Assert.assertEquals("actionPerformed() must lead to the target method being invoked exactly once.", actionMock.getInvocationCount(), 1);
+ Assert.assertEquals("actionPerformed() must lead to the target method being invoked exactly once.", 1, actionMock.getInvocationCount());
}
/**
@@ -162,7 +162,7 @@
testling.putValue(ReflectionAction.REFLECTION_TARGET, actionMock);
testling.putValue(ReflectionAction.REFLECTION_METHOD_NAME, "someAction");
testling.actionPerformed(new ActionEvent(this, 0, null));
- Assert.assertEquals("actionPerformed() must lead to the target method being invoked exactly once.", actionMock.getInvocationCount(), 1);
+ Assert.assertEquals("actionPerformed() must lead to the target method being invoked exactly once.", 1, actionMock.getInvocationCount());
}
/**
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2009-02-15 12:12:34
|
Revision: 876
http://japi.svn.sourceforge.net/japi/?rev=876&view=rev
Author: christianhujer
Date: 2009-02-15 11:59:43 +0000 (Sun, 15 Feb 2009)
Log Message:
-----------
Improved Unit tests, e.g. add messages, bring expected and actual in right order, use assertEquals.
Modified Paths:
--------------
tools/todoScanner/trunk/src/tst/test/net/sf/japi/tools/todoScanner/TodoScannerTest.java
Modified: tools/todoScanner/trunk/src/tst/test/net/sf/japi/tools/todoScanner/TodoScannerTest.java
===================================================================
--- tools/todoScanner/trunk/src/tst/test/net/sf/japi/tools/todoScanner/TodoScannerTest.java 2009-02-15 11:59:33 UTC (rev 875)
+++ tools/todoScanner/trunk/src/tst/test/net/sf/japi/tools/todoScanner/TodoScannerTest.java 2009-02-15 11:59:43 UTC (rev 876)
@@ -32,23 +32,14 @@
public void testDefault() {
final TodoScanner todoScanner = new TodoScanner();
todoScanner.init();
- Assert.assertFalse(todoScanner.isMatching("OTTODO"));
- Assert.assertFalse(todoScanner.isMatching("XXXX"));
- Assert.assertFalse(todoScanner.isMatching("FIXMEE"));
- Assert.assertTrue(todoScanner.isMatching("TODO"));
- Assert.assertTrue(todoScanner.isMatching("XXX"));
- Assert.assertTrue(todoScanner.isMatching("FIXME"));
- Assert.assertTrue(todoScanner.isMatching("// TODO:"));
- Assert.assertTrue(todoScanner.isMatching("// XXX:"));
- Assert.assertTrue(todoScanner.isMatching("// FIXME:"));
- Assert.assertTrue(todoScanner.isMatching("//TODO:"));
- Assert.assertTrue(todoScanner.isMatching("//XXX:"));
- Assert.assertTrue(todoScanner.isMatching("//FIXME:"));
- Assert.assertTrue(todoScanner.isMatching("/*TODO:"));
- Assert.assertTrue(todoScanner.isMatching("/*XXX:"));
- Assert.assertTrue(todoScanner.isMatching("/*FIXME:"));
- Assert.assertTrue(todoScanner.isMatching("#TODO:"));
- Assert.assertTrue(todoScanner.isMatching("#XXX:"));
- Assert.assertTrue(todoScanner.isMatching("#FIXME:"));
+ final String[] mustNotMatch = { "OTTODO", "XXXX", "FIXMEE" };
+ final String[] mustMatch = { "TODO", "XXX", "FIXME", "// TODO:", "// XXX:", "// FIXME:", "//TODO:", "//XXX:", "//FIXME:", "/*TODO:", "/*XXX:", "/*FIXME:", "#TODO:", "#XXX:", "#FIXME:" };
+
+ for (final String text : mustNotMatch) {
+ Assert.assertFalse("Default todo scanner must not match \" + text + \".", todoScanner.isMatching(text));
+ }
+ for (final String text : mustMatch) {
+ Assert.assertTrue("Default todo scanner must not match \" + text + \".", todoScanner.isMatching(text));
+ }
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2009-02-15 12:12:34
|
Revision: 870
http://japi.svn.sourceforge.net/japi/?rev=870&view=rev
Author: christianhujer
Date: 2009-02-15 11:58:45 +0000 (Sun, 15 Feb 2009)
Log Message:
-----------
Improved Unit tests, e.g. add messages, bring expected and actual in right order, use assertEquals.
Modified Paths:
--------------
libs/lang/trunk/src/tst/test/net/sf/japi/lang/PropertyComparatorTest.java
libs/lang/trunk/src/tst/test/net/sf/japi/lang/SuperClassIteratorTest.java
Modified: libs/lang/trunk/src/tst/test/net/sf/japi/lang/PropertyComparatorTest.java
===================================================================
--- libs/lang/trunk/src/tst/test/net/sf/japi/lang/PropertyComparatorTest.java 2009-02-15 11:58:33 UTC (rev 869)
+++ libs/lang/trunk/src/tst/test/net/sf/japi/lang/PropertyComparatorTest.java 2009-02-15 11:58:45 UTC (rev 870)
@@ -37,7 +37,7 @@
final String s4 = "nice";
final String s5 = "day";
final PropertyComparator<Integer, String> lengthComparator = new PropertyComparator<Integer, String>(String.class, "length", null);
- Assert.assertTrue(lengthComparator.compare(s1, s2) == 0);
+ Assert.assertSame(0, lengthComparator.compare(s1, s2));
Assert.assertTrue(lengthComparator.compare(s2, s3) > 0);
Assert.assertTrue(lengthComparator.compare(s3, s4) < 0);
Assert.assertTrue(lengthComparator.compare(s4, s5) > 0);
Modified: libs/lang/trunk/src/tst/test/net/sf/japi/lang/SuperClassIteratorTest.java
===================================================================
--- libs/lang/trunk/src/tst/test/net/sf/japi/lang/SuperClassIteratorTest.java 2009-02-15 11:58:33 UTC (rev 869)
+++ libs/lang/trunk/src/tst/test/net/sf/japi/lang/SuperClassIteratorTest.java 2009-02-15 11:58:45 UTC (rev 870)
@@ -70,7 +70,7 @@
public void testIterable() {
for (final Class c : new SuperClassIterable(String.class)) {
if (!c.equals(String.class) && !c.equals(Object.class)) {
- Assert.assertTrue("Expected String.class or Object.class.", false);
+ Assert.fail("Expected String.class or Object.class.");
}
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2009-02-15 12:12:34
|
Revision: 873
http://japi.svn.sourceforge.net/japi/?rev=873&view=rev
Author: christianhujer
Date: 2009-02-15 11:59:14 +0000 (Sun, 15 Feb 2009)
Log Message:
-----------
Improved Unit tests, e.g. add messages, bring expected and actual in right order, use assertEquals.
Modified Paths:
--------------
libs/xml/trunk/src/tst/test/net/sf/japi/xml/NodeListIteratorTest.java
Modified: libs/xml/trunk/src/tst/test/net/sf/japi/xml/NodeListIteratorTest.java
===================================================================
--- libs/xml/trunk/src/tst/test/net/sf/japi/xml/NodeListIteratorTest.java 2009-02-15 11:59:06 UTC (rev 872)
+++ libs/xml/trunk/src/tst/test/net/sf/japi/xml/NodeListIteratorTest.java 2009-02-15 11:59:14 UTC (rev 873)
@@ -138,14 +138,14 @@
Assert.assertTrue(testling.hasNext());
final Element child1 = testling.next();
Assert.assertNotNull(child1);
- Assert.assertEquals(child1.getNodeName(), "target");
- Assert.assertEquals(child1.getAttribute("v"), "t");
+ Assert.assertEquals("target", child1.getNodeName());
+ Assert.assertEquals("t", child1.getAttribute("v"));
Assert.assertTrue(testling.hasNext());
final Element child2 = testling.next();
Assert.assertNotNull(child2);
- Assert.assertEquals(child2.getNodeName(), "target");
- Assert.assertEquals(child2.getAttribute("v"), "t");
+ Assert.assertEquals("target", child2.getNodeName());
+ Assert.assertEquals("t", child2.getAttribute("v"));
Assert.assertFalse(testling.hasNext());
testling.next();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2009-02-15 12:12:34
|
Revision: 875
http://japi.svn.sourceforge.net/japi/?rev=875&view=rev
Author: christianhujer
Date: 2009-02-15 11:59:33 +0000 (Sun, 15 Feb 2009)
Log Message:
-----------
Improved Unit tests, e.g. add messages, bring expected and actual in right order, use assertEquals.
Modified Paths:
--------------
tools/string2bytes/trunk/src/tst/test/net/sf/japi/string2bytes/CodecStepTest.java
Modified: tools/string2bytes/trunk/src/tst/test/net/sf/japi/string2bytes/CodecStepTest.java
===================================================================
--- tools/string2bytes/trunk/src/tst/test/net/sf/japi/string2bytes/CodecStepTest.java 2009-02-15 11:59:25 UTC (rev 874)
+++ tools/string2bytes/trunk/src/tst/test/net/sf/japi/string2bytes/CodecStepTest.java 2009-02-15 11:59:33 UTC (rev 875)
@@ -44,9 +44,8 @@
/**
* Creates the test data and a testling.
- * @throws Exception (unexpected)
*/
- @Before public void setUp() throws Exception {
+ @Before public void setUp() {
codec = new IdentityCodec();
charset = "utf-8";
codecStep = new CodecStep(codec, charset);
@@ -54,10 +53,9 @@
/**
* Removes the test data and the testling.
- * @throws Exception (unexpected)
*/
@SuppressWarnings({"AssignmentToNull"})
- @After public void tearDown() throws Exception {
+ @After public void tearDown() {
codec = null;
charset = null;
codecStep = null;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2009-02-15 11:06:46
|
Revision: 867
http://japi.svn.sourceforge.net/japi/?rev=867&view=rev
Author: christianhujer
Date: 2009-02-15 11:06:41 +0000 (Sun, 15 Feb 2009)
Log Message:
-----------
Fixed incompatible types in assertEquals().
Modified Paths:
--------------
libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/ByteConverterTest.java
libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/DoubleConverterTest.java
libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/FloatConverterTest.java
libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/LongConverterTest.java
libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/ShortConverterTest.java
Modified: libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/ByteConverterTest.java
===================================================================
--- libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/ByteConverterTest.java 2009-02-15 02:54:59 UTC (rev 866)
+++ libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/ByteConverterTest.java 2009-02-15 11:06:41 UTC (rev 867)
@@ -89,9 +89,9 @@
*/
@Test
public void testConvertHexadecimalNumbers() throws Exception {
- Assert.assertEquals(0x50, getConverter().convert("0x50"));
- Assert.assertEquals(0x50, getConverter().convert("0X50"));
- Assert.assertEquals(0x50, getConverter().convert("#50"));
+ Assert.assertEquals((byte) 0x50, getConverter().convert("0x50"));
+ Assert.assertEquals((byte) 0x50, getConverter().convert("0X50"));
+ Assert.assertEquals((byte) 0x50, getConverter().convert("#50"));
}
/**
@@ -100,7 +100,7 @@
*/
@Test
public void testConvertOctalNumbers() throws Exception {
- Assert.assertEquals(0xf, getConverter().convert("017"));
+ Assert.assertEquals((byte) 0xf, (byte) getConverter().convert("017"));
}
} // class ByteConverterTest
Modified: libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/DoubleConverterTest.java
===================================================================
--- libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/DoubleConverterTest.java 2009-02-15 02:54:59 UTC (rev 866)
+++ libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/DoubleConverterTest.java 2009-02-15 11:06:41 UTC (rev 867)
@@ -89,7 +89,7 @@
*/
@Test
public void testConvertHexadecimalNumbers() throws Exception {
- Assert.assertEquals(50000, getConverter().convert("50000.0"));
+ Assert.assertEquals(50000.0, getConverter().convert("50000.0"));
}
/**
@@ -98,7 +98,7 @@
*/
@Test
public void testConvertOctalNumbers() throws Exception {
- Assert.assertEquals(777, getConverter().convert("0777"));
+ Assert.assertEquals(777.0, getConverter().convert("0777"));
}
} // class DoubleConverterTest
Modified: libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/FloatConverterTest.java
===================================================================
--- libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/FloatConverterTest.java 2009-02-15 02:54:59 UTC (rev 866)
+++ libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/FloatConverterTest.java 2009-02-15 11:06:41 UTC (rev 867)
@@ -89,7 +89,7 @@
*/
@Test
public void testConvertHexadecimalNumbers() throws Exception {
- Assert.assertEquals(50000, getConverter().convert("50000.0"));
+ Assert.assertEquals(50000.0f, getConverter().convert("50000.0"));
}
/**
@@ -98,7 +98,7 @@
*/
@Test
public void testConvertOctalNumbers() throws Exception {
- Assert.assertEquals(777, getConverter().convert("0777"));
+ Assert.assertEquals(777.0f, getConverter().convert("0777"));
}
} // class FloatConverterTest
Modified: libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/LongConverterTest.java
===================================================================
--- libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/LongConverterTest.java 2009-02-15 02:54:59 UTC (rev 866)
+++ libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/LongConverterTest.java 2009-02-15 11:06:41 UTC (rev 867)
@@ -89,9 +89,9 @@
*/
@Test
public void testConvertHexadecimalNumbers() throws Exception {
- Assert.assertEquals(0x50000, getConverter().convert("0x50000"));
- Assert.assertEquals(0x50000, getConverter().convert("0X50000"));
- Assert.assertEquals(0x50000, getConverter().convert("#50000"));
+ Assert.assertEquals(0x50000L, getConverter().convert("0x50000"));
+ Assert.assertEquals(0x50000L, getConverter().convert("0X50000"));
+ Assert.assertEquals(0x50000L, getConverter().convert("#50000"));
}
/**
@@ -100,7 +100,7 @@
*/
@Test
public void testConvertOctalNumbers() throws Exception {
- Assert.assertEquals(0x1ff, getConverter().convert("0777"));
+ Assert.assertEquals(0x1ffL, getConverter().convert("0777"));
}
} // class LongConverterTest
Modified: libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/ShortConverterTest.java
===================================================================
--- libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/ShortConverterTest.java 2009-02-15 02:54:59 UTC (rev 866)
+++ libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/ShortConverterTest.java 2009-02-15 11:06:41 UTC (rev 867)
@@ -89,9 +89,9 @@
*/
@Test
public void testConvertHexadecimalNumbers() throws Exception {
- Assert.assertEquals(0x5000, getConverter().convert("0x5000"));
- Assert.assertEquals(0x5000, getConverter().convert("0X5000"));
- Assert.assertEquals(0x5000, getConverter().convert("#5000"));
+ Assert.assertEquals((short) 0x5000, getConverter().convert("0x5000"));
+ Assert.assertEquals((short) 0x5000, getConverter().convert("0X5000"));
+ Assert.assertEquals((short) 0x5000, getConverter().convert("#5000"));
}
/**
@@ -100,7 +100,7 @@
*/
@Test
public void testConvertOctalNumbers() throws Exception {
- Assert.assertEquals(0x1ff, getConverter().convert("0777"));
+ Assert.assertEquals((short) 0x1ff, getConverter().convert("0777"));
}
} // class ShortConverterTest
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2009-02-15 02:55:05
|
Revision: 866
http://japi.svn.sourceforge.net/japi/?rev=866&view=rev
Author: christianhujer
Date: 2009-02-15 02:54:59 +0000 (Sun, 15 Feb 2009)
Log Message:
-----------
Changed rules for TODO comments. Now they must include a date.
Modified Paths:
--------------
common/trunk/sun_checks.xml
Modified: common/trunk/sun_checks.xml
===================================================================
--- common/trunk/sun_checks.xml 2009-02-15 02:49:23 UTC (rev 865)
+++ common/trunk/sun_checks.xml 2009-02-15 02:54:59 UTC (rev 866)
@@ -214,19 +214,19 @@
<property name="message" value="Line has trailing spaces."/>
</module>
<module name="GenericIllegalRegexp">
- <property name="format" value="//\s+TODO(?!:\w+:\S.*$)"/>
+ <property name="format" value="//\s+TODO(?!:\d{4}-\d{2}-\d{2}:\w+:\S.*$)"/>
<property name="message" value="Wrong format of TODO comment."/>
</module>
<module name="GenericIllegalRegexp">
- <property name="format" value="//\s+FIXME(?!:\w+:\S.*$)"/>
+ <property name="format" value="//\s+FIXME(?!:\d{4}-\d{2}-\d{2}:\w+:\S.*$)"/>
<property name="message" value="Wrong format of FIXME comment."/>
</module>
<module name="GenericIllegalRegexp">
- <property name="format" value="//\s+XXX(?!:\w+:\S.*$)"/>
+ <property name="format" value="//\s+XXX(?!:\d{4}-\d{2}-\d{2}:\w+:\S.*$)"/>
<property name="message" value="Wrong format of XXX comment."/>
</module>
<module name="GenericIllegalRegexp">
- <property name="format" value="//\s+Review(?!:\w+:\S.*$)"/>
+ <property name="format" value="//\s+Review(?!:\d{4}-\d{2}-\d{2}:\w+:\S.*$)"/>
<property name="message" value="Wrong format of Review comment."/>
</module>
<!-- Disabled because we use different means of filtering out such comments. -->
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2009-02-15 02:49:26
|
Revision: 865
http://japi.svn.sourceforge.net/japi/?rev=865&view=rev
Author: christianhujer
Date: 2009-02-15 02:49:23 +0000 (Sun, 15 Feb 2009)
Log Message:
-----------
Fixed checkstyle issues.
Modified Paths:
--------------
libs/xml/trunk/src/tst/test/net/sf/japi/xml/NodeListIteratorTest.java
Modified: libs/xml/trunk/src/tst/test/net/sf/japi/xml/NodeListIteratorTest.java
===================================================================
--- libs/xml/trunk/src/tst/test/net/sf/japi/xml/NodeListIteratorTest.java 2009-02-15 02:46:32 UTC (rev 864)
+++ libs/xml/trunk/src/tst/test/net/sf/japi/xml/NodeListIteratorTest.java 2009-02-15 02:49:23 UTC (rev 865)
@@ -67,7 +67,7 @@
final Document doc = parse("<foo><bar/><target>hit</target><target>wrong</target></foo>");
final Element child = NodeListIterator.getFirstChild(doc.getDocumentElement(), "target");
Assert.assertNotNull("Expecting child to be found.", child);
- assert child != null; // TODO: Remove as soon as IDEA knows Assert.assertNotNull()
+ assert child != null; // TODO:christianhujer:Remove as soon as IDEA knows Assert.assertNotNull()
final String text = child.getFirstChild().getNodeValue();
Assert.assertEquals("Expecting correct child to be found.", "hit", text);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2009-02-15 02:46:36
|
Revision: 864
http://japi.svn.sourceforge.net/japi/?rev=864&view=rev
Author: christianhujer
Date: 2009-02-15 02:46:32 +0000 (Sun, 15 Feb 2009)
Log Message:
-----------
Fixed checkstyle issues.
Modified Paths:
--------------
libs/taglets/trunk/src/prj/net/sf/japi/taglets/BlockListTaglet.java
Modified: libs/taglets/trunk/src/prj/net/sf/japi/taglets/BlockListTaglet.java
===================================================================
--- libs/taglets/trunk/src/prj/net/sf/japi/taglets/BlockListTaglet.java 2009-02-15 02:40:00 UTC (rev 863)
+++ libs/taglets/trunk/src/prj/net/sf/japi/taglets/BlockListTaglet.java 2009-02-15 02:46:32 UTC (rev 864)
@@ -20,7 +20,8 @@
import com.sun.javadoc.Tag;
import com.sun.tools.doclets.Taglet;
-import org.jetbrains.annotations.NotNull;import org.jetbrains.annotations.Nullable;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
/**
* Base class for Taglets that are simple blocks transforming into lists.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2009-02-15 02:40:04
|
Revision: 863
http://japi.svn.sourceforge.net/japi/?rev=863&view=rev
Author: christianhujer
Date: 2009-02-15 02:40:00 +0000 (Sun, 15 Feb 2009)
Log Message:
-----------
Fixed checkstyle issues.
Modified Paths:
--------------
libs/swing-bookmarks/trunk/src/prj/net/sf/japi/swing/bookmarks/BookmarkTransferable.java
Modified: libs/swing-bookmarks/trunk/src/prj/net/sf/japi/swing/bookmarks/BookmarkTransferable.java
===================================================================
--- libs/swing-bookmarks/trunk/src/prj/net/sf/japi/swing/bookmarks/BookmarkTransferable.java 2009-02-15 02:38:14 UTC (rev 862)
+++ libs/swing-bookmarks/trunk/src/prj/net/sf/japi/swing/bookmarks/BookmarkTransferable.java 2009-02-15 02:40:00 UTC (rev 863)
@@ -35,13 +35,13 @@
private static DataFlavor initBookmarkFlavor() {
try {
return new DataFlavor("application/x-jtest-bookmark");
- } catch (ClassNotFoundException e) {
+ } catch (final ClassNotFoundException e) {
throw new Error(e);
}
}
/** Supported DataFlavors. */
- private static final DataFlavor[] flavors = {BOOKMARK_DATA_FLAVOR};
+ private static final DataFlavor[] FLAVORS = {BOOKMARK_DATA_FLAVOR};
/** Bookmark to be transferred. */
private final BookmarkManager.Bookmark bookmark;
@@ -60,7 +60,7 @@
/** {@inheritDoc} */
public DataFlavor[] getTransferDataFlavors() {
- return flavors.clone();
+ return FLAVORS.clone();
}
/** {@inheritDoc} */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2009-02-15 02:38:18
|
Revision: 862
http://japi.svn.sourceforge.net/japi/?rev=862&view=rev
Author: christianhujer
Date: 2009-02-15 02:38:14 +0000 (Sun, 15 Feb 2009)
Log Message:
-----------
Updated lang lib so ant compilation works again.
Added Paths:
-----------
libs/swing-action/trunk/lib/japi-lib-lang-trunk-854.jar
Removed Paths:
-------------
libs/swing-action/trunk/lib/japi-lib-lang-0.1.jar
Deleted: libs/swing-action/trunk/lib/japi-lib-lang-0.1.jar
===================================================================
(Binary files differ)
Copied: libs/swing-action/trunk/lib/japi-lib-lang-trunk-854.jar (from rev 854, libs/swing-action/trunk/lib/japi-lib-lang-0.1.jar)
===================================================================
(Binary files differ)
Property changes on: libs/swing-action/trunk/lib/japi-lib-lang-trunk-854.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: svn:mergeinfo
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2009-02-15 02:32:57
|
Revision: 861
http://japi.svn.sourceforge.net/japi/?rev=861&view=rev
Author: christianhujer
Date: 2009-02-15 02:32:47 +0000 (Sun, 15 Feb 2009)
Log Message:
-----------
Fixed checkstyle issues.
Modified Paths:
--------------
libs/midi/trunk/src/prj/net/sf/japi/midi/DeviceComparator.java
libs/midi/trunk/src/prj/net/sf/japi/midi/gui/SpinnerChannelModel.java
Modified: libs/midi/trunk/src/prj/net/sf/japi/midi/DeviceComparator.java
===================================================================
--- libs/midi/trunk/src/prj/net/sf/japi/midi/DeviceComparator.java 2009-02-15 02:16:50 UTC (rev 860)
+++ libs/midi/trunk/src/prj/net/sf/japi/midi/DeviceComparator.java 2009-02-15 02:32:47 UTC (rev 861)
@@ -31,7 +31,7 @@
private static final long serialVersionUID = 1L;
/** The convenient default instance. */
- private static final Comparator<? super MidiDevice> instance = new DeviceComparator();
+ private static final Comparator<? super MidiDevice> INSTANCE = new DeviceComparator();
/** {@inheritDoc} */
public int compare(final MidiDevice o1, final MidiDevice o2) {
@@ -42,6 +42,6 @@
* @return Default instance.
*/
public static Comparator<? super MidiDevice> getInstance() {
- return instance;
+ return INSTANCE;
}
}
Modified: libs/midi/trunk/src/prj/net/sf/japi/midi/gui/SpinnerChannelModel.java
===================================================================
--- libs/midi/trunk/src/prj/net/sf/japi/midi/gui/SpinnerChannelModel.java 2009-02-15 02:16:50 UTC (rev 860)
+++ libs/midi/trunk/src/prj/net/sf/japi/midi/gui/SpinnerChannelModel.java 2009-02-15 02:32:47 UTC (rev 861)
@@ -18,7 +18,8 @@
package net.sf.japi.midi.gui;
-import javax.swing.AbstractSpinnerModel;import org.jetbrains.annotations.Nullable;
+import javax.swing.AbstractSpinnerModel;
+import org.jetbrains.annotations.Nullable;
/** A SpinnerModel for MIDI Channels.
* @author <a href="mailto:ch...@ri...">Christian Hujer</a>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|