diff --git a/src/main/java/com/sun/syndication/feed/atom/Feed.java b/src/main/java/com/sun/syndication/feed/atom/Feed.java
index 6803bda..ccb8792 100644
--- a/src/main/java/com/sun/syndication/feed/atom/Feed.java
+++ b/src/main/java/com/sun/syndication/feed/atom/Feed.java
@@ -156,7 +156,10 @@ public class Feed extends WireFeed {
* list if none.
*/
public List getAlternateLinks() {
- return alternateLinks == null ? (alternateLinks = new ArrayList()) : alternateLinks;
+ if (alternateLinks == null) {
+ alternateLinks = new ArrayList();
+ }
+ return alternateLinks;
}
/**
@@ -178,7 +181,10 @@ public class Feed extends WireFeed {
* ones), an empty list if none.
*/
public List getOtherLinks() {
- return otherLinks == null ? (otherLinks = new ArrayList()) : otherLinks;
+ if (otherLinks == null) {
+ otherLinks = new ArrayList();
+ }
+ return otherLinks;
}
/**
@@ -381,7 +387,10 @@ public class Feed extends WireFeed {
*
*/
public List getEntries() {
- return entries == null ? (entries = new ArrayList()) : entries;
+ if (entries == null) {
+ entries = new ArrayList();
+ }
+ return entries;
}
/**
@@ -406,7 +415,10 @@ public class Feed extends WireFeed {
*/
@Override
public List getModules() {
- return modules == null ? (modules = new ArrayList()) : modules;
+ if (modules == null) {
+ modules = new ArrayList();
+ }
+ return modules;
}
/**
@@ -442,7 +454,10 @@ public class Feed extends WireFeed {
* @since Atom 1.0
*/
public List getCategories() {
- return categories == null ? (categories = new ArrayList()) : categories;
+ if (categories == null) {
+ categories = new ArrayList();
+ }
+ return categories;
}
/**
diff --git a/src/main/java/com/sun/syndication/feed/impl/ToStringBean.java b/src/main/java/com/sun/syndication/feed/impl/ToStringBean.java
index 3a99120..3dad8e8 100644
--- a/src/main/java/com/sun/syndication/feed/impl/ToStringBean.java
+++ b/src/main/java/com/sun/syndication/feed/impl/ToStringBean.java
@@ -190,7 +190,12 @@ public class ToStringBean implements Serializable {
tsInfo[0] = ePrefix;
final Stack stack = PREFIX_TL.get();
stack.push(tsInfo);
- final String s = eValue != null ? eValue.toString() : "null";
+ final String s;
+ if (eValue == null) {
+ s = "null";
+ } else {
+ s = eValue.toString();
+ }
stack.pop();
if (tsInfo[1] == null) {
sb.append(ePrefix).append("=").append(s).append("\n");
@@ -216,7 +221,12 @@ public class ToStringBean implements Serializable {
tsInfo[0] = cPrefix;
final Stack stack = PREFIX_TL.get();
stack.push(tsInfo);
- final String s = cValue != null ? cValue.toString() : "null";
+ final String s;
+ if (cValue == null) {
+ s = "null";
+ } else {
+ s = cValue.toString();
+ }
stack.pop();
if (tsInfo[1] == null) {
sb.append(cPrefix).append("=").append(s).append("\n");