Small improvement to scripts loading.
Contributed by Sahar.
This commit is contained in:
@@ -115,7 +115,7 @@ public final class ScriptEngineManager implements IXmlReader
|
|||||||
}
|
}
|
||||||
if (excludeScript)
|
if (excludeScript)
|
||||||
{
|
{
|
||||||
_exclusions.add(fileName);
|
_exclusions.add(file.toUri().getPath());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -138,8 +138,8 @@ public final class ScriptEngineManager implements IXmlReader
|
|||||||
{
|
{
|
||||||
if (file.isFile())
|
if (file.isFile())
|
||||||
{
|
{
|
||||||
final String fileName = file.getName();
|
final String filePath = file.toURI().getPath();
|
||||||
if (fileName.endsWith(".java") && !_exclusions.contains(fileName))
|
if (filePath.endsWith(".java") && !_exclusions.contains(filePath))
|
||||||
{
|
{
|
||||||
files.add(file.toPath().toAbsolutePath());
|
files.add(file.toPath().toAbsolutePath());
|
||||||
}
|
}
|
||||||
|
@@ -116,7 +116,7 @@ public final class ScriptEngineManager implements IXmlReader
|
|||||||
}
|
}
|
||||||
if (excludeScript)
|
if (excludeScript)
|
||||||
{
|
{
|
||||||
_exclusions.add(fileName);
|
_exclusions.add(file.toUri().getPath());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -139,8 +139,8 @@ public final class ScriptEngineManager implements IXmlReader
|
|||||||
{
|
{
|
||||||
if (file.isFile())
|
if (file.isFile())
|
||||||
{
|
{
|
||||||
final String fileName = file.getName();
|
final String filePath = file.toURI().getPath();
|
||||||
if (fileName.endsWith(".java") && !_exclusions.contains(fileName))
|
if (filePath.endsWith(".java") && !_exclusions.contains(filePath))
|
||||||
{
|
{
|
||||||
files.add(file.toPath().toAbsolutePath());
|
files.add(file.toPath().toAbsolutePath());
|
||||||
}
|
}
|
||||||
|
@@ -116,7 +116,7 @@ public final class ScriptEngineManager implements IXmlReader
|
|||||||
}
|
}
|
||||||
if (excludeScript)
|
if (excludeScript)
|
||||||
{
|
{
|
||||||
_exclusions.add(fileName);
|
_exclusions.add(file.toUri().getPath());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -139,8 +139,8 @@ public final class ScriptEngineManager implements IXmlReader
|
|||||||
{
|
{
|
||||||
if (file.isFile())
|
if (file.isFile())
|
||||||
{
|
{
|
||||||
final String fileName = file.getName();
|
final String filePath = file.toURI().getPath();
|
||||||
if (fileName.endsWith(".java") && !_exclusions.contains(fileName))
|
if (filePath.endsWith(".java") && !_exclusions.contains(filePath))
|
||||||
{
|
{
|
||||||
files.add(file.toPath().toAbsolutePath());
|
files.add(file.toPath().toAbsolutePath());
|
||||||
}
|
}
|
||||||
|
@@ -116,7 +116,7 @@ public final class ScriptEngineManager implements IXmlReader
|
|||||||
}
|
}
|
||||||
if (excludeScript)
|
if (excludeScript)
|
||||||
{
|
{
|
||||||
_exclusions.add(fileName);
|
_exclusions.add(file.toUri().getPath());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -139,8 +139,8 @@ public final class ScriptEngineManager implements IXmlReader
|
|||||||
{
|
{
|
||||||
if (file.isFile())
|
if (file.isFile())
|
||||||
{
|
{
|
||||||
final String fileName = file.getName();
|
final String filePath = file.toURI().getPath();
|
||||||
if (fileName.endsWith(".java") && !_exclusions.contains(fileName))
|
if (filePath.endsWith(".java") && !_exclusions.contains(filePath))
|
||||||
{
|
{
|
||||||
files.add(file.toPath().toAbsolutePath());
|
files.add(file.toPath().toAbsolutePath());
|
||||||
}
|
}
|
||||||
|
@@ -116,7 +116,7 @@ public final class ScriptEngineManager implements IXmlReader
|
|||||||
}
|
}
|
||||||
if (excludeScript)
|
if (excludeScript)
|
||||||
{
|
{
|
||||||
_exclusions.add(fileName);
|
_exclusions.add(file.toUri().getPath());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -139,8 +139,8 @@ public final class ScriptEngineManager implements IXmlReader
|
|||||||
{
|
{
|
||||||
if (file.isFile())
|
if (file.isFile())
|
||||||
{
|
{
|
||||||
final String fileName = file.getName();
|
final String filePath = file.toURI().getPath();
|
||||||
if (fileName.endsWith(".java") && !_exclusions.contains(fileName))
|
if (filePath.endsWith(".java") && !_exclusions.contains(filePath))
|
||||||
{
|
{
|
||||||
files.add(file.toPath().toAbsolutePath());
|
files.add(file.toPath().toAbsolutePath());
|
||||||
}
|
}
|
||||||
|
@@ -116,7 +116,7 @@ public final class ScriptEngineManager implements IXmlReader
|
|||||||
}
|
}
|
||||||
if (excludeScript)
|
if (excludeScript)
|
||||||
{
|
{
|
||||||
_exclusions.add(fileName);
|
_exclusions.add(file.toUri().getPath());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -139,8 +139,8 @@ public final class ScriptEngineManager implements IXmlReader
|
|||||||
{
|
{
|
||||||
if (file.isFile())
|
if (file.isFile())
|
||||||
{
|
{
|
||||||
final String fileName = file.getName();
|
final String filePath = file.toURI().getPath();
|
||||||
if (fileName.endsWith(".java") && !_exclusions.contains(fileName))
|
if (filePath.endsWith(".java") && !_exclusions.contains(filePath))
|
||||||
{
|
{
|
||||||
files.add(file.toPath().toAbsolutePath());
|
files.add(file.toPath().toAbsolutePath());
|
||||||
}
|
}
|
||||||
|
@@ -116,7 +116,7 @@ public final class ScriptEngineManager implements IXmlReader
|
|||||||
}
|
}
|
||||||
if (excludeScript)
|
if (excludeScript)
|
||||||
{
|
{
|
||||||
_exclusions.add(fileName);
|
_exclusions.add(file.toUri().getPath());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -139,8 +139,8 @@ public final class ScriptEngineManager implements IXmlReader
|
|||||||
{
|
{
|
||||||
if (file.isFile())
|
if (file.isFile())
|
||||||
{
|
{
|
||||||
final String fileName = file.getName();
|
final String filePath = file.toURI().getPath();
|
||||||
if (fileName.endsWith(".java") && !_exclusions.contains(fileName))
|
if (filePath.endsWith(".java") && !_exclusions.contains(filePath))
|
||||||
{
|
{
|
||||||
files.add(file.toPath().toAbsolutePath());
|
files.add(file.toPath().toAbsolutePath());
|
||||||
}
|
}
|
||||||
|
@@ -113,7 +113,7 @@ public final class ScriptEngineManager implements IXmlReader
|
|||||||
}
|
}
|
||||||
if (excludeScript)
|
if (excludeScript)
|
||||||
{
|
{
|
||||||
_exclusions.add(fileName);
|
_exclusions.add(file.toUri().getPath());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -136,8 +136,8 @@ public final class ScriptEngineManager implements IXmlReader
|
|||||||
{
|
{
|
||||||
if (file.isFile())
|
if (file.isFile())
|
||||||
{
|
{
|
||||||
final String fileName = file.getName();
|
final String filePath = file.toURI().getPath();
|
||||||
if (fileName.endsWith(".java") && !_exclusions.contains(fileName))
|
if (filePath.endsWith(".java") && !_exclusions.contains(filePath))
|
||||||
{
|
{
|
||||||
files.add(file.toPath().toAbsolutePath());
|
files.add(file.toPath().toAbsolutePath());
|
||||||
}
|
}
|
||||||
|
@@ -116,7 +116,7 @@ public final class ScriptEngineManager implements IXmlReader
|
|||||||
}
|
}
|
||||||
if (excludeScript)
|
if (excludeScript)
|
||||||
{
|
{
|
||||||
_exclusions.add(fileName);
|
_exclusions.add(file.toUri().getPath());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -139,8 +139,8 @@ public final class ScriptEngineManager implements IXmlReader
|
|||||||
{
|
{
|
||||||
if (file.isFile())
|
if (file.isFile())
|
||||||
{
|
{
|
||||||
final String fileName = file.getName();
|
final String filePath = file.toURI().getPath();
|
||||||
if (fileName.endsWith(".java") && !_exclusions.contains(fileName))
|
if (filePath.endsWith(".java") && !_exclusions.contains(filePath))
|
||||||
{
|
{
|
||||||
files.add(file.toPath().toAbsolutePath());
|
files.add(file.toPath().toAbsolutePath());
|
||||||
}
|
}
|
||||||
|
@@ -116,7 +116,7 @@ public final class ScriptEngineManager implements IXmlReader
|
|||||||
}
|
}
|
||||||
if (excludeScript)
|
if (excludeScript)
|
||||||
{
|
{
|
||||||
_exclusions.add(fileName);
|
_exclusions.add(file.toUri().getPath());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -139,8 +139,8 @@ public final class ScriptEngineManager implements IXmlReader
|
|||||||
{
|
{
|
||||||
if (file.isFile())
|
if (file.isFile())
|
||||||
{
|
{
|
||||||
final String fileName = file.getName();
|
final String filePath = file.toURI().getPath();
|
||||||
if (fileName.endsWith(".java") && !_exclusions.contains(fileName))
|
if (filePath.endsWith(".java") && !_exclusions.contains(filePath))
|
||||||
{
|
{
|
||||||
files.add(file.toPath().toAbsolutePath());
|
files.add(file.toPath().toAbsolutePath());
|
||||||
}
|
}
|
||||||
|
@@ -116,7 +116,7 @@ public final class ScriptEngineManager implements IXmlReader
|
|||||||
}
|
}
|
||||||
if (excludeScript)
|
if (excludeScript)
|
||||||
{
|
{
|
||||||
_exclusions.add(fileName);
|
_exclusions.add(file.toUri().getPath());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -139,8 +139,8 @@ public final class ScriptEngineManager implements IXmlReader
|
|||||||
{
|
{
|
||||||
if (file.isFile())
|
if (file.isFile())
|
||||||
{
|
{
|
||||||
final String fileName = file.getName();
|
final String filePath = file.toURI().getPath();
|
||||||
if (fileName.endsWith(".java") && !_exclusions.contains(fileName))
|
if (filePath.endsWith(".java") && !_exclusions.contains(filePath))
|
||||||
{
|
{
|
||||||
files.add(file.toPath().toAbsolutePath());
|
files.add(file.toPath().toAbsolutePath());
|
||||||
}
|
}
|
||||||
|
@@ -116,7 +116,7 @@ public final class ScriptEngineManager implements IXmlReader
|
|||||||
}
|
}
|
||||||
if (excludeScript)
|
if (excludeScript)
|
||||||
{
|
{
|
||||||
_exclusions.add(fileName);
|
_exclusions.add(file.toUri().getPath());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -139,8 +139,8 @@ public final class ScriptEngineManager implements IXmlReader
|
|||||||
{
|
{
|
||||||
if (file.isFile())
|
if (file.isFile())
|
||||||
{
|
{
|
||||||
final String fileName = file.getName();
|
final String filePath = file.toURI().getPath();
|
||||||
if (fileName.endsWith(".java") && !_exclusions.contains(fileName))
|
if (filePath.endsWith(".java") && !_exclusions.contains(filePath))
|
||||||
{
|
{
|
||||||
files.add(file.toPath().toAbsolutePath());
|
files.add(file.toPath().toAbsolutePath());
|
||||||
}
|
}
|
||||||
|
@@ -116,7 +116,7 @@ public final class ScriptEngineManager implements IXmlReader
|
|||||||
}
|
}
|
||||||
if (excludeScript)
|
if (excludeScript)
|
||||||
{
|
{
|
||||||
_exclusions.add(fileName);
|
_exclusions.add(file.toUri().getPath());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -139,8 +139,8 @@ public final class ScriptEngineManager implements IXmlReader
|
|||||||
{
|
{
|
||||||
if (file.isFile())
|
if (file.isFile())
|
||||||
{
|
{
|
||||||
final String fileName = file.getName();
|
final String filePath = file.toURI().getPath();
|
||||||
if (fileName.endsWith(".java") && !_exclusions.contains(fileName))
|
if (filePath.endsWith(".java") && !_exclusions.contains(filePath))
|
||||||
{
|
{
|
||||||
files.add(file.toPath().toAbsolutePath());
|
files.add(file.toPath().toAbsolutePath());
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user