Skip to content

Commit

Permalink
better string comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
darkv committed Dec 12, 2012
1 parent 020de63 commit 4f493e3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,11 @@ public String contextComponentActionURL() {
public WOComponent menuItemSelected() {
WOComponent anActionResult = null;

if ((navigationItem().action() != null) && (navigationItem().action() != "")) {
if (!ERXStringUtilities.stringIsNullOrEmpty(navigationItem().action())) {
anActionResult = (WOComponent)valueForKeyPath(navigationItem().action());
} else if ((navigationItem().pageName() != null) && (navigationItem().pageName() != "")) {
} else if (!ERXStringUtilities.stringIsNullOrEmpty(navigationItem().pageName())) {
anActionResult = pageWithName(navigationItem().pageName());
} else if ((navigationItem().directActionName() != null) && (navigationItem().directActionName() != "")) {
} else if (!ERXStringUtilities.stringIsNullOrEmpty(navigationItem().directActionName())) {
// FIXME: Need to support directAction classes
if(_linkDirectlyToDirectActions) {
ERXDirectAction da = new ERXDirectAction(context().request());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ public static FOPBuilder newBuilder() {
}

public static FOPBuilder newBuilder(String outputType) throws Exception {
if (outputType == null || outputType == MimeConstants.MIME_PDF) {
if (MimeConstants.MIME_PDF.equals(outputType)) {
return new Fop2PdfImpl();
}

if ( outputType == MimeConstants.MIME_EPS) {
if (MimeConstants.MIME_EPS.equals(outputType)) {
return new Fop2EpsImpl();
}

Expand Down

0 comments on commit 4f493e3

Please sign in to comment.