Merge pull request #379 from jroper/patch-1
Fixing #378, bug in DefaultCookie equals and compareTo
This commit is contained in:
commit
26307cbc3e
@ -273,7 +273,7 @@ public class DefaultCookie implements Cookie {
|
|||||||
|
|
||||||
if (getPath() == null && that.getPath() != null) {
|
if (getPath() == null && that.getPath() != null) {
|
||||||
return false;
|
return false;
|
||||||
} else if (that.getPath() == null) {
|
} else if (that.getPath() == null && getPath() != null) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (!getPath().equals(that.getPath())) {
|
if (!getPath().equals(that.getPath())) {
|
||||||
@ -282,7 +282,7 @@ public class DefaultCookie implements Cookie {
|
|||||||
|
|
||||||
if (getDomain() == null && that.getDomain() != null) {
|
if (getDomain() == null && that.getDomain() != null) {
|
||||||
return false;
|
return false;
|
||||||
} else if (that.getDomain() == null) {
|
} else if (that.getDomain() == null && getDomain() != null) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return getDomain().equalsIgnoreCase(that.getDomain());
|
return getDomain().equalsIgnoreCase(that.getDomain());
|
||||||
@ -298,7 +298,7 @@ public class DefaultCookie implements Cookie {
|
|||||||
|
|
||||||
if (getPath() == null && c.getPath() != null) {
|
if (getPath() == null && c.getPath() != null) {
|
||||||
return -1;
|
return -1;
|
||||||
} else if (c.getPath() == null) {
|
} else if (c.getPath() == null && getPath() != null) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
v = getPath().compareTo(c.getPath());
|
v = getPath().compareTo(c.getPath());
|
||||||
@ -308,7 +308,7 @@ public class DefaultCookie implements Cookie {
|
|||||||
|
|
||||||
if (getDomain() == null && c.getDomain() != null) {
|
if (getDomain() == null && c.getDomain() != null) {
|
||||||
return -1;
|
return -1;
|
||||||
} else if (c.getDomain() == null) {
|
} else if (c.getDomain() == null && getDomain() != null) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
v = getDomain().compareToIgnoreCase(c.getDomain());
|
v = getDomain().compareToIgnoreCase(c.getDomain());
|
||||||
|
Loading…
Reference in New Issue
Block a user