[Japi-cvs] SF.net SVN: japi:[748] tools
Status: Beta
Brought to you by:
christianhujer
|
From: <chr...@us...> - 2008-12-28 15:27:08
|
Revision: 748
http://japi.svn.sourceforge.net/japi/?rev=748&view=rev
Author: christianhujer
Date: 2008-12-28 15:27:01 +0000 (Sun, 28 Dec 2008)
Log Message:
-----------
Fixed code style issues:
- Problems regarding null / @Nullable / @NotNull
- Obsolete @used tags
- Missing exceptions in javadoc
- Missing parameter descriptions in javadoc
Modified Paths:
--------------
historic/trunk/src/app/net/sf/japi/cpp/CPreProcessor.java
historic/trunk/src/app/net/sf/japi/lang/Properties.java
historic/trunk/src/app/net/sf/japi/sql/CachedResultSetTableModel.java
historic/trunk/src/app/net/sf/japi/sql/DatabaseTreeModel.java
historic/trunk/src/app/net/sf/japi/sql/ScrollResultSetTableModel.java
historic/trunk/src/app/net/sf/japi/swing/JPropertyEditor.java
historic/trunk/src/app/net/sf/japi/util/PrintStreamThrowableHandler.java
historic/trunk/src/app/net/sf/japi/util/Service.java
historic/trunk/src/doc/guide/io/src/CatJAPI.java
historic/trunk/src/doc/guide/swing/action/fromScratch/src/net/sf/japi/examples/editor/Editor.java
historic/trunk/src/test/net/sf/japi/util/PairTest.java
historic/trunk/src/test/net/sf/japi/util/TableTest.java
libs/argparser/trunk/src/doc/examples/Recode.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/RequiredOptionsMissingExceptionTest.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/NoConverterFoundExceptionTest.java
libs/logging/trunk/src/prj/net/sf/japi/log/SimpleLogger.java
libs/midi/trunk/src/prj/net/sf/japi/midi/MidiUtils.java
libs/swing-action/trunk/src/tst/test/net/sf/japi/swing/ReflectionActionTest.java
libs/swing-app/trunk/src/prj/net/sf/japi/swing/app/script/Application.java
libs/swing-app/trunk/src/prj/net/sf/japi/swing/app/script/TryApplication.java
libs/swing-bookmarks/trunk/src/prj/net/sf/japi/swing/bookmarks/BookmarkDropTargetAdapter.java
libs/swing-bookmarks/trunk/src/prj/net/sf/japi/swing/bookmarks/BookmarkManager.java
libs/swing-keyprefs/trunk/src/prj/net/sf/japi/swing/prefs/keys/AbstractSimpleNode.java
libs/swing-keyprefs/trunk/src/prj/net/sf/japi/swing/prefs/keys/ActionKeyDisplay.java
libs/swing-misc/trunk/src/prj/net/sf/japi/swing/misc/CollectionsListModel.java
libs/swing-misc/trunk/src/prj/net/sf/japi/swing/misc/JSAXErrorHandler.java
libs/swing-treetable/trunk/src/prj/net/sf/japi/swing/treetable/AbstractTreeTableModel.java
libs/util/trunk/src/tst/test/net/sf/japi/util/EnumerationIteratorTest.java
libs/xml/trunk/src/tst/test/net/sf/japi/xml/NodeListIterator2Test.java
libs/xml/trunk/src/tst/test/net/sf/japi/xml/NodeListIteratorTest.java
progs/cardlearn/trunk/src/prj/net/sf/japi/cardlearn/CardDatabaseConfigEditor.java
progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/swing/OpenURLPane.java
progs/jirus/trunk/src/prj/net/sf/jirus/MyReceiver.java
tools/gdbControl/trunk/src/prj/net/sf/japi/tools/gdbcontrol/ComWithGdb.java
tools/replacer/trunk/src/prj/net/sf/japi/tools/replacer/Replacer.java
tools/string2bytes/trunk/src/tst/test/net/sf/japi/string2bytes/CodecStepTest.java
Modified: historic/trunk/src/app/net/sf/japi/cpp/CPreProcessor.java
===================================================================
--- historic/trunk/src/app/net/sf/japi/cpp/CPreProcessor.java 2008-12-27 21:40:37 UTC (rev 747)
+++ historic/trunk/src/app/net/sf/japi/cpp/CPreProcessor.java 2008-12-28 15:27:01 UTC (rev 748)
@@ -102,9 +102,8 @@
private static String readFile(final String filename) throws IOException {
final StringBuilder chain = new StringBuilder();
final char[] buffer = new char[4096];
- Reader in = null;
+ final Reader in = new FileReader(filename);
try {
- in = new FileReader(filename);
for (int bytesRead; (bytesRead = in.read(buffer)) != -1;) {
chain.append(buffer, 0, bytesRead);
}
@@ -199,6 +198,7 @@
/** Main program.
* @param args command line arguments
+ * @throws IOException in case of I/O problems.
*/
public static void main(final String... args) throws IOException {
new CPreProcessor().process(System.in, System.out);
Modified: historic/trunk/src/app/net/sf/japi/lang/Properties.java
===================================================================
--- historic/trunk/src/app/net/sf/japi/lang/Properties.java 2008-12-27 21:40:37 UTC (rev 747)
+++ historic/trunk/src/app/net/sf/japi/lang/Properties.java 2008-12-28 15:27:01 UTC (rev 748)
@@ -30,8 +30,9 @@
public class Properties {
/** Get a property of an object.
- * @param object
- * @param propertyName
+ * @param object Object of which to get a property as String.
+ * @param propertyName Name of the property to get.
+ * @return Value of <var>propertyName</var> of <var>object</var> as String.
* @see #setPropertyFromString(Object, String, String)
*/
public static String getPropertyAsString(final Object object, final String propertyName) {
Modified: historic/trunk/src/app/net/sf/japi/sql/CachedResultSetTableModel.java
===================================================================
--- historic/trunk/src/app/net/sf/japi/sql/CachedResultSetTableModel.java 2008-12-27 21:40:37 UTC (rev 747)
+++ historic/trunk/src/app/net/sf/japi/sql/CachedResultSetTableModel.java 2008-12-28 15:27:01 UTC (rev 748)
@@ -87,7 +87,7 @@
for (int i = listeners.length - 2; i >= 0; i -= 2) {
//noinspection ObjectEquality
if (listeners[i] == ThrowableHandler.class) {
- ((ThrowableHandler<? super SQLException>)listeners[i+1]).handleThrowable(exception);
+ ((ThrowableHandler<? super SQLException>) listeners[i + 1]).handleThrowable(exception);
}
}
}
@@ -103,7 +103,7 @@
} else {
try {
columnTitles = SQLHelper.getColumnLabels(resultSet);
- columnCount = columnTitles.length;
+ columnCount = columnTitles != null ? columnTitles.length : 0;
rowCount = SQLHelper.getRowCount(resultSet);
data = SQLHelper.getData(resultSet);
this.resultSet = resultSet;
@@ -163,8 +163,8 @@
}
/** {@inheritDoc} */
- @Override public String getColumnName(final int column) {
- return columnTitles[column];
+ @Override @Nullable public String getColumnName(final int column) {
+ return columnTitles != null ? columnTitles[column] : null;
}
} // class CachedResultSetTableModel
Modified: historic/trunk/src/app/net/sf/japi/sql/DatabaseTreeModel.java
===================================================================
--- historic/trunk/src/app/net/sf/japi/sql/DatabaseTreeModel.java 2008-12-27 21:40:37 UTC (rev 747)
+++ historic/trunk/src/app/net/sf/japi/sql/DatabaseTreeModel.java 2008-12-28 15:27:01 UTC (rev 748)
@@ -30,7 +30,6 @@
import javax.swing.event.TreeModelListener;
import javax.swing.tree.TreeModel;
import javax.swing.tree.TreePath;
-import org.jetbrains.annotations.Nullable;
/** A TreeModel displaying the catalogs of a database (usually tables and views) as tree.
* @author <a href="mailto:ch...@ri...">Christian Hujer</a>
@@ -68,9 +67,8 @@
public void refresh() throws SQLException {
catalogs.clear();
if (databaseMetaData != null) {
- @Nullable ResultSet rs = null;
+ final ResultSet rs = databaseMetaData.getCatalogs();
try {
- rs = databaseMetaData.getCatalogs();
while (rs.next()) {
try {
catalogs.add(new CatalogTreeNode(rs.getString(1)));
@@ -80,7 +78,7 @@
}
}
} finally {
- try { rs.close(); } catch (final Exception e) { /* ignore **/ } finally { rs = null; }
+ rs.close();
}
}
fireTreeStructureChanged();
@@ -170,18 +168,18 @@
private List<TableTreeNode> tables = new ArrayList<TableTreeNode>();
/** Create a CatalogTreeNode.
+ * @param catalog Catalog for which to create a CatalogTreeNode.
* @throws SQLException in case of database problems
*/
CatalogTreeNode(final String catalog) throws SQLException {
this.catalog = catalog;
- @Nullable ResultSet rs = null;
+ final ResultSet rs = databaseMetaData.getTables(catalog, null, null, null);
try {
- rs = databaseMetaData.getTables(catalog, null, null, null);
while (rs.next()) {
tables.add(new TableTreeNode(rs.getString("TABLE_NAME")));
}
} finally {
- try { rs.close(); } catch (final Exception e) { /* ignore **/ } finally { rs = null; }
+ rs.close();
}
}
@@ -219,7 +217,9 @@
/** The name of this table. */
private String table;
- /** Create a TableTreeNode. */
+ /** Create a TableTreeNode.
+ * @param table Table name for which to create a TableTreeNode.
+ */
TableTreeNode(final String table) {
this.table = table;
}
Modified: historic/trunk/src/app/net/sf/japi/sql/ScrollResultSetTableModel.java
===================================================================
--- historic/trunk/src/app/net/sf/japi/sql/ScrollResultSetTableModel.java 2008-12-27 21:40:37 UTC (rev 747)
+++ historic/trunk/src/app/net/sf/japi/sql/ScrollResultSetTableModel.java 2008-12-28 15:27:01 UTC (rev 748)
@@ -157,6 +157,7 @@
/** {@inheritDoc} */
public int getRowCount() {
+ final ResultSet resultSet = this.resultSet;
if (resultSet == null) {
return 0;
}
@@ -325,7 +326,7 @@
((RowSet) resultSet).addRowSetListener(this);
}
columnTitles = SQLHelper.getColumnLabels(resultSet);
- columnCount = columnTitles.length;
+ columnCount = columnTitles != null ? columnTitles.length : 0;
rowCount = SQLHelper.getRowCount(resultSet);
} catch (final SQLException e) {
handleException(e);
Modified: historic/trunk/src/app/net/sf/japi/swing/JPropertyEditor.java
===================================================================
--- historic/trunk/src/app/net/sf/japi/swing/JPropertyEditor.java 2008-12-27 21:40:37 UTC (rev 747)
+++ historic/trunk/src/app/net/sf/japi/swing/JPropertyEditor.java 2008-12-28 15:27:01 UTC (rev 748)
@@ -83,6 +83,7 @@
/** Create an editor for a property.
* @param propertyType property type
+ * @return Editor component for the specified property type or <code>null</code> if no editor is available.
*/
@SuppressWarnings({"ReturnOfNull"})
private static Component createEditor(final Class<?> propertyType) {
Modified: historic/trunk/src/app/net/sf/japi/util/PrintStreamThrowableHandler.java
===================================================================
--- historic/trunk/src/app/net/sf/japi/util/PrintStreamThrowableHandler.java 2008-12-27 21:40:37 UTC (rev 747)
+++ historic/trunk/src/app/net/sf/japi/util/PrintStreamThrowableHandler.java 2008-12-28 15:27:01 UTC (rev 748)
@@ -34,7 +34,10 @@
private final PrintStream stream;
- /** Private Singleton Constructor. */
+ /** Creates a PrintStreamThrowableHandler for the specified PrintStream.
+ * @param stream Stream for which to create a PrintStreamThrowableHandler.
+ * @see #STDERR for a default global PrintStreamThrowableHandler that wraps {@link System#in}.
+ */
public PrintStreamThrowableHandler(final PrintStream stream) {
this.stream = stream;
}
Modified: historic/trunk/src/app/net/sf/japi/util/Service.java
===================================================================
--- historic/trunk/src/app/net/sf/japi/util/Service.java 2008-12-27 21:40:37 UTC (rev 747)
+++ historic/trunk/src/app/net/sf/japi/util/Service.java 2008-12-28 15:27:01 UTC (rev 748)
@@ -89,6 +89,7 @@
* @param service Service class to look up
* @param loader Class loader to use
* @return implementations found (lazy iterable)
+ * @throws MustangUnavailableException In case Mustang is not available and thus it's not possible to use Mustang services.
*/
@NotNull private static <T> Iterable<T> loadMustang(@NotNull final Class<T> service, @Nullable final ClassLoader loader) throws MustangUnavailableException {
try {
Modified: historic/trunk/src/doc/guide/io/src/CatJAPI.java
===================================================================
--- historic/trunk/src/doc/guide/io/src/CatJAPI.java 2008-12-27 21:40:37 UTC (rev 747)
+++ historic/trunk/src/doc/guide/io/src/CatJAPI.java 2008-12-28 15:27:01 UTC (rev 748)
@@ -10,6 +10,7 @@
/** Main program.
* @param args command line arguments: names of files to concatenate
+ * @throws IOException in case of I/O problems.
*/
public static void main(final String... args) throws IOException {
copy(new ARGVInputStream(args), out);
Modified: historic/trunk/src/doc/guide/swing/action/fromScratch/src/net/sf/japi/examples/editor/Editor.java
===================================================================
--- historic/trunk/src/doc/guide/swing/action/fromScratch/src/net/sf/japi/examples/editor/Editor.java 2008-12-27 21:40:37 UTC (rev 747)
+++ historic/trunk/src/doc/guide/swing/action/fromScratch/src/net/sf/japi/examples/editor/Editor.java 2008-12-28 15:27:01 UTC (rev 748)
@@ -73,16 +73,15 @@
return null;
}
- /** Action method.
- * @used
- */
+ /** Action method. */
@ActionMethod public void fileNew() {
textPane.setText("");
file = null;
}
/** Action method.
- * @used
+ * @throws FileNotFoundException In case the file to open could not be opened or found.
+ * @throws IOException In case of I/O problems when trying to open or read the file.
*/
@ActionMethod public void fileOpen() throws FileNotFoundException, IOException {
if (fileChooser.showOpenDialog(frame) == APPROVE_OPTION) {
@@ -102,9 +101,7 @@
}
}
- /** Action method.
- * @used
- */
+ /** Action method. */
@ActionMethod public void fileQuit() {
if (ACTION_BUILDER.showQuestionDialog(frame, "reallyQuit")) {
frame.dispose();
@@ -112,7 +109,7 @@
}
/** Action method.
- * @used
+ * @throws IOException In case of I/O problems when saving.
*/
@ActionMethod public void fileSave() throws IOException {
if (file == null) {
@@ -128,7 +125,7 @@
}
/** Action method.
- * @used
+ * @throws IOException In case of I/O problems when saving.
*/
@ActionMethod public void fileSaveAs() throws IOException {
if (fileChooser.showSaveDialog(frame) == APPROVE_OPTION) {
Modified: historic/trunk/src/test/net/sf/japi/util/PairTest.java
===================================================================
--- historic/trunk/src/test/net/sf/japi/util/PairTest.java 2008-12-27 21:40:37 UTC (rev 747)
+++ historic/trunk/src/test/net/sf/japi/util/PairTest.java 2008-12-28 15:27:01 UTC (rev 748)
@@ -23,7 +23,6 @@
import junit.framework.TestCase;
import net.sf.japi.util.Pair;
-import org.jetbrains.annotations.Nullable;
/** Test class for {@link Pair}.
* @author <a href="mailto:ch...@it...">Christian Hujer</a>
@@ -31,9 +30,9 @@
public class PairTest extends TestCase {
/** Object Under Test: A Table. */
- @Nullable private Pair<Object,Object> oUT;
- @Nullable private String first;
- @Nullable private String second;
+ private Pair<Object,Object> oUT;
+ private String first;
+ private String second;
/** {@inheritDoc} */
@Override protected void setUp() throws Exception {
@@ -44,6 +43,7 @@
}
/** {@inheritDoc} */
+ @SuppressWarnings({"AssignmentToNull"})
@Override protected void tearDown() throws Exception {
super.tearDown();
oUT = null;
@@ -51,23 +51,31 @@
second = null;
}
- /** Test case for {@link Pair#getFirst()}. */
+ /** Test case for {@link Pair#getFirst()}.
+ * @throws Exception (unexpected).
+ */
public void testGetFirst() throws Exception {
assertSame("First must be retreivable via getFirst()", first, oUT.getFirst());
}
- /** Test case for {@link Pair#getSecond()}. */
+ /** Test case for {@link Pair#getSecond()}.
+ * @throws Exception (unexpected).
+ */
public void testGetSecond() throws Exception {
assertSame("First must be retreivable via getSecond()", second, oUT.getSecond());
}
- /** Test case for {@link Pair#Pair(Object,Object)}. */
+ /** Test case for {@link Pair#Pair(Object,Object)}.
+ * @throws Exception (unexpected).
+ */
public void testPair() throws Exception {
assertTrue("Dummy assertion.", true);
// This test is already implicitly performed by #setUp().
}
- /** Test case for {@link Pair#equals(Object)}. */
+ /** Test case for {@link Pair#equals(Object)}.
+ * @throws Exception (unexpected).
+ */
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));
Modified: historic/trunk/src/test/net/sf/japi/util/TableTest.java
===================================================================
--- historic/trunk/src/test/net/sf/japi/util/TableTest.java 2008-12-27 21:40:37 UTC (rev 747)
+++ historic/trunk/src/test/net/sf/japi/util/TableTest.java 2008-12-28 15:27:01 UTC (rev 748)
@@ -24,7 +24,6 @@
import junit.framework.TestCase;
import net.sf.japi.util.Pair;
import net.sf.japi.util.Table;
-import org.jetbrains.annotations.Nullable;
/** Test class for Table.
* @author <a href="mailto:ch...@it...">Christian Hujer</a>
@@ -32,7 +31,7 @@
public class TableTest extends TestCase {
/** Object Under Test: A Table. */
- @Nullable private Table<Object,Object> oUT;
+ private Table<Object,Object> oUT;
/** {@inheritDoc} */
@Override public void setUp() throws Exception {
@@ -41,6 +40,7 @@
}
/** {@inheritDoc} */
+ @SuppressWarnings({"AssignmentToNull"})
@Override protected void tearDown() throws Exception {
super.tearDown();
oUT = null;
@@ -51,7 +51,9 @@
assertEquals("Newly created table must be empty.", 0, oUT.size());
}
- /** Test case for clearing a table. */
+ /** Test case for clearing a table.
+ * @throws Exception (unexpected).
+ */
public void testClear() throws Exception {
oUT.putPair(new Object(), new Object());
assertSize("Added 1 Element", 1);
Modified: libs/argparser/trunk/src/doc/examples/Recode.java
===================================================================
--- libs/argparser/trunk/src/doc/examples/Recode.java 2008-12-27 21:40:37 UTC (rev 747)
+++ libs/argparser/trunk/src/doc/examples/Recode.java 2008-12-28 15:27:01 UTC (rev 748)
@@ -115,7 +115,9 @@
try {
copy(tmpFile, file);
} finally {
- tmpFile.delete();
+ if (!tmpFile.delete()) {
+ System.err.println("Couldn't delete temporary file " + tmpFile);
+ }
}
}
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 2008-12-27 21:40:37 UTC (rev 747)
+++ libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/MissingArgumentExceptionTest.java 2008-12-28 15:27:01 UTC (rev 748)
@@ -34,6 +34,7 @@
* Tests that {@link MissingArgumentException#MissingArgumentException(String)} works.
* @throws Exception (unexpected)
*/
+ @SuppressWarnings({"ThrowableInstanceNeverThrown"})
@Test
public void testMissingArgumentException() throws Exception {
final MissingArgumentException exception = new MissingArgumentException("foo");
Modified: libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/RequiredOptionsMissingExceptionTest.java
===================================================================
--- libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/RequiredOptionsMissingExceptionTest.java 2008-12-27 21:40:37 UTC (rev 747)
+++ libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/RequiredOptionsMissingExceptionTest.java 2008-12-28 15:27:01 UTC (rev 748)
@@ -35,6 +35,7 @@
* Tests that {@link RequiredOptionsMissingException#RequiredOptionsMissingException(String[])} works.
* @throws Exception (unexpected)
*/
+ @SuppressWarnings({"ThrowableInstanceNeverThrown"})
@Test
public void testRequiredOptionsMissingException() throws Exception {
final String[] options = { "foo", "bar" };
@@ -55,6 +56,7 @@
* Tests that {@link RequiredOptionsMissingException#RequiredOptionsMissingException(String[])} throws an IllegalArgumentException in case no missing options were given.
* @throws IllegalArgumentException (expected).
*/
+ @SuppressWarnings({"ThrowableInstanceNeverThrown"})
@Test(expected = IllegalArgumentException.class)
public void testNoMissingOptions() throws Exception {
new RequiredOptionsMissingException();
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 2008-12-27 21:40:37 UTC (rev 747)
+++ libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/TerminalExceptionTest.java 2008-12-28 15:27:01 UTC (rev 748)
@@ -34,6 +34,7 @@
* Tests that {@link TerminalException#TerminalException()} works.
* @throws Exception (unexpected)
*/
+ @SuppressWarnings({"ThrowableInstanceNeverThrown"})
@Test
public void testTerminalException() throws Exception {
final TerminalException exception = new TerminalException();
@@ -44,6 +45,7 @@
* Tests that {@link TerminalException#getReturnCode()} works.
* @throws Exception (unexpected)
*/
+ @SuppressWarnings({"ThrowableInstanceNeverThrown"})
@Test
public void testGetReturnCode() throws Exception {
final TerminalException exception = new TerminalException(1);
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 2008-12-27 21:40:37 UTC (rev 747)
+++ libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/UnknownOptionExceptionTest.java 2008-12-28 15:27:01 UTC (rev 748)
@@ -35,6 +35,7 @@
* Tests that {@link UnknownOptionException#UnknownOptionException(String[])} works.
* @throws Exception (unexpected)
*/
+ @SuppressWarnings({"ThrowableInstanceNeverThrown"})
@Test
public void testUnknownOptionException() throws Exception {
final String[] options = { "foo", "bar" };
Modified: libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/NoConverterFoundExceptionTest.java
===================================================================
--- libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/NoConverterFoundExceptionTest.java 2008-12-27 21:40:37 UTC (rev 747)
+++ libs/argparser/trunk/src/tst/test/net/sf/japi/io/args/converter/NoConverterFoundExceptionTest.java 2008-12-28 15:27:01 UTC (rev 748)
@@ -33,6 +33,7 @@
* Tests that the target type is stored correctly.
* @throws Exception (unexpected)
*/
+ @SuppressWarnings({"ThrowableInstanceNeverThrown"})
@Test
public void testGetTargetType() throws Exception {
final NoConverterFoundException exception = new NoConverterFoundException(Object.class);
Modified: libs/logging/trunk/src/prj/net/sf/japi/log/SimpleLogger.java
===================================================================
--- libs/logging/trunk/src/prj/net/sf/japi/log/SimpleLogger.java 2008-12-27 21:40:37 UTC (rev 747)
+++ libs/logging/trunk/src/prj/net/sf/japi/log/SimpleLogger.java 2008-12-28 15:27:01 UTC (rev 748)
@@ -34,24 +34,44 @@
private SimpleLogger() {
}
- /** @see Logger#log(Enum, String) */
- public static void log(final Level level, final String message) {
- DEFAULT_LOGGER.log(level, message);
+ /** Creates a log entry.
+ * @param level Level for the log entry
+ * @param key Key for retrieving the message from the bundle
+ * @see Logger#log(Enum, String)
+ */
+ public static void log(final Level level, final String key) {
+ DEFAULT_LOGGER.log(level, key);
}
- /** @see Logger#log(Enum, String, Object...) */
- public static void log(final Level level, final String message, final Object... params) {
- DEFAULT_LOGGER.log(level, message, params);
+ /** Creates a log entry.
+ * @param level Level for the log entry
+ * @param key Key for retrieving the message from the bundle
+ * @param params Values to use during message formatting
+ * @see Logger#log(Enum, String, Object...)
+ */
+ public static void log(final Level level, final String key, final Object... params) {
+ DEFAULT_LOGGER.log(level, key, params);
}
- /** @see Logger#log(Enum, Throwable, String) */
- public static void log(final Level level, final Throwable t, final String message) {
- DEFAULT_LOGGER.log(level, t, message);
+ /** Creates a log entry.
+ * @param level Level for the log entry
+ * @param key Key for retrieving the message from the bundle
+ * @param t Throwable to log
+ * @see Logger#log(Enum, Throwable, String)
+ */
+ public static void log(final Level level, final Throwable t, final String key) {
+ DEFAULT_LOGGER.log(level, t, key);
}
- /** @see Logger#log(Enum, Throwable, String, Object...) */
- public static void log(final Level level, final Throwable t, final String message, final Object... params) {
- DEFAULT_LOGGER.log(level, t, message, params);
+ /** Creates a log entry.
+ * @param level Level for the log entry
+ * @param key Key for retrieving the message from the bundle
+ * @param t Throwable to log
+ * @param params Values to use during message formatting
+ * @see Logger#log(Enum, Throwable, String, Object...)
+ */
+ public static void log(final Level level, final Throwable t, final String key, final Object... params) {
+ DEFAULT_LOGGER.log(level, t, key, params);
}
} // class SimpleLogger
Modified: libs/midi/trunk/src/prj/net/sf/japi/midi/MidiUtils.java
===================================================================
--- libs/midi/trunk/src/prj/net/sf/japi/midi/MidiUtils.java 2008-12-27 21:40:37 UTC (rev 747)
+++ libs/midi/trunk/src/prj/net/sf/japi/midi/MidiUtils.java 2008-12-28 15:27:01 UTC (rev 748)
@@ -29,7 +29,7 @@
return getReceivingDevices(MidiSystem.getMidiDeviceInfo());
}
- /** Returns all {@iink MidiDevice}s which provide {@link Transmitter}s.
+ /** Returns all {@link MidiDevice}s which provide {@link Transmitter}s.
* @return All {@link MidiDevice}s which provide {@link Transmitter}s.
* @throws MidiUnavailableException if one of the requested devices is unavailable due to resource restrictions.
*/
@@ -124,6 +124,7 @@
/** Returns a device by its name.
* @param name Name of the device to return.
* @return The first device found that matches <var>name</var> or <code>null</code> if the requested device was not found.
+ * @throws MidiUnavailableException In case Midi is not available.
*/
public static MidiDevice getDeviceByName(@NotNull final String name) throws MidiUnavailableException {
for (final MidiDevice.Info deviceInfo : MidiSystem.getMidiDeviceInfo()) {
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 2008-12-27 21:40:37 UTC (rev 747)
+++ libs/swing-action/trunk/src/tst/test/net/sf/japi/swing/ReflectionActionTest.java 2008-12-28 15:27:01 UTC (rev 748)
@@ -25,7 +25,6 @@
import net.sf.japi.swing.ActionBuilderFactory;
import net.sf.japi.swing.ActionMethod;
import net.sf.japi.swing.ReflectionAction;
-import org.jetbrains.annotations.Nullable;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
@@ -42,7 +41,7 @@
private static final ActionBuilder ACTION_BUILDER = ActionBuilderFactory.getInstance().getActionBuilder("test.net.sf.japi.swing");
/** The testling: A ReflectionAction. */
- @Nullable private ReflectionAction testling;
+ private ReflectionAction testling;
/** The Action Mock. */
private ActionMock actionMock;
@@ -55,6 +54,7 @@
}
/** Remove the testling. */
+ @SuppressWarnings({"AssignmentToNull"})
@After
public void tearDown() {
testling = null;
Modified: libs/swing-app/trunk/src/prj/net/sf/japi/swing/app/script/Application.java
===================================================================
--- libs/swing-app/trunk/src/prj/net/sf/japi/swing/app/script/Application.java 2008-12-27 21:40:37 UTC (rev 747)
+++ libs/swing-app/trunk/src/prj/net/sf/japi/swing/app/script/Application.java 2008-12-28 15:27:01 UTC (rev 748)
@@ -1,6 +1,7 @@
package net.sf.japi.swing.app.script;
import java.util.List;
+import org.jetbrains.annotations.NotNull;
/** The Application from a script's view.
* @param <D> The document type that is managed by the application.
@@ -10,8 +11,9 @@
/** Loads a document.
* @param uri URI from which to load the document.
+ * @return The loaded document.
*/
- public abstract Document<D> load(String uri);
+ public abstract Document<D> load(@NotNull String uri);
/** Quits this application. */
public abstract void quit();
@@ -31,7 +33,7 @@
public abstract void save();
/** Saves this document at a different URI.
- * The supplied URI is then the default URI for future saves with {@link save()}.
+ * The supplied URI is then the default URI for future saves with {@link #save()}.
* @param uri URI at which to save this document.
*/
public abstract void saveAs(String uri);
Modified: libs/swing-app/trunk/src/prj/net/sf/japi/swing/app/script/TryApplication.java
===================================================================
--- libs/swing-app/trunk/src/prj/net/sf/japi/swing/app/script/TryApplication.java 2008-12-27 21:40:37 UTC (rev 747)
+++ libs/swing-app/trunk/src/prj/net/sf/japi/swing/app/script/TryApplication.java 2008-12-28 15:27:01 UTC (rev 748)
@@ -1,6 +1,7 @@
package net.sf.japi.swing.app.script;
import java.util.List;
+import org.jetbrains.annotations.NotNull;
/**
* TODO
@@ -9,7 +10,7 @@
public class TryApplication extends Application {
/** {@inheritDoc} */
- public Document load(final String uri) {
+ public Document load(@NotNull final String uri) {
return new Document();
}
Modified: libs/swing-bookmarks/trunk/src/prj/net/sf/japi/swing/bookmarks/BookmarkDropTargetAdapter.java
===================================================================
--- libs/swing-bookmarks/trunk/src/prj/net/sf/japi/swing/bookmarks/BookmarkDropTargetAdapter.java 2008-12-27 21:40:37 UTC (rev 747)
+++ libs/swing-bookmarks/trunk/src/prj/net/sf/japi/swing/bookmarks/BookmarkDropTargetAdapter.java 2008-12-28 15:27:01 UTC (rev 748)
@@ -44,8 +44,10 @@
final BookmarkManager.Bookmark src = getSourceBookmark(dtde);
int pos = -1;
if (!(dest instanceof BookmarkManager.BookmarkFolder)) {
- pos = dest.getFolder().getIndex(dest);
- dest = dest.getFolder();
+ final BookmarkManager.Bookmark newDest = dest.getFolder();
+ assert newDest != null;
+ pos = newDest.getIndex(dest);
+ dest = newDest;
}
assert dest instanceof BookmarkManager.BookmarkFolder;
((BookmarkManager.BookmarkFolder) dest).insert(src, pos);
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 2008-12-27 21:40:37 UTC (rev 747)
+++ libs/swing-bookmarks/trunk/src/prj/net/sf/japi/swing/bookmarks/BookmarkManager.java 2008-12-28 15:27:01 UTC (rev 748)
@@ -413,7 +413,9 @@
/** {@inheritDoc} */
public void removeFromParent() {
- folder.remove(this);
+ if (folder != null) {
+ folder.remove(this);
+ }
}
/** {@inheritDoc} */
Modified: libs/swing-keyprefs/trunk/src/prj/net/sf/japi/swing/prefs/keys/AbstractSimpleNode.java
===================================================================
--- libs/swing-keyprefs/trunk/src/prj/net/sf/japi/swing/prefs/keys/AbstractSimpleNode.java 2008-12-27 21:40:37 UTC (rev 747)
+++ libs/swing-keyprefs/trunk/src/prj/net/sf/japi/swing/prefs/keys/AbstractSimpleNode.java 2008-12-28 15:27:01 UTC (rev 748)
@@ -34,7 +34,7 @@
private final int length;
/** Create an AbstractSimpleNode.
- * @param children
+ * @param children Children for this AbstractSimpleNode.
*/
protected AbstractSimpleNode(@Nullable final C[] children) {
if (children != null) {
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 2008-12-27 21:40:37 UTC (rev 747)
+++ libs/swing-keyprefs/trunk/src/prj/net/sf/japi/swing/prefs/keys/ActionKeyDisplay.java 2008-12-28 15:27:01 UTC (rev 748)
@@ -153,7 +153,7 @@
* @retval String containing localized text for the accelerator of <var>action</var>
* @throws ClassCastException in case the bound accelerator property is not a {@link KeyStroke}
*/
- public static String getLocalizedKeyStrokeText(final Action action) {
+ public static String getLocalizedKeyStrokeText(@Nullable final Action action) {
if (action == null) {
return "";
}
Modified: libs/swing-misc/trunk/src/prj/net/sf/japi/swing/misc/CollectionsListModel.java
===================================================================
--- libs/swing-misc/trunk/src/prj/net/sf/japi/swing/misc/CollectionsListModel.java 2008-12-27 21:40:37 UTC (rev 747)
+++ libs/swing-misc/trunk/src/prj/net/sf/japi/swing/misc/CollectionsListModel.java 2008-12-28 15:27:01 UTC (rev 748)
@@ -76,6 +76,7 @@
/** {@inheritDoc} */
public <T> T[] toArray(final T[] ts) {
+ //noinspection SuspiciousToArrayCall
return list.toArray(ts);
}
Modified: libs/swing-misc/trunk/src/prj/net/sf/japi/swing/misc/JSAXErrorHandler.java
===================================================================
--- libs/swing-misc/trunk/src/prj/net/sf/japi/swing/misc/JSAXErrorHandler.java 2008-12-27 21:40:37 UTC (rev 747)
+++ libs/swing-misc/trunk/src/prj/net/sf/japi/swing/misc/JSAXErrorHandler.java 2008-12-28 15:27:01 UTC (rev 748)
@@ -27,7 +27,6 @@
import javax.swing.JTextArea;
import net.sf.japi.swing.ActionBuilder;
import net.sf.japi.swing.ActionBuilderFactory;
-import org.jetbrains.annotations.Nullable;
import org.xml.sax.ErrorHandler;
import org.xml.sax.SAXException;
import org.xml.sax.SAXParseException;
@@ -49,7 +48,7 @@
/** The Dialog.
* @serial include
*/
- @Nullable private JDialog dialog;
+ private JDialog dialog;
/** Parent component.
* @serial include
@@ -142,6 +141,7 @@
setValue(closeButton);
dialog.setVisible(false);
dialog.dispose();
+ //noinspection AssignmentToNull
dialog = null;
}
Modified: libs/swing-treetable/trunk/src/prj/net/sf/japi/swing/treetable/AbstractTreeTableModel.java
===================================================================
--- libs/swing-treetable/trunk/src/prj/net/sf/japi/swing/treetable/AbstractTreeTableModel.java 2008-12-27 21:40:37 UTC (rev 747)
+++ libs/swing-treetable/trunk/src/prj/net/sf/japi/swing/treetable/AbstractTreeTableModel.java 2008-12-28 15:27:01 UTC (rev 748)
@@ -91,10 +91,10 @@
}
/** Informs all registered listeners of a change.
- * @param source
- * @param path
- * @param childIndices
- * @param children
+ * @param source Event source (usually this).
+ * @param path Path of the change.
+ * @param childIndices Indices of the children that changed.
+ * @param children Children that changed.
*/
protected void fireTreeNodesChanged(final Object source, final T[] path, final int[] childIndices, final T[] children) {
final Object[] listeners = listenerList.getListenerList();
@@ -108,10 +108,10 @@
}
/** Informs all registered listeners of an insertion.
- * @param source
- * @param path
- * @param childIndices
- * @param children
+ * @param source Event source (usually this).
+ * @param path Path of the change.
+ * @param childIndices Indices of the children that changed.
+ * @param children Children that changed.
*/
protected void fireTreeNodesInserted(final Object source, final Object[] path, final int[] childIndices, final Object[] children) {
final Object[] listeners = listenerList.getListenerList();
@@ -125,10 +125,10 @@
}
/** Informs all registered listeners of a removal.
- * @param source
- * @param path
- * @param childIndices
- * @param children
+ * @param source Event source (usually this).
+ * @param path Path of the change.
+ * @param childIndices Indices of the children that changed.
+ * @param children Children that changed.
*/
protected void fireTreeNodesRemoved(final Object source, final Object[] path, final int[] childIndices, final Object[] children) {
final Object[] listeners = listenerList.getListenerList();
@@ -142,10 +142,10 @@
}
/** Informs all registered listeners of a structural change.
- * @param source
- * @param path
- * @param childIndices
- * @param children
+ * @param source Event source (usually this).
+ * @param path Path of the change.
+ * @param childIndices Indices of the children that changed.
+ * @param children Children that changed.
*/
protected void fireTreeStructureChanged(final Object source, final Object[] path, final int[] childIndices, final Object[] children) {
final Object[] listeners = listenerList.getListenerList();
Modified: libs/util/trunk/src/tst/test/net/sf/japi/util/EnumerationIteratorTest.java
===================================================================
--- libs/util/trunk/src/tst/test/net/sf/japi/util/EnumerationIteratorTest.java 2008-12-27 21:40:37 UTC (rev 747)
+++ libs/util/trunk/src/tst/test/net/sf/japi/util/EnumerationIteratorTest.java 2008-12-28 15:27:01 UTC (rev 748)
@@ -33,7 +33,9 @@
*/
public class EnumerationIteratorTest {
- /** Test case for {@link EnumerationIterator#iterator()}. */
+ /** Test case for {@link EnumerationIterator#iterator()}.
+ * @throws Exception (unexpected).
+ */
@Test
public void testIterator() throws Exception {
EnumerationIterator<?> oUT = new EnumerationIterator<String>(Collections.enumeration(Arrays.asList("foo", "bar")));
@@ -42,7 +44,9 @@
Assert.assertNotNull("Even empty enumerations must generate an iterator instance.", oUT.iterator());
}
- /** Test case for {@link EnumerationIterator#hasNext()}. */
+ /** Test case for {@link EnumerationIterator#hasNext()}.
+ * @throws Exception (unexpected).
+ */
@Test public void testHasNext() throws Exception {
EnumerationIterator<?> oUT = new EnumerationIterator<Object>(Collections.enumeration(Arrays.asList()));
Assert.assertFalse("hasNext() on empty enumeration must instantly return false.", oUT.hasNext());
@@ -50,7 +54,9 @@
Assert.assertTrue("hasNext() on nonempty enumeration must first return true.", oUT.hasNext());
}
- /** Test case for {@link EnumerationIterator#next()}. */
+ /** Test case for {@link EnumerationIterator#next()}.
+ * @throws Exception (unexpected).
+ */
@Test public void testNext() throws Exception {
EnumerationIterator<?> oUT = new EnumerationIterator<Object>(Collections.enumeration(Arrays.asList()));
try {
@@ -70,7 +76,9 @@
}
}
- /** Test case for {@link EnumerationIterator#remove()}. */
+ /** Test case for {@link EnumerationIterator#remove()}.
+ * @throws Exception (unexpected).
+ */
@Test public void testRemove() throws Exception {
EnumerationIterator<?> oUT = new EnumerationIterator<Object>(Collections.enumeration(Arrays.asList()));
try {
Modified: libs/xml/trunk/src/tst/test/net/sf/japi/xml/NodeListIterator2Test.java
===================================================================
--- libs/xml/trunk/src/tst/test/net/sf/japi/xml/NodeListIterator2Test.java 2008-12-27 21:40:37 UTC (rev 747)
+++ libs/xml/trunk/src/tst/test/net/sf/japi/xml/NodeListIterator2Test.java 2008-12-28 15:27:01 UTC (rev 748)
@@ -25,7 +25,6 @@
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import net.sf.japi.xml.NodeListIterator;
-import org.jetbrains.annotations.Nullable;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
@@ -40,7 +39,7 @@
public class NodeListIterator2Test {
/** Object Under Test: A NodeListIterator. */
- @Nullable private NodeListIterator<Node> testling;
+ private NodeListIterator<Node> testling;
/** Mock NodeList. */
private NodeList mockNodeList;
@@ -53,6 +52,7 @@
}
/** {@inheritDoc} */
+ @SuppressWarnings({"AssignmentToNull"})
@After
public void tearDown() throws Exception {
testling = null;
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 2008-12-27 21:40:37 UTC (rev 747)
+++ libs/xml/trunk/src/tst/test/net/sf/japi/xml/NodeListIteratorTest.java 2008-12-28 15:27:01 UTC (rev 748)
@@ -7,7 +7,6 @@
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import net.sf.japi.xml.NodeListIterator;
-import org.jetbrains.annotations.Nullable;
import org.junit.AfterClass;
import org.junit.Assert;
import org.junit.BeforeClass;
@@ -26,7 +25,7 @@
public class NodeListIteratorTest {
/** The DocumentBuilder for creating DOM trees for testing. */
- @Nullable private static DocumentBuilder db;
+ private static DocumentBuilder db;
/** Creates the DocumentBuilder that is used for creating DOM trees for testing.
* @throws ParserConfigurationException (unexpected)
@@ -38,6 +37,7 @@
}
/** */
+ @SuppressWarnings({"AssignmentToNull"})
@AfterClass
public static void deleteDocumentBuilder() {
db = null;
Modified: progs/cardlearn/trunk/src/prj/net/sf/japi/cardlearn/CardDatabaseConfigEditor.java
===================================================================
--- progs/cardlearn/trunk/src/prj/net/sf/japi/cardlearn/CardDatabaseConfigEditor.java 2008-12-27 21:40:37 UTC (rev 747)
+++ progs/cardlearn/trunk/src/prj/net/sf/japi/cardlearn/CardDatabaseConfigEditor.java 2008-12-28 15:27:01 UTC (rev 748)
@@ -49,7 +49,7 @@
* @param config Configuration to edit.
* @return edited configuration (same object as <var>config</var>) or <code>null</code> if the dialog was cancelled, in which case <var>config</var> is unchanged.
*/
- public static CardDatabaseConfig showConfigEditor(@Nullable final Component parent, @NotNull final CardDatabaseConfig config) {
+ @Nullable public static CardDatabaseConfig showConfigEditor(@Nullable final Component parent, @NotNull final CardDatabaseConfig config) {
final CardDatabaseConfigEditor editor = new CardDatabaseConfigEditor(config);
final int returnValue = JOptionPane.showConfirmDialog(parent, editor, "XXX", JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE);
if (returnValue == JOptionPane.OK_OPTION) {
Modified: progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/swing/OpenURLPane.java
===================================================================
--- progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/swing/OpenURLPane.java 2008-12-27 21:40:37 UTC (rev 747)
+++ progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/swing/OpenURLPane.java 2008-12-28 15:27:01 UTC (rev 748)
@@ -137,7 +137,7 @@
/** Dialog to show.
* @serial include
*/
- @Nullable private JDialog dialog;
+ private JDialog dialog;
/** JFileChooser to use.
* @serial include
@@ -178,6 +178,7 @@
pane.dialog.pack();
pane.dialog.setVisible(true);
pane.dialog.dispose();
+ //noinspection AssignmentToNull
pane.dialog = null;
final String result = pane.result;
if (rootFrame != null) {
Modified: progs/jirus/trunk/src/prj/net/sf/jirus/MyReceiver.java
===================================================================
--- progs/jirus/trunk/src/prj/net/sf/jirus/MyReceiver.java 2008-12-27 21:40:37 UTC (rev 747)
+++ progs/jirus/trunk/src/prj/net/sf/jirus/MyReceiver.java 2008-12-28 15:27:01 UTC (rev 748)
@@ -40,6 +40,7 @@
if (cmd == ShortMessage.NOTE_OFF) {
playingNote = 0xFF;
} else {
+ //noinspection ConstantConditions
assert cmd == ShortMessage.NOTE_ON;
if (note < playingNote) {
smg.setMessage(ShortMessage.NOTE_OFF, Jirus.SPLIT_CHANNEL, playingNote, velo);
Modified: tools/gdbControl/trunk/src/prj/net/sf/japi/tools/gdbcontrol/ComWithGdb.java
===================================================================
--- tools/gdbControl/trunk/src/prj/net/sf/japi/tools/gdbcontrol/ComWithGdb.java 2008-12-27 21:40:37 UTC (rev 747)
+++ tools/gdbControl/trunk/src/prj/net/sf/japi/tools/gdbcontrol/ComWithGdb.java 2008-12-28 15:27:01 UTC (rev 748)
@@ -6,7 +6,6 @@
import java.io.InputStream;
import java.io.OutputStream;
import org.jetbrains.annotations.NotNull;
-import org.jetbrains.annotations.Nullable;
/** A Java wrapper for communication with gdb.
* @author <a href="mailto:ch...@ri...">Christian Hujer</a>
@@ -18,7 +17,7 @@
private final CharSequence prompt = "(gdb) ";
/** The process of gdb. */
- @Nullable private Process gdbProcess;
+ private Process gdbProcess;
/** InputStream to read data from gdb's stdout. */
private InputStream gdbIn;
@@ -137,6 +136,7 @@
gdbProcess.waitFor();
final int retVal = gdbProcess.exitValue();
gdbProcess.destroy();
+ //noinspection AssignmentToNull
gdbProcess = null;
return retVal;
}
Modified: tools/replacer/trunk/src/prj/net/sf/japi/tools/replacer/Replacer.java
===================================================================
--- tools/replacer/trunk/src/prj/net/sf/japi/tools/replacer/Replacer.java 2008-12-27 21:40:37 UTC (rev 747)
+++ tools/replacer/trunk/src/prj/net/sf/japi/tools/replacer/Replacer.java 2008-12-28 15:27:01 UTC (rev 748)
@@ -299,7 +299,9 @@
}
System.err.println(p.exitValue());
} else {
- file.setWritable(true);
+ if (!file.setWritable(true)) {
+ System.err.println("Couldn't make " + file + " writable.");
+ }
}
}
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 2008-12-27 21:40:37 UTC (rev 747)
+++ tools/string2bytes/trunk/src/tst/test/net/sf/japi/string2bytes/CodecStepTest.java 2008-12-28 15:27:01 UTC (rev 748)
@@ -23,7 +23,6 @@
import net.sf.japi.string2bytes.EntityCodec;
import net.sf.japi.string2bytes.IdentityCodec;
import net.sf.japi.string2bytes.StringCodec;
-import org.jetbrains.annotations.Nullable;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
@@ -37,13 +36,13 @@
public class CodecStepTest {
/** The CodecStep to test. */
- @Nullable private CodecStep codecStep;
+ private CodecStep codecStep;
/** The Codec to use for most tests. */
- @Nullable private StringCodec codec;
+ private StringCodec codec;
/** The Charset to use for most tests. */
- @Nullable private String charset;
+ private String charset;
/**
* Creates the test data and a testling.
@@ -59,6 +58,7 @@
* Removes the test data and the testling.
* @throws Exception (unexpected)
*/
+ @SuppressWarnings({"AssignmentToNull"})
@After public void tearDown() throws Exception {
codec = null;
charset = null;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|