From 674c7ee1d0b342501cba1e2a7f20d7445c40223d Mon Sep 17 00:00:00 2001 From: Ben Hermann Date: Mon, 6 Jan 2020 17:04:46 +0100 Subject: [PATCH 1/5] Bumped version --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index ce16604..67d8b21 100644 --- a/build.sbt +++ b/build.sbt @@ -1,6 +1,6 @@ name := "delphi-webapi" -version := "0.9.5-SNAPSHOT" +version := "0.9.5" scalaVersion := "2.13.1" From 1be4cf55885ac877f9db65733e68a414a31ddeec Mon Sep 17 00:00:00 2001 From: Ben Hermann Date: Thu, 16 Jan 2020 15:36:35 +0100 Subject: [PATCH 2/5] Bugfix for artifactId --- src/main/resources/features.json | 7 +------ .../de/upb/cs/swt/delphi/webapi/search/SearchQuery.scala | 3 ++- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/main/resources/features.json b/src/main/resources/features.json index bbcbfc8..31cda86 100644 --- a/src/main/resources/features.json +++ b/src/main/resources/features.json @@ -12,7 +12,7 @@ { "name" : "maven.artifactId", "description": "ArtifactId of a Maven Package", - "internalName": "identifier.artifactid" + "internalName": "identifier.artifactId" }, { "name" : "maven.version", @@ -674,11 +674,6 @@ "internalName": "hermes.features.public fields\nonly used by defininig type ", "name": "metrics.fields.publicvisiblelocal" }, - { - "description": "", - "internalName": "hermes.features.sun", - "name": "sun" - }, { "description": "Object-based Thread Notification (Object.notify, notifyAll, or wait).", "internalName": "hermes.features.Object-based Thread Notification", diff --git a/src/main/scala/de/upb/cs/swt/delphi/webapi/search/SearchQuery.scala b/src/main/scala/de/upb/cs/swt/delphi/webapi/search/SearchQuery.scala index 9a9249f..36d3ddb 100644 --- a/src/main/scala/de/upb/cs/swt/delphi/webapi/search/SearchQuery.scala +++ b/src/main/scala/de/upb/cs/swt/delphi/webapi/search/SearchQuery.scala @@ -19,6 +19,7 @@ package de.upb.cs.swt.delphi.webapi.search import com.sksamuel.elastic4s.http.ElasticDsl._ import com.sksamuel.elastic4s.http.search.SearchHits import com.sksamuel.elastic4s.http.{ElasticClient, RequestFailure, RequestSuccess} +import com.sksamuel.elastic4s.searches.queries.matches.MatchQuery import com.sksamuel.elastic4s.searches.queries.{NoopQuery, Query} import de.upb.cs.swt.delphi.core.model._ import de.upb.cs.swt.delphi.core.ql._ @@ -112,7 +113,7 @@ class SearchQuery(configuration: Configuration, featureExtractor: FeatureQuery) ) ) } - case EqualExpr(field, value) => matchQuery(externalToInternalFeature(field.fieldName), value) + case EqualExpr(field, value) => matchQuery(externalToInternalFeature(field.fieldName), value) case NotEqualExpr(field, value) => bool(not(matchQuery(externalToInternalFeature(field.fieldName), value))) case GreaterThanExpr(field, value) => rangeQuery(externalToInternalFeature(field.fieldName)).gt(value.toLong) case GreaterOrEqualExpr(field, value) => rangeQuery(externalToInternalFeature(field.fieldName)).gte(value.toLong) From 8d369b65ac5eca6c678dabc7340a866ddd6015bc Mon Sep 17 00:00:00 2001 From: Ben Hermann Date: Thu, 16 Jan 2020 15:53:15 +0100 Subject: [PATCH 3/5] Bumped version for hotfix --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 67d8b21..4f28c28 100644 --- a/build.sbt +++ b/build.sbt @@ -1,6 +1,6 @@ name := "delphi-webapi" -version := "0.9.5" +version := "0.9.5.1" scalaVersion := "2.13.1" From e52f872e4cbb0ea744adaee0b3fb3d97fe6b411b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20D=C3=BCsing?= Date: Wed, 17 Jun 2020 12:02:02 +0200 Subject: [PATCH 4/5] Fixed encoding errors when loading resources on windwos machines --- src/main/scala/de/upb/cs/swt/delphi/webapi/FeatureQuery.scala | 4 ++-- .../cs/swt/delphi/webapi/artifacts/ArtifactTransformer.scala | 4 ++-- .../de/upb/cs/swt/delphi/webapi/search/SearchQuery.scala | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/scala/de/upb/cs/swt/delphi/webapi/FeatureQuery.scala b/src/main/scala/de/upb/cs/swt/delphi/webapi/FeatureQuery.scala index bd09b41..ba54908 100644 --- a/src/main/scala/de/upb/cs/swt/delphi/webapi/FeatureQuery.scala +++ b/src/main/scala/de/upb/cs/swt/delphi/webapi/FeatureQuery.scala @@ -24,13 +24,13 @@ import org.slf4j.LoggerFactory import spray.json._ import de.upb.cs.swt.delphi.webapi.FeatureJson._ -import scala.io.Source +import scala.io.{Codec, Source} class FeatureQuery(configuration: Configuration) { private val log = LoggerFactory.getLogger(this.getClass) lazy val featureList: Iterable[Feature] = - Source.fromResource("features.json") + Source.fromResource("features.json")(Codec.UTF8) .getLines() .mkString("\n") .parseJson diff --git a/src/main/scala/de/upb/cs/swt/delphi/webapi/artifacts/ArtifactTransformer.scala b/src/main/scala/de/upb/cs/swt/delphi/webapi/artifacts/ArtifactTransformer.scala index 7e1e0e3..182ca3d 100644 --- a/src/main/scala/de/upb/cs/swt/delphi/webapi/artifacts/ArtifactTransformer.scala +++ b/src/main/scala/de/upb/cs/swt/delphi/webapi/artifacts/ArtifactTransformer.scala @@ -22,13 +22,13 @@ import de.upb.cs.swt.delphi.webapi.InternalFeature import org.joda.time.format.ISODateTimeFormat import spray.json.JsArray -import scala.io.Source +import scala.io.{Codec, Source} import spray.json._ import de.upb.cs.swt.delphi.webapi.FeatureJson._ import de.upb.cs.swt.delphi.webapi.search.SearchResults object ArtifactTransformer { - private lazy val internalFeatures = Source.fromResource("features.json") + private lazy val internalFeatures = Source.fromResource("features.json")(Codec.UTF8) .getLines() .mkString("\n") .parseJson diff --git a/src/main/scala/de/upb/cs/swt/delphi/webapi/search/SearchQuery.scala b/src/main/scala/de/upb/cs/swt/delphi/webapi/search/SearchQuery.scala index 36d3ddb..64b56a8 100644 --- a/src/main/scala/de/upb/cs/swt/delphi/webapi/search/SearchQuery.scala +++ b/src/main/scala/de/upb/cs/swt/delphi/webapi/search/SearchQuery.scala @@ -27,7 +27,7 @@ import de.upb.cs.swt.delphi.webapi.artifacts.ArtifactTransformer import de.upb.cs.swt.delphi.webapi.{Configuration, Feature, FeatureQuery, InternalFeature} import spray.json.JsArray -import scala.io.Source +import scala.io.{Codec, Source} import scala.util.{Failure, Success, Try} import spray.json._ import de.upb.cs.swt.delphi.webapi.FeatureJson._ @@ -36,7 +36,7 @@ import de.upb.cs.swt.delphi.webapi.FeatureJson._ class SearchQuery(configuration: Configuration, featureExtractor: FeatureQuery) { private val client = ElasticClient(configuration.elasticsearchClientUri) - lazy val internalFeatures = Source.fromResource("features.json") + lazy val internalFeatures = Source.fromResource("features.json")(Codec.UTF8) .getLines() .mkString("\n") .parseJson From 099f3f7dd752d3a2d16efc17016a99618b661c31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20D=C3=BCsing?= Date: Wed, 17 Jun 2020 13:39:37 +0200 Subject: [PATCH 5/5] Adjusted version number for develop branch --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 4f28c28..e57884b 100644 --- a/build.sbt +++ b/build.sbt @@ -1,6 +1,6 @@ name := "delphi-webapi" -version := "0.9.5.1" +version := "0.9.6-SNAPSHOT" scalaVersion := "2.13.1"