github-advanced-security[bot] commented on code in PR #78:
URL: https://github.com/apache/iotdb-extras/pull/78#discussion_r2126166044
##########
examples/mybatis-generator/src/main/java/org/apache/iotdb/mybatis/Main.java:
##########
@@ -0,0 +1,109 @@
+package org.apache.iotdb.mybatis;
+
+import org.apache.iotdb.mybatis.plugin.mapper.MixMapper;
+import org.apache.iotdb.mybatis.plugin.model.Mix;
+
+import org.apache.ibatis.io.Resources;
+import org.apache.ibatis.session.SqlSession;
+import org.apache.ibatis.session.SqlSessionFactory;
+import org.apache.ibatis.session.SqlSessionFactoryBuilder;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+public class Main {
+ public static void main(String[] args) throws IOException {
+ String resource = "mybatis-config.xml";
+ InputStream inputStream = Resources.getResourceAsStream(resource);
+ SqlSessionFactory sqlSessionFactory = new
SqlSessionFactoryBuilder().build(inputStream);
+
+ try (SqlSession session = sqlSessionFactory.openSession(true)) {
+ MixMapper mapper = session.getMapper(MixMapper.class);
+
+ Date now = new Date();
Review Comment:
## Unread local variable
Variable 'Date now' is never read.
[Show more
details](https://github.com/apache/iotdb-extras/security/code-scanning/291)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]