Github user revans2 commented on a diff in the pull request:
https://github.com/apache/storm/pull/1043#discussion_r50896874
--- Diff: storm-core/src/jvm/org/apache/storm/utils/Utils.java ---
@@ -1382,5 +1422,438 @@ public static TopologyInfo getTopologyInfo(String
name, String asUser, Map storm
public static int toPositive(int number) {
return number & Integer.MAX_VALUE;
}
-}
+
+
+ //Everything from here on is translated from the old util.clj
(storm-core/src/clj/backtype.storm/util.clj)
+
+ //Wraps an exception in a RuntimeException if needed
+ public static Exception wrapInRuntime (Exception e) {
+ if (e instanceof RuntimeException) {
+ return e;
+ } else {
+ return (new RuntimeException(e));
+ }
+ }
+
+ public static final boolean isOnWindows =
"Windows_NT".equals(System.getenv("OS"));
+
+ public static final String filePathSeparator =
System.getProperty("file.separator");
+
+ public static final String classPathSeparator =
System.getProperty("path.separator");
--- End diff --
On these please follow the java naming convetions for static final values
`IS_ON_WINDOWS`, `FILE_PATH_SEPARATOR`, and `CLASS_PATH_SEPARATOR`.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---