Skip to content

Commit

Permalink
checkstyle (#90)
Browse files Browse the repository at this point in the history
* checkstyle

* update
  • Loading branch information
tvd12 authored Apr 24, 2022
1 parent 28d92eb commit c0adfa5
Show file tree
Hide file tree
Showing 500 changed files with 18,828 additions and 18,828 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ You need for `ezyfox` to your Github
- must include unit test and coverage 100%
- should have 6 files or less
- don't change old code style if it has no problem
### 3. resolve review comment if we have any

Please don't use force push after push resolved comments code
Expand Down
24 changes: 12 additions & 12 deletions assembly.xml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<assembly>
<id>bin</id>
<includeBaseDirectory>false</includeBaseDirectory>
<formats>
<format>dir</format>
</formats>
<id>bin</id>
<includeBaseDirectory>false</includeBaseDirectory>
<formats>
<format>dir</format>
</formats>

<dependencySets>
<dependencySet>
<useProjectArtifact>true</useProjectArtifact>
<outputDirectory>lib</outputDirectory>
</dependencySet>
</dependencySets>
<dependencySets>
<dependencySet>
<useProjectArtifact>true</useProjectArtifact>
<outputDirectory>lib</outputDirectory>
</dependencySet>
</dependencySets>

</assembly>
</assembly>
24 changes: 12 additions & 12 deletions ezyfox-server-boot/assembly.xml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<assembly>
<id>bin</id>
<includeBaseDirectory>false</includeBaseDirectory>
<formats>
<format>dir</format>
</formats>
<id>bin</id>
<includeBaseDirectory>false</includeBaseDirectory>
<formats>
<format>dir</format>
</formats>

<dependencySets>
<dependencySet>
<useProjectArtifact>true</useProjectArtifact>
<outputDirectory>lib</outputDirectory>
</dependencySet>
</dependencySets>
<dependencySets>
<dependencySet>
<useProjectArtifact>true</useProjectArtifact>
<outputDirectory>lib</outputDirectory>
</dependencySet>
</dependencySets>

</assembly>
</assembly>
38 changes: 19 additions & 19 deletions ezyfox-server-boot/pom.xml
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.tvd12</groupId>
<artifactId>ezyfox-server</artifactId>
<version>1.2.3</version>
</parent>
<artifactId>ezyfox-server-boot</artifactId>
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.tvd12</groupId>
<artifactId>ezyfox-server</artifactId>
<version>1.2.3</version>
</parent>
<artifactId>ezyfox-server-boot</artifactId>

<name>ezyfox-server-boot</name>
<url>https://youngmonkeys.org/project/ezyfox-sever/</url>

<dependencies>
<dependency>
<groupId>com.tvd12</groupId>
<artifactId>ezyfox-server-core</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>

<name>ezyfox-server-boot</name>
<url>https://youngmonkeys.org/project/ezyfox-sever/</url>

<dependencies>
<dependency>
<groupId>com.tvd12</groupId>
<artifactId>ezyfox-server-core</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@

public class EzyEmptyHttpBootstrap implements EzyHttpBootstrap {

@Setter
protected EzyServerContext serverContext;

@Override
public void start() throws Exception {}
@Setter
protected EzyServerContext serverContext;

@Override
public void destroy() {}
@Override
public void start() throws Exception {}

@Override
public void destroy() {}

}
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,29 @@

public abstract class EzyHttpServerBootstrap extends EzyServerBootstrap {

private EzyHttpBootstrap httpBootstrap;
protected void startHttpBootstrap() throws Exception {
EzyHttpSetting setting = getHttpSetting();
if(!setting.isActive()) return;
logger.debug("starting http server bootstrap ....");
httpBootstrap = newHttpBottstrap();
httpBootstrap.start();
logger.debug("http server bootstrap has started");
}
private EzyHttpBootstrap newHttpBottstrap() {
EzyEmptyHttpBootstrap bootstrap = new EzyEmptyHttpBootstrap();
bootstrap.setServerContext(context);
return bootstrap;
}
@Override
public void destroy() {
super.destroy();
if(httpBootstrap != null)
processWithLogException(() -> httpBootstrap.destroy());
this.httpBootstrap = null;
}
private EzyHttpBootstrap httpBootstrap;

protected void startHttpBootstrap() throws Exception {
EzyHttpSetting setting = getHttpSetting();
if(!setting.isActive()) return;
logger.debug("starting http server bootstrap ....");
httpBootstrap = newHttpBottstrap();
httpBootstrap.start();
logger.debug("http server bootstrap has started");
}

private EzyHttpBootstrap newHttpBottstrap() {
EzyEmptyHttpBootstrap bootstrap = new EzyEmptyHttpBootstrap();
bootstrap.setServerContext(context);
return bootstrap;
}

@Override
public void destroy() {
super.destroy();
if(httpBootstrap != null)
processWithLogException(() -> httpBootstrap.destroy());
this.httpBootstrap = null;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@

public class EzyHttpServerBootstrapBuilderTest extends BaseTest {

@Test
public void test() {
new ExEzyHttpServerBootstrapBuilder();
}
public static class ExEzyHttpServerBootstrapBuilder extends EzyHttpServerBootstrapBuilder {
@Test
public void test() {
new ExEzyHttpServerBootstrapBuilder();
}
public static class ExEzyHttpServerBootstrapBuilder extends EzyHttpServerBootstrapBuilder {

@Override
protected EzyServerBootstrap newServerBootstrap() {
return null;
}
}
@Override
protected EzyServerBootstrap newServerBootstrap() {
return null;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,37 +14,37 @@

public class EzyHttpServerBootstrapTest extends BaseTest {

@Test
public void test() {
EzyServerContext serverContext = mock(EzyServerContext.class);
EzySimpleSettings settings = new EzySimpleSettings();
EzySimpleServer server = new EzySimpleServer();
server.setSettings(settings);
when(serverContext.getServer()).thenReturn(server);
EzyEmptyHttpBootstrap httpBootstrap = new EzyEmptyHttpBootstrap();
httpBootstrap.setServerContext(serverContext);
ExEzyHttpServerBootstrap bootstrap = new ExEzyHttpServerBootstrap();
bootstrap.setContext(serverContext);
MethodInvoker.create()
.object(bootstrap)
.method("startHttpBootstrap")
.invoke();
settings.getHttp().setActive(true);
MethodInvoker.create()
.object(bootstrap)
.method("startHttpBootstrap")
.invoke();
bootstrap.destroy();
bootstrap.destroy();
}
public static class ExEzyHttpServerBootstrap extends EzyHttpServerBootstrap {
@Test
public void test() {
EzyServerContext serverContext = mock(EzyServerContext.class);
EzySimpleSettings settings = new EzySimpleSettings();
EzySimpleServer server = new EzySimpleServer();
server.setSettings(settings);
when(serverContext.getServer()).thenReturn(server);
EzyEmptyHttpBootstrap httpBootstrap = new EzyEmptyHttpBootstrap();
httpBootstrap.setServerContext(serverContext);
ExEzyHttpServerBootstrap bootstrap = new ExEzyHttpServerBootstrap();
bootstrap.setContext(serverContext);
MethodInvoker.create()
.object(bootstrap)
.method("startHttpBootstrap")
.invoke();
settings.getHttp().setActive(true);
MethodInvoker.create()
.object(bootstrap)
.method("startHttpBootstrap")
.invoke();
bootstrap.destroy();
bootstrap.destroy();
}
public static class ExEzyHttpServerBootstrap extends EzyHttpServerBootstrap {

@Override
protected void startOtherBootstraps(Runnable callback) throws Exception {
}
}
@Override
protected void startOtherBootstraps(Runnable callback) throws Exception {
}
}
}
12 changes: 6 additions & 6 deletions ezyfox-server-boot/src/test/resources/AllTests.tng.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">

<suite name="AllTests">
<test name="All">
<packages>
<package name="com.tvd12.ezyfoxserver.testing"></package>
</packages>
</test>
</suite>
<test name="All">
<packages>
<package name="com.tvd12.ezyfoxserver.testing"></package>
</packages>
</test>
</suite>
24 changes: 12 additions & 12 deletions ezyfox-server-core/assembly.xml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<assembly>
<id>bin</id>
<includeBaseDirectory>false</includeBaseDirectory>
<formats>
<format>dir</format>
</formats>
<id>bin</id>
<includeBaseDirectory>false</includeBaseDirectory>
<formats>
<format>dir</format>
</formats>

<dependencySets>
<dependencySet>
<useProjectArtifact>true</useProjectArtifact>
<outputDirectory>lib</outputDirectory>
</dependencySet>
</dependencySets>
<dependencySets>
<dependencySet>
<useProjectArtifact>true</useProjectArtifact>
<outputDirectory>lib</outputDirectory>
</dependencySet>
</dependencySets>

</assembly>
</assembly>
Loading

0 comments on commit c0adfa5

Please sign in to comment.