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>
<groupId>org.gcube.dataanalysis</groupId>
<artifactId>ecological-engine</artifactId>
<version>1.14.1-SNAPSHOT</version>
<version>1.14.0</version>
<name>ecological-engine</name>
<description>ecological-engine library</description>
<scm>

View File

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

View File

@ -219,25 +219,25 @@ public class Transformations {
//Bug RE
//
//RE regexp = new RE("[^\\\\]\"");
//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();
RE regexp = new RE("[^\\\\]\"");
boolean matching = regexp.match(phrase);
if (matching) {
int i0 = m.start();
quoted = phrase.substring(0, i0 + 1).trim();
phrase = phrase.substring(i0 + 2).trim();
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) {
// int i0 = m.start();
// quoted = phrase.substring(0, i0 + 1).trim();
// phrase = phrase.substring(i0 + 2).trim();
//}
}
if (phrase.startsWith(delimiter))