Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 4 additions & 8 deletions src/main/java/org/audit4j/core/annotation/Audit.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,7 @@
*
* @return the string
*/
@Nonbinding
public String action() default "action";
@Nonbinding String action() default "action";

/**
* Selection.
Expand All @@ -58,8 +57,7 @@
* @deprecated : this attribute is no longer using.
*/
@Deprecated
@Nonbinding
public SelectionType selection() default SelectionType.ALL;
@Nonbinding SelectionType selection() default SelectionType.ALL;

/**
* Tag.
Expand All @@ -68,15 +66,13 @@
* @deprecated see repository for more information. Repository.
*/
@Deprecated
@Nonbinding
public String tag() default "default";
@Nonbinding String tag() default "default";

/**
* Repository. This attribute using to define the repository where audit log
* located.
*
* @return the string
*/
@Nonbinding
public String repository() default "default";
@Nonbinding String repository() default "default";
}
2 changes: 1 addition & 1 deletion src/main/java/org/audit4j/core/annotation/AuditField.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,5 @@
*
* @return the string
*/
public String field();
String field();
}
8 changes: 4 additions & 4 deletions src/main/java/org/audit4j/core/annotation/DeIdentify.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,27 +44,27 @@
*
* @return the int
*/
public int left() default 0;
int left() default 0;

/**
* Right.
*
* @return the int
*/
public int right() default 0;
int right() default 0;

/**
* From left.
*
* @return the int
*/
public int fromLeft() default 0;
int fromLeft() default 0;

/**
* From right.
*
* @return the int
*/
public int fromRight() default 0;
int fromRight() default 0;

}
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
*/
public interface AuditEventFilter<T extends Event> extends Serializable {

public POJOQuery<AuditEvent> query = new POJOQuery<>();
POJOQuery<AuditEvent> query = new POJOQuery<>();

/**
* Accepts.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,5 @@
*
* @return the string
*/
public String value() default "";
String value() default "";
}
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,5 @@
*
* @return the string
*/
public String value() default "";
String value() default "";
}
4 changes: 2 additions & 2 deletions src/test/java/org/audit4j/core/Audit4jTestBase.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ protected AuditEvent getSampleAuditEvent() {
String actor = "Dummy Actor";
EventBuilder builder = new EventBuilder();
builder.addTimestamp(new Date()).addActor(actor).addAction("myMethod").addOrigin("Origin").addField("myParam1Name", "param1")
.addField("myParam2Name", new Integer(2));
.addField("myParam2Name", 2);
return builder.build();
}

protected AuditEvent getSampleAuditEvent(String action) {
String actor = "Dummy Actor";
EventBuilder builder = new EventBuilder();
builder.addTimestamp(new Date()).addActor(actor).addAction(action).addOrigin("Origin").addField("myParam1Name", "param1")
.addField("myParam2Name", new Integer(2));
.addField("myParam2Name", 2);
return builder.build();
}

Expand Down
14 changes: 7 additions & 7 deletions src/test/java/org/audit4j/core/dto/AuditBaseTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public void testAuditBase_1()
public void testGetTimestamp_1()
throws Exception {
Event fixture = new Event();
fixture.setUuid(new Long(1L));
fixture.setUuid(1L);
fixture.setTimestamp(new Date());

Date result = fixture.getTimestamp();
Expand All @@ -64,7 +64,7 @@ public void testGetTimestamp_1()
public void testGetUuid_1()
throws Exception {
Event fixture = new Event();
fixture.setUuid(new Long(1L));
fixture.setUuid(1L);
fixture.setTimestamp(new Date());

Long result = fixture.getUuid();
Expand All @@ -91,9 +91,9 @@ public void testGetUuid_1()
public void testSetAuditId_1()
throws Exception {
Event fixture = new Event();
fixture.setUuid(new Long(1L));
fixture.setUuid(1L);
fixture.setTimestamp(new Date());
Integer auditId = new Integer(1);
Integer auditId = 1;


// add additional test code here
Expand All @@ -110,7 +110,7 @@ public void testSetAuditId_1()
public void testSetTimestamp_1()
throws Exception {
Event fixture = new Event();
fixture.setUuid(new Long(1L));
fixture.setUuid(1L);
fixture.setTimestamp(new Date());
Date timestamp = new Date();

Expand All @@ -130,9 +130,9 @@ public void testSetTimestamp_1()
public void testSetUuid_1()
throws Exception {
Event fixture = new Event();
fixture.setUuid(new Long(1L));
fixture.setUuid(1L);
fixture.setTimestamp(new Date());
Long uuid = new Long(1L);
Long uuid = 1L;

fixture.setUuid(uuid);

Expand Down
2 changes: 1 addition & 1 deletion src/test/java/org/audit4j/core/dto/EventBuilderTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public void testEventBuilder() {
watch.start("builder");
EventBuilder builder = new EventBuilder();
builder.addActor("Actor").addAction("myMethod").addOrigin("Origin1").addField("myParam1Name", "param1")
.addField("myParam2Name", new Integer(2));
.addField("myParam2Name", 2);
AuditEvent event = builder.build();
watch.stop();
Log.info(watch.getLastTaskTimeMillis());
Expand Down
4 changes: 2 additions & 2 deletions src/test/java/org/audit4j/core/smoke/SmokeTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public void smokeTestAuditEvent() throws InterruptedException {
String actor = "Dummy Actor";
EventBuilder builder = new EventBuilder();
builder.addActor(actor).addAction("myMethod").addOrigin("Origin1").addField("myParam1Name", "param1")
.addField("myParam2Name", new Integer(2));
.addField("myParam2Name", 2);
AuditEvent event = builder.build();
watch.stop();
Log.info(watch.getTotalTime());
Expand All @@ -51,7 +51,7 @@ public static void main(String[] args) {
while (count < 100000) {
EventBuilder builder = new EventBuilder();
builder.addActor("Dummy Actor").addAction("myMethod").addOrigin("Origin1")
.addField("myParam1Name", "param1").addField("myParam2Name", new Integer(2));
.addField("myParam1Name", "param1").addField("myParam2Name", 2);
AuditEvent event = builder.build();
manager.audit(event);
count++;
Expand Down