Skip to content

Commit a444073

Browse files
author
Lloyd Watkin
committed
Merge branch 'master' of github.com:buddycloud/buddycloud-server-java
2 parents 405985b + 43c8b05 commit a444073

43 files changed

Lines changed: 1172 additions & 1275 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

pom.xml

Lines changed: 172 additions & 129 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,11 @@
2626
<properties>
2727
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
2828
<project.build.withDependencies>jar-with-dependencies</project.build.withDependencies>
29-
<maven.checkstyle.plugin.version>2.13</maven.checkstyle.plugin.version>
29+
<findbugs.version>2.5.5</findbugs.version>
30+
<checkstyle.version>2.13</checkstyle.version>
3031
<checkstyle.config.location>src/main/resources/checkstyle.xml</checkstyle.config.location>
32+
<cobertura.version>2.6</cobertura.version>
33+
<surefire.reportplugin.version>2.5</surefire.reportplugin.version>
3134
</properties>
3235

3336
<dependencies>
@@ -168,144 +171,184 @@
168171
</repository>
169172
</repositories>
170173
<build>
171-
<pluginManagement>
172-
<plugins>
173-
<plugin>
174-
<!-- Extended Maven antrun plugin -->
175-
<!-- https://maven-antrun-extended-plugin.dev.java.net/ -->
176-
<groupId>org.jvnet.maven-antrun-extended-plugin</groupId>
177-
<artifactId>maven-antrun-extended-plugin</artifactId>
178-
<executions>
179-
<execution>
180-
<id>test-reports</id>
181-
<phase>test</phase>
182-
<configuration>
183-
<tasks unless="maven.test.skip">
184-
<junitreport todir="target/surefire-reports">
185-
<fileset dir="target/surefire-reports">
186-
<include name="**/*.xml" />
187-
</fileset>
188-
<report format="noframes" todir="target/surefire-reports" />
189-
</junitreport>
190-
</tasks>
191-
</configuration>
192-
<goals>
193-
<goal>run</goal>
194-
</goals>
195-
</execution>
196-
</executions>
197-
<dependencies>
198-
<dependency>
199-
<groupId>org.apache.ant</groupId>
200-
<artifactId>ant-junit</artifactId>
201-
<version>1.8.0</version>
202-
</dependency>
203-
<dependency>
204-
<groupId>org.apache.ant</groupId>
205-
<artifactId>ant-trax</artifactId>
206-
<version>1.8.0</version>
207-
</dependency>
208-
</dependencies>
209-
</plugin>
210-
<plugin>
211-
<groupId>org.apache.maven.plugins</groupId>
212-
<artifactId>maven-surefire-plugin</artifactId>
213-
<version>2.5</version>
214-
<configuration>
215-
<argLine>-Duser.timezone=UTC -XX:MaxPermSize=1024m -Xmx1024m</argLine>
216-
<skipTests>false</skipTests>
217-
<testFailureIgnore>true</testFailureIgnore>
218-
<forkMode>once</forkMode>
219-
<includes>
220-
<include>**/*Test.java</include>
221-
</includes>
222-
<useFile>false</useFile>
223-
</configuration>
224-
</plugin>
225-
<plugin>
226-
<groupId>org.apache.maven.plugins</groupId>
227-
<artifactId>maven-compiler-plugin</artifactId>
228-
<version>2.5.1</version>
229-
<configuration>
230-
<source>1.6</source>
231-
<target>1.6</target>
232-
</configuration>
233-
</plugin>
234-
<plugin>
235-
<groupId>org.apache.maven.plugins</groupId>
236-
<artifactId>maven-shade-plugin</artifactId>
237-
<version>2.3</version>
238-
<configuration>
239-
<outputFile>${project.build.directory}/${project.build.finalName}-${project.build.withDependencies}.jar</outputFile>
240-
<transformers>
241-
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
242-
<mainClass>org.buddycloud.channelserver.Main</mainClass>
243-
</transformer>
244-
</transformers>
245-
</configuration>
246-
<executions>
247-
<execution>
248-
<phase>package</phase>
249-
<goals>
250-
<goal>shade</goal>
251-
</goals>
252-
</execution>
253-
</executions>
254-
</plugin>
255-
<plugin>
256-
<groupId>org.apache.maven.plugins</groupId>
257-
<artifactId>maven-checkstyle-plugin</artifactId>
258-
<configuration>
259-
<failOnViolation>true</failOnViolation>
260-
<failsOnError>true</failsOnError>
261-
<encoding>UTF-8</encoding>
262-
<consoleOutput>false</consoleOutput>
263-
<linkXRef>false</linkXRef>
264-
<includes>**\/*.java</includes>
265-
<includeResources>false</includeResources>
266-
</configuration>
267-
<version>${maven.checkstyle.plugin.version}</version>
268-
<executions>
269-
<execution>
270-
<id>validate</id>
271-
<phase>validate</phase>
272-
<goals>
273-
<goal>check</goal>
274-
</goals>
275-
</execution>
276-
</executions>
277-
</plugin>
278-
<plugin>
279-
<groupId>org.codehaus.mojo</groupId>
280-
<artifactId>cobertura-maven-plugin</artifactId>
281-
<version>2.6</version>
282-
</plugin>
283-
<plugin>
284-
<groupId>org.eluder.coveralls</groupId>
285-
<artifactId>coveralls-maven-plugin</artifactId>
286-
<version>2.2.0</version>
287-
<configuration>
288-
<format>xml</format>
289-
<maxmem>256m</maxmem>
290-
<aggregate>true</aggregate>
291-
<sourceEncoding>UTF-8</sourceEncoding>
292-
<serviceName>travis-ci</serviceName>
293-
</configuration>
294-
</plugin>
295-
</plugins>
296-
</pluginManagement>
174+
<plugins>
175+
<plugin>
176+
<!-- Extended Maven antrun plugin -->
177+
<!-- https://maven-antrun-extended-plugin.dev.java.net/ -->
178+
<groupId>org.jvnet.maven-antrun-extended-plugin</groupId>
179+
<artifactId>maven-antrun-extended-plugin</artifactId>
180+
<executions>
181+
<execution>
182+
<id>test-reports</id>
183+
<phase>test</phase>
184+
<configuration>
185+
<tasks unless="maven.test.skip">
186+
<junitreport todir="target/surefire-reports">
187+
<fileset dir="target/surefire-reports">
188+
<include name="**/*.xml" />
189+
</fileset>
190+
<report format="noframes" todir="target/surefire-reports" />
191+
</junitreport>
192+
</tasks>
193+
</configuration>
194+
<goals>
195+
<goal>run</goal>
196+
</goals>
197+
</execution>
198+
</executions>
199+
<dependencies>
200+
<dependency>
201+
<groupId>org.apache.ant</groupId>
202+
<artifactId>ant-junit</artifactId>
203+
<version>1.8.0</version>
204+
</dependency>
205+
<dependency>
206+
<groupId>org.apache.ant</groupId>
207+
<artifactId>ant-trax</artifactId>
208+
<version>1.8.0</version>
209+
</dependency>
210+
</dependencies>
211+
</plugin>
212+
<plugin>
213+
<groupId>org.apache.maven.plugins</groupId>
214+
<artifactId>maven-surefire-plugin</artifactId>
215+
<version>${surefire.reportplugin.version}</version>
216+
<configuration>
217+
<argLine>-Duser.timezone=UTC -XX:MaxPermSize=1024m -Xmx1024m</argLine>
218+
<skipTests>false</skipTests>
219+
<testFailureIgnore>true</testFailureIgnore>
220+
<forkMode>once</forkMode>
221+
<includes>
222+
<include>**/*Test.java</include>
223+
</includes>
224+
<useFile>false</useFile>
225+
</configuration>
226+
</plugin>
227+
<plugin>
228+
<groupId>org.apache.maven.plugins</groupId>
229+
<artifactId>maven-compiler-plugin</artifactId>
230+
<version>2.5.1</version>
231+
<configuration>
232+
<source>1.6</source>
233+
<target>1.6</target>
234+
</configuration>
235+
</plugin>
236+
<plugin>
237+
<groupId>org.apache.maven.plugins</groupId>
238+
<artifactId>maven-shade-plugin</artifactId>
239+
<version>2.3</version>
240+
<configuration>
241+
<outputFile>${project.build.directory}/${project.build.finalName}-${project.build.withDependencies}.jar</outputFile>
242+
<transformers>
243+
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
244+
<mainClass>org.buddycloud.channelserver.Main</mainClass>
245+
</transformer>
246+
</transformers>
247+
</configuration>
248+
<executions>
249+
<execution>
250+
<phase>package</phase>
251+
<goals>
252+
<goal>shade</goal>
253+
</goals>
254+
</execution>
255+
</executions>
256+
</plugin>
257+
<plugin>
258+
<groupId>org.apache.maven.plugins</groupId>
259+
<artifactId>maven-checkstyle-plugin</artifactId>
260+
<version>${checkstyle.version}</version>
261+
<configuration>
262+
<!-- Set the property samedir so that the suppression file can be resolved by both maven and eclipse-cs -->
263+
<propertyExpansion>samedir=${basedir}/src/main/resources</propertyExpansion>
264+
<failOnViolation>true</failOnViolation>
265+
<failOnError>true</failOnError>
266+
<encoding>UTF-8</encoding>
267+
<consoleOutput>false</consoleOutput>
268+
<linkXRef>false</linkXRef>
269+
<includes>**\/*.java</includes>
270+
<includeResources>false</includeResources>
271+
</configuration>
272+
<executions>
273+
<execution>
274+
<id>validate</id>
275+
<phase>validate</phase>
276+
<goals>
277+
<goal>check</goal>
278+
</goals>
279+
</execution>
280+
</executions>
281+
</plugin>
282+
<plugin>
283+
<groupId>org.codehaus.mojo</groupId>
284+
<artifactId>cobertura-maven-plugin</artifactId>
285+
<version>2.6</version>
286+
</plugin>
287+
<plugin>
288+
<groupId>org.eluder.coveralls</groupId>
289+
<artifactId>coveralls-maven-plugin</artifactId>
290+
<version>2.2.0</version>
291+
<configuration>
292+
<format>xml</format>
293+
<maxmem>256m</maxmem>
294+
<aggregate>true</aggregate>
295+
<sourceEncoding>UTF-8</sourceEncoding>
296+
<serviceName>travis-ci</serviceName>
297+
</configuration>
298+
</plugin>
299+
<plugin>
300+
<groupId>org.codehaus.mojo</groupId>
301+
<artifactId>findbugs-maven-plugin</artifactId>
302+
<version>2.5.5</version>
303+
<configuration>
304+
<effort>Max</effort>
305+
<xmlOutput>true</xmlOutput>
306+
<failOnError>false</failOnError>
307+
</configuration>
308+
<executions>
309+
<execution>
310+
<phase>verify</phase>
311+
<goals>
312+
<goal>check</goal>
313+
</goals>
314+
</execution>
315+
</executions>
316+
</plugin>
317+
</plugins>
297318
</build>
298319

299320
<reporting>
300321
<plugins>
322+
<plugin>
323+
<groupId>org.codehaus.mojo</groupId>
324+
<artifactId>findbugs-maven-plugin</artifactId>
325+
<version>${findbugs.version}</version>
326+
<configuration>
327+
<effort>Max</effort>
328+
</configuration>
329+
</plugin>
330+
<plugin>
331+
<groupId>org.apache.maven.plugins</groupId>
332+
<artifactId>maven-checkstyle-plugin</artifactId>
333+
<version>${checkstyle.version}</version>
334+
<configuration>
335+
<!-- Set the property samedir so that the suppression file can be resolved by both maven and eclipse-cs -->
336+
<propertyExpansion>samedir=${basedir}/src/main/resources</propertyExpansion>
337+
</configuration>
338+
</plugin>
339+
<plugin>
340+
<groupId>org.apache.maven.plugins</groupId>
341+
<artifactId>maven-surefire-report-plugin</artifactId>
342+
<version>${surefire.reportplugin.version}</version>
343+
</plugin>
301344
<plugin>
302345
<groupId>org.codehaus.mojo</groupId>
303346
<artifactId>cobertura-maven-plugin</artifactId>
304-
<version>2.6</version>
347+
<version>${cobertura.version}</version>
305348
<configuration>
306349
<formats>
307-
<format>html</format>
308350
<format>xml</format>
351+
<format>html</format>
309352
</formats>
310353
</configuration>
311354
</plugin>

src/main/java/org/buddycloud/channelserver/TopicsComponent.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public class TopicsComponent {
1414

1515
public TopicsComponent(Configuration configuration, String domain) {
1616
hostname = configuration.getXmppHost();
17-
socket = Integer.valueOf(configuration.getComponentPort());
17+
socket = Integer.parseInt(configuration.getComponentPort());
1818
this.domain = domain;
1919
password = configuration.getProperty("xmpp.secretkey");
2020
topicsEngine = new TopicsEngine(configuration);

src/main/java/org/buddycloud/channelserver/XmppComponent.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public class XmppComponent {
1616

1717
public XmppComponent(Configuration configuration, String domain) throws ProxoolException {
1818
hostname = configuration.getXmppHost();
19-
socket = Integer.valueOf(configuration.getComponentPort());
19+
socket = Integer.parseInt(configuration.getComponentPort());
2020
this.domain = domain;
2121
password = configuration.getProperty("xmpp.secretkey");
2222
channelsEngine = new ChannelsEngine(configuration);

src/main/java/org/buddycloud/channelserver/channel/node/configuration/field/CreationDate.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ public class CreationDate extends DateField {
99
public static final String FIELD_NAME = "pubsub#creation_date";
1010
public static final String DEFAULT_VALUE = "1955-11-05T01:21:00Z";
1111

12-
public static Logger logger = Logger.getLogger(CreationDate.class);
12+
public static final Logger LOGGER = Logger.getLogger(CreationDate.class);
1313

1414
public CreationDate() {
1515
setValue(Conf.formatDate(new Date()));
@@ -23,7 +23,7 @@ public boolean isValid() {
2323
setValue(Conf.formatDate(parsed));
2424
return true;
2525
} catch (IllegalArgumentException e) {
26-
logger.error(e);
26+
LOGGER.error(e);
2727
return false;
2828
}
2929
}

0 commit comments

Comments
 (0)