Skip to content

Commit

Permalink
Merge deb5cfa into f2049dd
Browse files Browse the repository at this point in the history
  • Loading branch information
cardil committed Mar 29, 2016
2 parents f2049dd + deb5cfa commit 66192fc
Show file tree
Hide file tree
Showing 18 changed files with 493 additions and 274 deletions.
26 changes: 20 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,25 @@
language: java
sudo: false
script: mvn clean install -P '!sonar,ci' --fail-at-end
script: mvn clean install --fail-at-end
notifications:
email:
on_failure: true
jdk:
- openjdk6
- openjdk7
- oraclejdk7
- oraclejdk8
matrix:
include:
- jdk: openjdk6
env: JACOCO=true COVERALLS=true
- jdk: openjdk7
env: JACOCO=true COVERALLS=true
- jdk: oraclejdk7
env: JACOCO=true COVERALLS=true
script: mvn clean install sonar:sonar --fail-at-end
- jdk: oraclejdk8
env: JACOCO=true COVERALLS=true
- jdk: openjdk6
env: JACOCO=false
- jdk: openjdk7
env: JACOCO=false
- jdk: oraclejdk7
env: JACOCO=false
- jdk: oraclejdk8
env: JACOCO=false
14 changes: 10 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@

<skipTests/>
<coveralls.skip>${skipTests}</coveralls.skip>
<jacoco.version>0.7.6.201602180812</jacoco.version>
</properties>

<dependencies>
Expand Down Expand Up @@ -169,7 +170,7 @@
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.7.6.201602180812</version>
<version>${jacoco.version}</version>
<executions>
<execution>
<id>jacoco-initialize</id>
Expand Down Expand Up @@ -320,7 +321,12 @@
<profiles>
<profile>
<id>ci</id>

<activation>
<property>
<name>env.JACOCO</name>
<value>true</value>
</property>
</activation>
<build>
<plugins>
<plugin>
Expand Down Expand Up @@ -399,10 +405,10 @@
</profile>

<profile>
<id>travis</id>
<id>coveralls</id>
<activation>
<property>
<name>env.TRAVIS</name>
<name>env.COVERALLS</name>
<value>true</value>
</property>
</activation>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package pl.wavesoftware.eid;

import javax.annotation.Nonnull;
import javax.annotation.meta.TypeQualifierDefault;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;

/**
* @author <a href="mailto:krzysztof.suszynski@wavesoftware.pl">Krzysztof Suszynski</a>
* @since 2016-03-26
*/
@Nonnull
@TypeQualifierDefault(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
public @interface ReturnTypesAreNonnullByDefault {
}
5 changes: 2 additions & 3 deletions src/main/java/pl/wavesoftware/eid/exceptions/Eid.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
*/
package pl.wavesoftware.eid.exceptions;

import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import java.io.Serializable;
import java.util.ArrayList;
Expand All @@ -30,7 +29,7 @@
* <p>
* Exception identifier for all Eid Runtime Exceptions.
*
* @author Krzysztof Suszyński <krzysztof.suszynski@wavesoftware.pl>
* @author <a href="mailto:krzysztof.suszynski@wavesoftware.pl">Krzysztof Suszynski</a>
*/
public class Eid implements Serializable {

Expand Down Expand Up @@ -170,7 +169,7 @@ public static String setRefFormat(String refFormat) {
* @param parameters a parameters for logMessageFormat to by passed to {@link String#format(String, Object...)}
* @return a formatted message
*/
public String makeLogMessage(@Nonnull String logMessageFormat, @Nonnull Object... parameters) {
public String makeLogMessage(String logMessageFormat, Object... parameters) {
String message = String.format(logMessageFormat, parameters);
return String.format(getMessageFormat(), this.toString(), message);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
/**
* Indicate that object contains a Eid object
*
* @author Krzysztof Suszyński <krzysztof.suszynski@wavesoftware.pl>
* @author <a href="mailto:krzysztof.suszynski@wavesoftware.pl">Krzysztof Suszynski</a>
*/
public interface EidContainer {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
*
* @see IllegalArgumentException
* @see EidRuntimeException
* @author Krzysztof Suszyński <krzysztof.suszynski@wavesoftware.pl>
* @author <a href="mailto:krzysztof.suszynski@wavesoftware.pl">Krzysztof Suszynski</a>
*/
public class EidIllegalArgumentException extends EidRuntimeException {

Expand Down Expand Up @@ -85,7 +85,6 @@ public EidIllegalArgumentException(Eid id, String messageFormat, Object... param
}

/**
* @inheritdoc
* @return {@link IllegalArgumentException} class
*/
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
*
* @see IllegalStateException
* @see EidRuntimeException
* @author Krzysztof Suszyński <krzysztof.suszynski@wavesoftware.pl>
* @author <a href="mailto:krzysztof.suszynski@wavesoftware.pl">Krzysztof Suszynski</a>
*/
public class EidIllegalStateException extends EidRuntimeException {

Expand Down Expand Up @@ -85,7 +85,6 @@ public EidIllegalStateException(Eid id, String messageFormat, Object... paramete
}

/**
* @inheritdoc
* @return {@link IllegalStateException} class
*/
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
*
* @see IndexOutOfBoundsException
* @see EidRuntimeException
* @author Krzysztof Suszyński <krzysztof.suszynski@wavesoftware.pl>
* @author <a href="mailto:krzysztof.suszynski@wavesoftware.pl">Krzysztof Suszynski</a>
*/
public class EidIndexOutOfBoundsException extends EidRuntimeException {

Expand Down Expand Up @@ -85,7 +85,6 @@ public EidIndexOutOfBoundsException(Eid id, String messageFormat, Object... para
}

/**
* @inheritdoc
* @return {@link IndexOutOfBoundsException} class
*/
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
*
* @see NullPointerException
* @see EidRuntimeException
* @author Krzysztof Suszyński <krzysztof.suszynski@wavesoftware.pl>
* @author <a href="mailto:krzysztof.suszynski@wavesoftware.pl">Krzysztof Suszynski</a>
*/
public class EidNullPointerException extends EidRuntimeException {

Expand Down Expand Up @@ -85,7 +85,6 @@ public EidNullPointerException(Eid id, String messageFormat, Object... parameter
}

/**
* @inheritdoc
* @return {@link NullPointerException} class
*/
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
* <p>
* For convenience use {@link pl.wavesoftware.eid.utils.EidPreconditions}
*
* @author Krzysztof Suszyński <krzysztof.suszynski@wavesoftware.pl>
* @author <a href="mailto:krzysztof.suszynski@wavesoftware.pl">Krzysztof Suszynski</a>
*/
public class EidRuntimeException extends RuntimeException implements EidContainer {

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/**
* @author <a href="mailto:krzysztof.suszynski@coi.gov.pl">Krzysztof Suszynski</a>
* @since 29.03.16
*/
@javax.annotation.ParametersAreNonnullByDefault
@pl.wavesoftware.eid.ReturnTypesAreNonnullByDefault
package pl.wavesoftware.eid.exceptions;
Loading

0 comments on commit 66192fc

Please sign in to comment.