You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/main/kotlin/org/domaframework/doma/intellij/inspection/dao/processor/paramtype/SelectParamTypeCheckProcessor.kt
Copy file name to clipboardExpand all lines: src/test/testData/src/main/java/doma/example/dao/inspection/paramtype/SelectParamTestDao.java
+20-1Lines changed: 20 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,11 @@
1
1
packagedoma.example.dao.inspection.paramtype;
2
2
3
+
importjava.util.Map;
3
4
importorg.seasar.doma.*;
4
5
importorg.seasar.doma.message.Message;
5
6
importdoma.example.entity.*;
7
+
importdoma.example.collector.*;
8
+
importdoma.example.function.*;
6
9
7
10
importjava.math.BigDecimal;
8
11
importjava.util.Optional;
@@ -22,12 +25,16 @@ public interface SelectParamTestDao {
22
25
23
26
@Select(strategy = SelectType.STREAM)
24
27
@Sql("Select 10000 from user where name = /* name */'name' and salary = /* salary */0")
25
-
Stream<Packet> <errordescr="When you specify SelectType.STREAM for the strategy element of @Select, the \"java.util.function.Function<java.util.stream.Stream>\" parameter is required for the method">selectReturnStreamWithStreamOption</error>(Stringname, BigDecimalsalary);
28
+
Stream<Packet> <errordescr="When you specify SelectType.STREAM for the strategy element of @Select, the \"java.util.function.Function\" parameter is required for the method">selectReturnStreamWithStreamOption</error>(Stringname, BigDecimalsalary);
26
29
27
30
@Select
28
31
@Sql("Select 10000 from user")
29
32
Stream<Packet> <errordescr="When you use the \"java.util.function.Function\" parameter, SelectStrategyType.STREAM must be specified for the strategy element of @Select">selectReturnStreamWithOutStreamOption</error>(Function<Stream<Packet>, BigDecimal> streams);
30
33
34
+
@Select(strategy = SelectType.STREAM)
35
+
@Sql("Select 10000 from user")
36
+
BigDecimalselectFunctionInvalidParam(Function<Stream<Map<String, Pckt>>,BigDecimal> <errordescr="\"java.util.Map<java.lang.String,doma.example.entity.Pckt>\" is illegal as the type argument of \"java.util.stream.Stream\"">function</error>, BigDecimalstream);
@@ -49,12 +56,24 @@ public interface SelectParamTestDao {
49
56
@Sql("select * from packet where salary > /* salary */0")
50
57
Pckt <errordescr="When you specify SelectType.COLLECT for the strategy element of @Select, the \"java.util.stream.Collector\" parameter is required for the method">selectWithOutCollector</error>(BigDecimalsalary, Packetpacket);
51
58
59
+
@Select(strategy = SelectType.COLLECT)
60
+
@Sql("select * from packet where salary > /* salary */0")
0 commit comments