[Japi-cvs] SF.net SVN: japi: [581] libs
Status: Beta
Brought to you by:
christianhujer
|
From: <chr...@us...> - 2007-08-15 16:41:43
|
Revision: 581
http://japi.svn.sourceforge.net/japi/?rev=581&view=rev
Author: christianhujer
Date: 2007-08-15 09:41:40 -0700 (Wed, 15 Aug 2007)
Log Message:
-----------
Added missing @NotNull / @Nullable annotations.
Modified Paths:
--------------
libs/lang/trunk/src/net/sf/japi/lang/PropertyComparator.java
libs/lang/trunk/src/net/sf/japi/lang/SuperClassIterator.java
libs/net/trunk/src/net/sf/japi/net/Forwarder.java
Modified: libs/lang/trunk/src/net/sf/japi/lang/PropertyComparator.java
===================================================================
--- libs/lang/trunk/src/net/sf/japi/lang/PropertyComparator.java 2007-08-15 16:40:40 UTC (rev 580)
+++ libs/lang/trunk/src/net/sf/japi/lang/PropertyComparator.java 2007-08-15 16:41:40 UTC (rev 581)
@@ -42,7 +42,7 @@
@Nullable private final Comparator<T> delegate;
/** The name of the property to get. */
- private final String propertyName;
+ @NotNull private final String propertyName;
/** The getter to read the property. */
@Nullable private final Method getter;
@@ -113,7 +113,7 @@
/** Returns the property name of the property that's compared by this PropertyComparator.
* @return Property name.
*/
- public String getPropertyName() {
+ @NotNull public String getPropertyName() {
return propertyName;
}
Modified: libs/lang/trunk/src/net/sf/japi/lang/SuperClassIterator.java
===================================================================
--- libs/lang/trunk/src/net/sf/japi/lang/SuperClassIterator.java 2007-08-15 16:40:40 UTC (rev 580)
+++ libs/lang/trunk/src/net/sf/japi/lang/SuperClassIterator.java 2007-08-15 16:41:40 UTC (rev 581)
@@ -21,6 +21,7 @@
import java.util.Iterator;
import java.util.NoSuchElementException;
+import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
/**
@@ -47,7 +48,7 @@
}
/** {@inheritDoc} */
- public Class<?> next() {
+ @NotNull public Class<?> next() {
if (nextClass == null) {
throw new NoSuchElementException();
}
@@ -64,7 +65,7 @@
}
/** {@inheritDoc} */
- public Iterator<Class<?>> iterator() {
+ @NotNull public Iterator<Class<?>> iterator() {
return this;
}
Modified: libs/net/trunk/src/net/sf/japi/net/Forwarder.java
===================================================================
--- libs/net/trunk/src/net/sf/japi/net/Forwarder.java 2007-08-15 16:40:40 UTC (rev 580)
+++ libs/net/trunk/src/net/sf/japi/net/Forwarder.java 2007-08-15 16:41:40 UTC (rev 581)
@@ -25,6 +25,7 @@
import java.net.ServerSocket;
import java.net.Socket;
import net.sf.japi.io.Copier;
+import org.jetbrains.annotations.NotNull;
/** This class forwards incoming TCP connections to another host and port.
* @author <a href="mailto:ch...@ri...">Christian Hujer</a>
@@ -55,16 +56,16 @@
}
/** First socket. */
- private final Socket s1;
+ @NotNull private final Socket s1;
/** Second socket. */
- private final Socket s2;
+ @NotNull private final Socket s2;
/** Create a new Forwarder.
* @param s1 first socket
* @param s2 second socket
*/
- public Forwarder(final Socket s1, final Socket s2) {
+ public Forwarder(@NotNull final Socket s1, @NotNull final Socket s2) {
this.s1 = s1;
this.s2 = s2;
}
@@ -86,10 +87,8 @@
} catch (final IOException e) {
e.printStackTrace(); //TODO
} finally {
- //noinspection CatchGenericClass,OverlyBroadCatchBlock
- try { s1.close(); } catch (final Exception ignore) { /* ignore */ }
- //noinspection CatchGenericClass,OverlyBroadCatchBlock
- try { s2.close(); } catch (final Exception ignore) { /* ignore */ }
+ try { s1.close(); } catch (final IOException ignore) { /* ignore */ }
+ try { s2.close(); } catch (final IOException ignore) { /* ignore */ }
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|