Skip to content

Commit

Permalink
Fix Line-Endings for existing files
Browse files Browse the repository at this point in the history
Result of running `git add --renormalize .`
  • Loading branch information
apinske committed Jun 19, 2021
1 parent 784c7bc commit a431527
Show file tree
Hide file tree
Showing 86 changed files with 7,013 additions and 7,013 deletions.
476 changes: 238 additions & 238 deletions .gitignore

Large diffs are not rendered by default.

68 changes: 34 additions & 34 deletions greenmail-core/src/main/java/com/icegreen/greenmail/Managers.java
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
/*
* Copyright (c) 2014 Wael Chatila / Icegreen Technologies. All Rights Reserved.
* This software is released under the Apache license 2.0
*/
package com.icegreen.greenmail;

import com.icegreen.greenmail.imap.ImapHostManager;
import com.icegreen.greenmail.imap.ImapHostManagerImpl;
import com.icegreen.greenmail.smtp.SmtpManager;
import com.icegreen.greenmail.store.InMemoryStore;
import com.icegreen.greenmail.user.UserManager;

/**
* @author Wael Chatila
* @version $Id: $
* @since Jan 27, 2006
*/
public class Managers {
private ImapHostManager imapHostManager = new ImapHostManagerImpl(new InMemoryStore());
private UserManager userManager = new UserManager(imapHostManager);
private SmtpManager smtpManager = new SmtpManager(imapHostManager, userManager);

public SmtpManager getSmtpManager() {
return smtpManager;
}

public UserManager getUserManager() {
return userManager;
}

public ImapHostManager getImapHostManager() {
return imapHostManager;
}
}
/*
* Copyright (c) 2014 Wael Chatila / Icegreen Technologies. All Rights Reserved.
* This software is released under the Apache license 2.0
*/
package com.icegreen.greenmail;

import com.icegreen.greenmail.imap.ImapHostManager;
import com.icegreen.greenmail.imap.ImapHostManagerImpl;
import com.icegreen.greenmail.smtp.SmtpManager;
import com.icegreen.greenmail.store.InMemoryStore;
import com.icegreen.greenmail.user.UserManager;

/**
* @author Wael Chatila
* @version $Id: $
* @since Jan 27, 2006
*/
public class Managers {
private ImapHostManager imapHostManager = new ImapHostManagerImpl(new InMemoryStore());
private UserManager userManager = new UserManager(imapHostManager);
private SmtpManager smtpManager = new SmtpManager(imapHostManager, userManager);

public SmtpManager getSmtpManager() {
return smtpManager;
}

public UserManager getUserManager() {
return userManager;
}

public ImapHostManager getImapHostManager() {
return imapHostManager;
}
}
Original file line number Diff line number Diff line change
@@ -1,52 +1,52 @@
/*
* Copyright (c) 2014 Wael Chatila / Icegreen Technologies. All Rights Reserved.
* This software is released under the Apache license 2.0
* This file has been used and modified.
* Original file can be found on http://foedus.sourceforge.net
*/
package com.icegreen.greenmail.foedus.util;


import java.util.regex.Matcher;
import java.util.regex.Pattern;


public class MsgRangeFilter {
static final Pattern TWO_PART = Pattern.compile("(\\d+|\\*):(\\d+|\\*)");
int top;
int bottom;
boolean isUid;

public MsgRangeFilter(String rng, boolean uid) {
if (rng.indexOf(':') == -1) {
int value = Integer.parseInt(rng);
top = value;
bottom = value;
} else {
Matcher mat = TWO_PART.matcher(rng);
if(mat.matches() &&mat.groupCount() == 2) {
String botGroup = mat.group(1);
String topGroup = mat.group(2);
if ("*".equals(botGroup)) {
bottom = 0;
} else {
bottom = Integer.parseInt(botGroup);
}

if ("*".equals(topGroup)) {
top = Integer.MAX_VALUE;
} else {
top = Integer.parseInt(topGroup);
}
} else {
throw new IllegalStateException("Can not create range filter from "+rng+", uid="+uid);
}
}

isUid = uid;
}

public boolean includes(int seq) {
return seq >= bottom && seq <= top;
}
/*
* Copyright (c) 2014 Wael Chatila / Icegreen Technologies. All Rights Reserved.
* This software is released under the Apache license 2.0
* This file has been used and modified.
* Original file can be found on http://foedus.sourceforge.net
*/
package com.icegreen.greenmail.foedus.util;


import java.util.regex.Matcher;
import java.util.regex.Pattern;


public class MsgRangeFilter {
static final Pattern TWO_PART = Pattern.compile("(\\d+|\\*):(\\d+|\\*)");
int top;
int bottom;
boolean isUid;

public MsgRangeFilter(String rng, boolean uid) {
if (rng.indexOf(':') == -1) {
int value = Integer.parseInt(rng);
top = value;
bottom = value;
} else {
Matcher mat = TWO_PART.matcher(rng);
if(mat.matches() &&mat.groupCount() == 2) {
String botGroup = mat.group(1);
String topGroup = mat.group(2);
if ("*".equals(botGroup)) {
bottom = 0;
} else {
bottom = Integer.parseInt(botGroup);
}

if ("*".equals(topGroup)) {
top = Integer.MAX_VALUE;
} else {
top = Integer.parseInt(topGroup);
}
} else {
throw new IllegalStateException("Can not create range filter from "+rng+", uid="+uid);
}
}

isUid = uid;
}

public boolean includes(int seq) {
return seq >= bottom && seq <= top;
}
}
Loading

0 comments on commit a431527

Please sign in to comment.