code formatting

This commit is contained in:
Athou
2013-08-01 11:17:45 +02:00
parent 8df587aaad
commit 0ff1d58dfb
6 changed files with 11 additions and 13 deletions

View File

@@ -21,7 +21,7 @@ public class FeedEntryContent extends AbstractModel {
@Column(length = 2048)
private String title;
@Column(length = 40)
private String titleHash;

View File

@@ -8,7 +8,7 @@ import com.sun.syndication.feed.synd.impl.ConverterForRSS090;
/**
* Support description tag for RSS09
*
*
*/
public class RSS090DescriptionConverter extends ConverterForRSS090 {

View File

@@ -8,7 +8,7 @@ import com.sun.syndication.io.impl.RSS090Parser;
/**
* Support description tag for RSS09
*
*
*/
public class RSS090DescriptionParser extends RSS090Parser {

View File

@@ -18,11 +18,11 @@ public class FeedEntryContentService {
* this is NOT thread-safe
*/
public FeedEntryContent findOrCreate(FeedEntryContent content, String baseUrl) {
String contentHash = DigestUtils.sha1Hex(StringUtils.trimToEmpty(content.getContent()));
String titleHash = DigestUtils.sha1Hex(StringUtils.trimToEmpty(content.getTitle()));
Long existingId = feedEntryContentDAO.findExisting(contentHash, titleHash);
FeedEntryContent result = null;
if (existingId == null) {
content.setContentHash(contentHash);

View File

@@ -21,14 +21,12 @@ public class PasswordEncryptionService implements Serializable {
private static final Logger log = LoggerFactory.getLogger(UserDAO.class);
public boolean authenticate(String attemptedPassword,
byte[] encryptedPassword, byte[] salt) {
public boolean authenticate(String attemptedPassword, byte[] encryptedPassword, byte[] salt) {
// Encrypt the clear-text password using the same salt that was used to
// encrypt the original password
byte[] encryptedAttemptedPassword = null;
try {
encryptedAttemptedPassword = getEncryptedPassword(
attemptedPassword, salt);
encryptedAttemptedPassword = getEncryptedPassword(attemptedPassword, salt);
} catch (Exception e) {
// should never happen
log.error(e.getMessage(), e);

View File

@@ -88,18 +88,18 @@ public class PubSubHubbubCallbackREST {
@POST
@Consumes({ MediaType.APPLICATION_ATOM_XML, "application/rss+xml" })
public Response callback() {
if (!applicationSettingsService.get().isPubsubhubbub()) {
return Response.status(Status.FORBIDDEN).entity("pubsubhubbub is disabled").build();
}
try {
byte[] bytes = IOUtils.toByteArray(request.getInputStream());
if (ArrayUtils.isEmpty(bytes)) {
return Response.status(Status.BAD_REQUEST).entity("empty body received").build();
}
FetchedFeed fetchedFeed = parser.parse(null, bytes);
String topic = fetchedFeed.getFeed().getPushTopic();
if (StringUtils.isBlank(topic)) {