You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by cd...@apache.org on 2021/10/28 20:49:00 UTC

[plc4x-build-tools] branch feature/mspec-ng updated: - Continued porting remaining parts.

This is an automated email from the ASF dual-hosted git repository.

cdutz pushed a commit to branch feature/mspec-ng
in repository https://gitbox.apache.org/repos/asf/plc4x-build-tools.git


The following commit(s) were added to refs/heads/feature/mspec-ng by this push:
     new 2065824  - Continued porting remaining parts.
2065824 is described below

commit 2065824e474a9877d451a845afb8de588b4f0aeb
Author: cdutz <ch...@c-ware.de>
AuthorDate: Thu Oct 28 22:48:49 2021 +0200

    - Continued porting remaining parts.
---
 .../types/references/DefaultStringTypeReference.java     | 16 +++-------------
 .../types/references/StringTypeReference.java            |  2 --
 2 files changed, 3 insertions(+), 15 deletions(-)

diff --git a/code-generation/types-base/src/main/java/org/apache/plc4x/plugins/codegenerator/types/references/DefaultStringTypeReference.java b/code-generation/types-base/src/main/java/org/apache/plc4x/plugins/codegenerator/types/references/DefaultStringTypeReference.java
index ded8367..ce908cc 100644
--- a/code-generation/types-base/src/main/java/org/apache/plc4x/plugins/codegenerator/types/references/DefaultStringTypeReference.java
+++ b/code-generation/types-base/src/main/java/org/apache/plc4x/plugins/codegenerator/types/references/DefaultStringTypeReference.java
@@ -26,14 +26,10 @@ public class DefaultStringTypeReference extends AbstractSimpleTypeReference impl
 
     private final Term lengthExpression;
 
-    private final String encoding;
-
-    public DefaultStringTypeReference(SimpleBaseType baseType, Term lengthExpression, String encoding) {
+    public DefaultStringTypeReference(SimpleBaseType baseType, Term lengthExpression) {
         super(baseType, -1);
         // TODO: add null checks
         this.lengthExpression = lengthExpression;
-        this.encoding = encoding;
-
     }
 
     public Term getLengthExpression() {
@@ -41,15 +37,9 @@ public class DefaultStringTypeReference extends AbstractSimpleTypeReference impl
     }
 
     @Override
-    public String getEncoding() {
-        return encoding;
-    }
-
-    @Override
     public String toString() {
         return "DefaultStringTypeReference{" +
                 "lengthExpression=" + lengthExpression +
-                ", encoding='" + encoding + '\'' +
                 "} " + super.toString();
     }
 
@@ -59,11 +49,11 @@ public class DefaultStringTypeReference extends AbstractSimpleTypeReference impl
         if (o == null || getClass() != o.getClass()) return false;
         if (!super.equals(o)) return false;
         DefaultStringTypeReference that = (DefaultStringTypeReference) o;
-        return Objects.equals(lengthExpression, that.lengthExpression) && Objects.equals(encoding, that.encoding);
+        return Objects.equals(lengthExpression, that.lengthExpression);
     }
 
     @Override
     public int hashCode() {
-        return Objects.hash(super.hashCode(), lengthExpression, encoding);
+        return Objects.hash(super.hashCode(), lengthExpression);
     }
 }
diff --git a/code-generation/types-base/src/main/java/org/apache/plc4x/plugins/codegenerator/types/references/StringTypeReference.java b/code-generation/types-base/src/main/java/org/apache/plc4x/plugins/codegenerator/types/references/StringTypeReference.java
index 6f5bef1..0ff3e79 100644
--- a/code-generation/types-base/src/main/java/org/apache/plc4x/plugins/codegenerator/types/references/StringTypeReference.java
+++ b/code-generation/types-base/src/main/java/org/apache/plc4x/plugins/codegenerator/types/references/StringTypeReference.java
@@ -24,6 +24,4 @@ public interface StringTypeReference extends SimpleTypeReference {
 
     Term getLengthExpression();
 
-    String getEncoding();
-
 }