Prepare codebase to adhere to Checkstyle rules

Issue gh-393
This commit is contained in:
Vedran Pavic
2016-03-05 20:27:06 +01:00
committed by Rob Winch
parent 9e3bcafa75
commit 7f3302253b
222 changed files with 4071 additions and 3556 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2015 the original author or authors.
* Copyright 2014-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package sample.data;
import java.util.Calendar;
@@ -29,7 +30,8 @@ public class ActiveWebSocketUser {
private Calendar connectionTime;
public ActiveWebSocketUser() {}
public ActiveWebSocketUser() {
}
public ActiveWebSocketUser(String id, String username, Calendar connectionTime) {
super();
@@ -39,7 +41,7 @@ public class ActiveWebSocketUser {
}
public String getUsername() {
return username;
return this.username;
}
public void setUsername(String username) {
@@ -47,7 +49,7 @@ public class ActiveWebSocketUser {
}
public Calendar getConnectionTime() {
return connectionTime;
return this.connectionTime;
}
public void setConnectionTime(Calendar connectionTime) {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2015 the original author or authors.
* Copyright 2014-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package sample.data;
import java.util.List;
@@ -20,7 +21,7 @@ import java.util.List;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
public interface ActiveWebSocketUserRepository extends CrudRepository<ActiveWebSocketUser,String> {
public interface ActiveWebSocketUserRepository extends CrudRepository<ActiveWebSocketUser, String> {
@Query("select DISTINCT(u.username) from ActiveWebSocketUser u where u.username != ?#{principal?.username}")
List<String> findAllActiveUsers();

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2015 the original author or authors.
* Copyright 2014-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package sample.data;
import java.util.Calendar;
@@ -27,7 +28,7 @@ public class InstantMessage {
private Calendar created = Calendar.getInstance();
public String getTo() {
return to;
return this.to;
}
public void setTo(String to) {
@@ -35,7 +36,7 @@ public class InstantMessage {
}
public String getFrom() {
return from;
return this.from;
}
public void setFrom(String from) {
@@ -43,7 +44,7 @@ public class InstantMessage {
}
public String getMessage() {
return message;
return this.message;
}
public void setMessage(String message) {
@@ -51,7 +52,7 @@ public class InstantMessage {
}
public Calendar getCreated() {
return created;
return this.created;
}
public void setCreated(Calendar created) {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2015 the original author or authors.
* Copyright 2014-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package sample.data;
import java.io.Serializable;
@@ -25,6 +26,7 @@ import javax.persistence.Id;
import org.hibernate.validator.constraints.Email;
import org.hibernate.validator.constraints.NotEmpty;
import org.springframework.security.crypto.password.PasswordEncoder;
/**
@@ -52,13 +54,14 @@ public class User implements Serializable {
@Email(message = "Please provide a valid email address.")
@NotEmpty(message = "Email is required.")
@Column(unique=true, nullable = false)
@Column(unique = true, nullable = false)
private String email;
@NotEmpty(message = "Password is required.")
private String password;
public User() {}
public User() {
}
public User(User user) {
this.id = user.id;
@@ -69,7 +72,7 @@ public class User implements Serializable {
}
public String getPassword() {
return password;
return this.password;
}
public void setPassword(String password) {
@@ -77,7 +80,7 @@ public class User implements Serializable {
}
public Long getId() {
return id;
return this.id;
}
public void setId(Long id) {
@@ -85,7 +88,7 @@ public class User implements Serializable {
}
public String getFirstName() {
return firstName;
return this.firstName;
}
public void setFirstName(String firstName) {
@@ -93,7 +96,7 @@ public class User implements Serializable {
}
public String getLastName() {
return lastName;
return this.lastName;
}
public void setLastName(String lastName) {
@@ -101,7 +104,7 @@ public class User implements Serializable {
}
public String getEmail() {
return email;
return this.email;
}
public void setEmail(String email) {
@@ -109,4 +112,4 @@ public class User implements Serializable {
}
private static final long serialVersionUID = 2738859149330833739L;
}
}

View File

@@ -1,18 +1,19 @@
/*
* Copyright 2002-2015 the original author or authors.
* Copyright 2014-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package sample.data;
import org.springframework.data.repository.CrudRepository;