Skip to content

Commit

Permalink
add unit-test
Browse files Browse the repository at this point in the history
  • Loading branch information
XenoAmess committed Aug 20, 2020
1 parent 71fb290 commit 5a473fb
Show file tree
Hide file tree
Showing 5 changed files with 70 additions and 2 deletions.
Expand Up @@ -44,6 +44,15 @@ public ClassWithJavadoc( String aString )
{
}

/**
* method with annotation
* @see java.io.Serializable
*/
@SuppressWarnings("SameReturnValue")
public ClassWithJavadoc( Boolean b )
{
}

/**
* Spaces in tags.
*
Expand Down Expand Up @@ -298,4 +307,13 @@ public static class MyRuntimeException
extends RuntimeException
{
}

/**
* method with annotation
* @see java.io.Serializable
*/
@SuppressWarnings("SameReturnValue")
private void t() {
return;
}
}
Expand Up @@ -69,6 +69,16 @@ public ClassWithNoJavadoc( String aString )
{
}

/**
* <p>Constructor for ClassWithNoJavadoc.</p>
*
* @param aString a {@link java.lang.Boolean} object.
*/
@SuppressWarnings("SameReturnValue")
public ClassWithNoJavadoc( Boolean b )
{
}

// take care of primitive
/**
* <p>missingJavadocTagsForPrimitives.</p>
Expand Down Expand Up @@ -154,4 +164,14 @@ public void nothing()
{
}
}

/**
* <p>t.</p>
*
* @since 1.1
*/
@SuppressWarnings("SameReturnValue")
private void t() {
return;
}
}
4 changes: 2 additions & 2 deletions src/test/resources/unit/fix-test/pom.xml
Expand Up @@ -27,8 +27,8 @@
<packaging>jar</packaging>

<properties>
<maven.compiler.source>1.4</maven.compiler.source>
<maven.compiler.target>1.4</maven.compiler.target>
<maven.compiler.source>1.5</maven.compiler.source>
<maven.compiler.target>1.5</maven.compiler.target>
</properties>

<build>
Expand Down
Expand Up @@ -22,6 +22,7 @@
/**
* To add default class tags.
*/
@SuppressWarnings("SameReturnValue")
public class ClassWithJavadoc
implements InterfaceWithJavadoc
{
Expand All @@ -39,6 +40,15 @@ public ClassWithJavadoc( String aString )
{
}

/**
* method with annotation
* @see java.io.Serializable
*/
@SuppressWarnings("SameReturnValue")
public ClassWithJavadoc( Boolean b )
{
}

/**
* Spaces in tags.
*
Expand Down Expand Up @@ -282,4 +292,13 @@ public static class MyRuntimeException
extends RuntimeException
{
}

/**
* method with annotation
* @see java.io.Serializable
*/
@SuppressWarnings("SameReturnValue")
private void t() {
return;
}
}
Expand Up @@ -21,6 +21,7 @@

import java.util.Map;

@SuppressWarnings("SameReturnValue")
public class ClassWithNoJavadoc
implements InterfaceWithNoJavadoc
{
Expand Down Expand Up @@ -49,6 +50,11 @@ public ClassWithNoJavadoc( String aString )
{
}

@SuppressWarnings("SameReturnValue")
public ClassWithNoJavadoc( Boolean b )
{
}

// take care of primitive
public void missingJavadocTagsForPrimitives( int i, byte b, float f, char c, short s, long l, double d, boolean bb )
{
Expand Down Expand Up @@ -106,4 +112,9 @@ public void nothing()
{
}
}

@SuppressWarnings("SameReturnValue")
private void t() {
return;
}
}

0 comments on commit 5a473fb

Please sign in to comment.