commit | f9f74f34a195d12e7b2ad1f1de05430eb0a9eb19 | [log] [tgz] |
---|---|---|
author | Alex Ruiz <alruiz@google.com> | Fri Mar 09 10:25:50 2012 -0800 |
committer | Alex Ruiz <alruiz@google.com> | Fri Mar 09 10:25:50 2012 -0800 |
tree | 87ebb9d67b740618196b72a180db3a33d5abdecf | |
parent | c7943065ff76bb7783c4951f4e7290ca1073dd2c [diff] |
Minor code cleanup.
diff --git a/com.google.eclipse.protobuf.ui/src/com/google/eclipse/protobuf/ui/ProtobufUiModule.java b/com.google.eclipse.protobuf.ui/src/com/google/eclipse/protobuf/ui/ProtobufUiModule.java index 0edc76c..ddbcb3d 100644 --- a/com.google.eclipse.protobuf.ui/src/com/google/eclipse/protobuf/ui/ProtobufUiModule.java +++ b/com.google.eclipse.protobuf.ui/src/com/google/eclipse/protobuf/ui/ProtobufUiModule.java
@@ -51,7 +51,7 @@ import org.eclipse.xtext.ui.validation.IResourceUIValidatorExtension; /** - * Use this class to register components to be used within the IDE. + * Registers components to be used within the IDE. * * @author alruiz@google.com (Alex Ruiz) */
diff --git a/com.google.eclipse.protobuf.ui/src/com/google/eclipse/protobuf/ui/exception/CoreExceptions.java b/com.google.eclipse.protobuf.ui/src/com/google/eclipse/protobuf/ui/exception/CoreExceptions.java index 2279609..2c7f03d 100644 --- a/com.google.eclipse.protobuf.ui/src/com/google/eclipse/protobuf/ui/exception/CoreExceptions.java +++ b/com.google.eclipse.protobuf.ui/src/com/google/eclipse/protobuf/ui/exception/CoreExceptions.java
@@ -8,6 +8,7 @@ */ package com.google.eclipse.protobuf.ui.exception; +import static com.google.common.base.Strings.nullToEmpty; import static com.google.eclipse.protobuf.ui.ProtobufUiModule.PLUGIN_ID; import static org.eclipse.core.runtime.IStatus.ERROR; @@ -20,10 +21,7 @@ */ public final class CoreExceptions { public static CoreException error(Throwable cause) { - String message = cause.getMessage(); - if (message == null) { - message = ""; - } + String message = nullToEmpty(cause.getMessage()); return new CoreException(new Status(ERROR, PLUGIN_ID, message, cause)); }