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)); }