Skip to content

Commit

Permalink
#44 deps up
Browse files Browse the repository at this point in the history
  • Loading branch information
Yegor Bugayenko committed Dec 15, 2015
1 parent 0412895 commit 5bfb016
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 29 deletions.
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.aspectj</groupId>
Expand Down
4 changes: 1 addition & 3 deletions src/main/java/com/jcabi/jdbc/ColumnOutcome.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
import java.util.Collection;
import java.util.Date;
import java.util.LinkedList;
import javax.validation.constraints.NotNull;
import lombok.EqualsAndHashCode;
import lombok.ToString;

Expand Down Expand Up @@ -72,8 +71,7 @@ public final class ColumnOutcome<T> implements Outcome<Collection<T>> {
* Public ctor.
* @param tpe The type to convert to
*/
public ColumnOutcome(@NotNull(message = "type can't be NULL")
final Class<T> tpe) {
public ColumnOutcome(final Class<T> tpe) {
//@checkstyle BooleanExpressionComplexity (3 lines)
if (tpe.equals(String.class) || tpe.equals(Long.class)
|| tpe.equals(Boolean.class) || tpe.equals(Byte.class)
Expand Down
19 changes: 5 additions & 14 deletions src/main/java/com/jcabi/jdbc/JdbcSession.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.atomic.AtomicReference;
import javax.sql.DataSource;
import javax.validation.constraints.NotNull;
import lombok.EqualsAndHashCode;
import lombok.ToString;

Expand Down Expand Up @@ -149,8 +148,7 @@ public final class JdbcSession {
* Public ctor.
* @param src Data source
*/
public JdbcSession(
@NotNull(message = "data source can't be NULL") final DataSource src) {
public JdbcSession(final DataSource src) {
this.args = new CopyOnWriteArrayList<Object>();
this.preparations = new CopyOnWriteArrayList<Preparation>();
this.connection = new AtomicReference<Connection>();
Expand Down Expand Up @@ -184,8 +182,7 @@ public JdbcSession(final Connection cnx) {
* @param sql The SQL query to use
* @return This object
*/
public JdbcSession sql(
@NotNull(message = "SQL query can't be NULL") final String sql) {
public JdbcSession sql(final String sql) {
synchronized (this.args) {
this.query = sql;
}
Expand Down Expand Up @@ -283,9 +280,7 @@ public void commit() throws SQLException {
* @param <T> Type of response
* @throws SQLException If fails
*/
public <T> T insert(
@NotNull(message = "outcome can't be NULL")
final Outcome<T> outcome)
public <T> T insert(final Outcome<T> outcome)
throws SQLException {
return this.run(
outcome,
Expand All @@ -304,9 +299,7 @@ public <T> T insert(
* @return This object
* @throws SQLException If fails
*/
public <T> T update(
@NotNull(message = "outcome can't be NULL")
final Outcome<T> outcome)
public <T> T update(final Outcome<T> outcome)
throws SQLException {
return this.run(
outcome,
Expand Down Expand Up @@ -350,9 +343,7 @@ public JdbcSession execute() throws SQLException {
* @param <T> Type of response
* @throws SQLException If fails
*/
public <T> T select(
@NotNull(message = "outcome can't be NULL")
final Outcome<T> outcome)
public <T> T select(final Outcome<T> outcome)
throws SQLException {
return this.run(
outcome,
Expand Down
4 changes: 1 addition & 3 deletions src/main/java/com/jcabi/jdbc/ListOutcome.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
import java.sql.Statement;
import java.util.LinkedList;
import java.util.List;
import javax.validation.constraints.NotNull;
import lombok.EqualsAndHashCode;
import lombok.ToString;

Expand Down Expand Up @@ -77,8 +76,7 @@ public final class ListOutcome<T> implements Outcome<List<T>> {
* Public ctor.
* @param mpg Mapping
*/
public ListOutcome(@NotNull(message = "mapping can't be NULL")
final ListOutcome.Mapping<T> mpg) {
public ListOutcome(final ListOutcome.Mapping<T> mpg) {
this.mapping = mpg;
}

Expand Down
8 changes: 2 additions & 6 deletions src/main/java/com/jcabi/jdbc/SingleOutcome.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
import java.sql.SQLException;
import java.sql.Statement;
import java.util.Date;
import javax.validation.constraints.NotNull;
import lombok.EqualsAndHashCode;
import lombok.ToString;

Expand Down Expand Up @@ -89,8 +88,7 @@ public final class SingleOutcome<T> implements Outcome<T> {
* Public ctor.
* @param tpe The type to convert to
*/
public SingleOutcome(
@NotNull(message = "type of result can't be NULL") final Class<T> tpe) {
public SingleOutcome(final Class<T> tpe) {
this(tpe, false);
}

Expand All @@ -99,9 +97,7 @@ public SingleOutcome(
* @param tpe The type to convert to
* @param slnt Silently return NULL if there is no row
*/
public SingleOutcome(
@NotNull(message = "type can't be NULL") final Class<T> tpe,
final boolean slnt) {
public SingleOutcome(final Class<T> tpe, final boolean slnt) {
//@checkstyle BooleanExpressionComplexity (3 lines)
if (tpe.equals(String.class) || tpe.equals(Long.class)
|| tpe.equals(Boolean.class) || tpe.equals(Byte.class)
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/jcabi/jdbc/StaticSource.java
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ final class StaticSource implements DataSource {
}

@Override
public Connection getConnection() throws SQLException {
public Connection getConnection() {
return this.conn;
}

Expand Down
3 changes: 1 addition & 2 deletions src/main/java/com/jcabi/jdbc/Utc.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
import java.util.Calendar;
import java.util.Date;
import java.util.SimpleTimeZone;
import javax.validation.constraints.NotNull;
import lombok.EqualsAndHashCode;
import lombok.ToString;

Expand Down Expand Up @@ -101,7 +100,7 @@ public Utc() {
* Public ctor.
* @param when The date to use.
*/
public Utc(@NotNull(message = "date can't be NULL") final Date when) {
public Utc(final Date when) {
this.date = when.getTime();
}

Expand Down

0 comments on commit 5bfb016

Please sign in to comment.