Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Vogel2020-01-13 09:04:13 +0000
committerLars Vogel2020-01-15 08:01:37 +0000
commit0f8b5e41ffe3876da2ebb4d7c5f9a2bb8c06575d (patch)
tree700d86d553962f9d07001d8f2c76d58e63f22df4
parentf507de2caa5fc0f7af734badf4b42cec6f246f2f (diff)
downloadeclipse.platform.ua-0f8b5e41ffe3876da2ebb4d7c5f9a2bb8c06575d.tar.gz
eclipse.platform.ua-0f8b5e41ffe3876da2ebb4d7c5f9a2bb8c06575d.tar.xz
eclipse.platform.ua-0f8b5e41ffe3876da2ebb4d7c5f9a2bb8c06575d.zip
Use System.lineSeparator()
Benefit of this way rather than System.getProperty("line.separator") is that there are no security checks. Change-Id: Id647195dc018313e2347947e0f33151529684f33 Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/browser/BrowserLog.java2
-rw-r--r--org.eclipse.help.base/src_demo/org/apache/lucene/demo/html/HTMLParser.java2
2 files changed, 2 insertions, 2 deletions
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/browser/BrowserLog.java b/org.eclipse.help.base/src/org/eclipse/help/internal/browser/BrowserLog.java
index d14074ccd..87aa36316 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/browser/BrowserLog.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/browser/BrowserLog.java
@@ -33,7 +33,7 @@ public class BrowserLog {
private String logFileName;
private boolean newSession;
DateFormat formatter = new SimpleDateFormat("MMM dd, yyyy kk:mm:ss.SS"); //$NON-NLS-1$
- String LN = System.getProperty("line.separator"); //$NON-NLS-1$
+ String LN = System.lineSeparator();
/**
* Constructor
*/
diff --git a/org.eclipse.help.base/src_demo/org/apache/lucene/demo/html/HTMLParser.java b/org.eclipse.help.base/src_demo/org/apache/lucene/demo/html/HTMLParser.java
index 344c97fcd..efcd4c279 100644
--- a/org.eclipse.help.base/src_demo/org/apache/lucene/demo/html/HTMLParser.java
+++ b/org.eclipse.help.base/src_demo/org/apache/lucene/demo/html/HTMLParser.java
@@ -51,7 +51,7 @@ public class HTMLParser implements HTMLParserConstants {
boolean inIgnoredTag = true;
boolean afterTag = false;
boolean afterSpace = false;
- String eol = System.getProperty("line.separator"); //$NON-NLS-1$
+ String eol = System.lineSeparator();
private LimitedSizeCharArrayWriter writer = new LimitedSizeCharArrayWriter(1000000);
private Exception exception = null;

Back to the top