Revize 5a0436cd
Přidáno uživatelem Ondřej Váně před téměř 4 roky(ů)
src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/repository/AntiPatternRepository.java | ||
---|---|---|
72 | 72 |
new InputStreamReader(test.openStream())); |
73 | 73 |
String line; |
74 | 74 |
while ((line = read.readLine()) != null) { |
75 |
if (line.startsWith("select") || line.startsWith("set")) { |
|
75 |
if (line.startsWith("select") || line.startsWith("set") && line.charAt(line.length()-1) == ';') {
|
|
76 | 76 |
queries.add(line); |
77 | 77 |
} |
78 | 78 |
} |
src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/utils/Utils.java | ||
---|---|---|
3 | 3 |
import cz.zcu.fav.kiv.antipatterndetectionapp.model.ResultDetail; |
4 | 4 |
import org.slf4j.Logger; |
5 | 5 |
import org.slf4j.LoggerFactory; |
6 |
import org.springframework.beans.factory.annotation.Autowired; |
|
7 | 6 |
|
8 |
import javax.servlet.ServletContext; |
|
9 |
import java.io.BufferedReader; |
|
10 |
import java.io.IOException; |
|
11 |
import java.io.InputStream; |
|
12 |
import java.io.InputStreamReader; |
|
13 |
import java.net.MalformedURLException; |
|
14 |
import java.net.URL; |
|
15 | 7 |
import java.sql.Date; |
16 | 8 |
import java.time.LocalDate; |
17 | 9 |
import java.time.temporal.ChronoUnit; |
Také k dispozici: Unified diff
Added condition for loading sql files