Skip to content

Commit

Permalink
fix: revert java to v8
Browse files Browse the repository at this point in the history
This also reverts previous MessageInterceptor java changes.
  • Loading branch information
1abhishekpandey committed Aug 1, 2024
1 parent a978662 commit a020d80
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 40 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-and-quality-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ jobs:
with:
fetch-depth: 0

- name: Set up JDK 20
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '20'
java-version: '11'
distribution: 'temurin'

- name: Set up Maven
Expand Down
12 changes: 0 additions & 12 deletions analytics-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -72,16 +72,4 @@
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>19</source>
<target>19</target>
</configuration>
</plugin>
</plugins>
</build>
</project>
8 changes: 0 additions & 8 deletions analytics-sample/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,6 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>19</source>
<target>19</target>
</configuration>
</plugin>
</plugins>
</build>
</project>
8 changes: 0 additions & 8 deletions analytics/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,6 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>19</source>
<target>19</target>
</configuration>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,22 @@ abstract class Typed implements MessageInterceptor {
public final Message intercept(Message message) {
// todo: non final so messages can be filtered without duplicating logic?
Message.Type type = message.type();
return switch (type) {
case alias -> alias((AliasMessage) message);
case group -> group((GroupMessage) message);
case identify -> identify((IdentifyMessage) message);
case screen -> screen((ScreenMessage) message);
case page -> page((PageMessage) message);
case track -> track((TrackMessage) message);
default -> throw new IllegalArgumentException("Unknown payload type: " + type);
};
switch (type) {
case alias:
return alias((AliasMessage) message);
case group:
return group((GroupMessage) message);
case identify:
return identify((IdentifyMessage) message);
case screen:
return screen((ScreenMessage) message);
case page:
return page((PageMessage) message);
case track:
return track((TrackMessage) message);
default:
throw new IllegalArgumentException("Unknown payload type: " + type);
}
}

/** Called for every {@link AliasMessage}. */
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
<properties>
<revision>3.1.1</revision>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>20</java.version>
<java.version>8</java.version>
<kotlin.version>1.7.20</kotlin.version>
<spotless.version>2.27.2</spotless.version>
<retrofit.version>2.9.0</retrofit.version>
Expand Down

0 comments on commit a020d80

Please sign in to comment.