Reverted to previous bug fix for Release

This commit is contained in:
Giancarlo Panichi 2021-02-01 15:55:56 +01:00
parent 5b2cbe08d7
commit 7b2af44b43
3 changed files with 29 additions and 30 deletions

View File

@ -11,7 +11,7 @@
</parent> </parent>
<groupId>org.gcube.dataanalysis</groupId> <groupId>org.gcube.dataanalysis</groupId>
<artifactId>ecological-engine</artifactId> <artifactId>ecological-engine</artifactId>
<version>1.14.1-SNAPSHOT</version> <version>1.14.0</version>
<name>ecological-engine</name> <name>ecological-engine</name>
<description>ecological-engine library</description> <description>ecological-engine library</description>
<scm> <scm>

View File

@ -42,22 +42,21 @@ public class Sha1 {
int len = filestring.length(); int len = filestring.length();
int counter = 0; int counter = 0;
String cacheDir = ""; String cacheDir = "";
//Bug // Bug
// //
//RE regex = new RE("[a-z]"); RE regex = new RE("[a-z]");
//for (int i = 0; i < len; i++)
//{
// String chars = "" + filestring.charAt(i);
// boolean optioned = regex.match(chars);
//Fix
Pattern p = Pattern.compile("[a-z]");
for (int i = 0; i < len; i++) { for (int i = 0; i < len; i++) {
String chars = "" + filestring.charAt(i); String chars = "" + filestring.charAt(i);
Matcher m = p.matcher(chars); boolean optioned = regex.match(chars);
boolean optioned = m.matches();
// Fix
// Pattern p = Pattern.compile("[a-z]");
//
// for (int i = 0; i < len; i++) {
// String chars = "" + filestring.charAt(i);
// Matcher m = p.matcher(chars);
// boolean optioned = m.matches();
if (optioned) { if (optioned) {
counter++; counter++;

View File

@ -219,25 +219,25 @@ public class Transformations {
//Bug RE //Bug RE
// //
//RE regexp = new RE("[^\\\\]\""); RE regexp = new RE("[^\\\\]\"");
//boolean matching = regexp.match(phrase); boolean matching = regexp.match(phrase);
//
//if (matching) {
// int i0 = regexp.getParenStart(0);
// quoted = phrase.substring(0, i0 + 1).trim();
// phrase = phrase.substring(i0 + 2).trim();
//}
//Fix
Pattern p = Pattern.compile("[^\\\\]\"");
Matcher m = p.matcher(phrase);
boolean matching = m.matches();
if (matching) { if (matching) {
int i0 = m.start(); int i0 = regexp.getParenStart(0);
quoted = phrase.substring(0, i0 + 1).trim(); quoted = phrase.substring(0, i0 + 1).trim();
phrase = phrase.substring(i0 + 2).trim(); phrase = phrase.substring(i0 + 2).trim();
} }
//Fix
//Pattern p = Pattern.compile("[^\\\\]\"");
//Matcher m = p.matcher(phrase);
//boolean matching = m.matches();
//
//if (matching) {
// int i0 = m.start();
// quoted = phrase.substring(0, i0 + 1).trim();
// phrase = phrase.substring(i0 + 2).trim();
//}
} }
if (phrase.startsWith(delimiter)) if (phrase.startsWith(delimiter))