Skip to content

I20201111-1800

@carstenartur carstenartur tagged this 10 Nov 15:52
in org.eclipse.pde.internal.ui.nls.NLSFragmentGenerator$4.visit(File)

The code here uses File.separator where a regular expression is
required. This will fail on Windows platforms, where the File.separator
is a backslash, which is interpreted in a regular expression as an
escape character. Among other options, you can just use
File.separatorChar=='\\' ? "\\\\" : File.separator instead of
File.separator

Rank: Scary (5), confidence: High
Pattern: RE_CANT_USE_FILE_SEPARATOR_AS_REGULAR_EXPRESSION
Type: RE, Category: CORRECTNESS (Correctness)


Change-Id: Ia83adb31adb1c165231f7d3580f6fb90ed8d1bd0
Signed-off-by: Carsten Hammer <carsten.hammer@t-online.de>
Assets 2
Loading