Skip to content

Commit 9e549ce

Browse files
authored
Merge pull request #149 from pwgit-create/develop
Develop
2 parents 869cac6 + bf5a022 commit 9e549ce

File tree

3 files changed

+13
-20
lines changed

3 files changed

+13
-20
lines changed

AppWish/AppWish/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<modelVersion>4.0.0</modelVersion>
66
<groupId>pn.dev</groupId>
77
<artifactId>code-generator-gui-ollama</artifactId>
8-
<version>1.8</version>
8+
<version>1.8.1</version>
99
<name>CodeGenerator-GUI</name>
1010

1111

@@ -45,7 +45,7 @@
4545
<dependency>
4646
<groupId>pn.dev</groupId>
4747
<artifactId>code-generator-ollama</artifactId>
48-
<version>1.8</version>
48+
<version>1.8.1</version>
4949
</dependency>
5050
<dependency>
5151
<groupId>org.openjfx</groupId>

cg/CodeGenerator/CodeGenerator/pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>pn.dev</groupId>
88
<artifactId>code-generator-ollama</artifactId>
9-
<version>1.8</version>
9+
<version>1.8.1</version>
1010

1111

1212
<description>The Java Application-Generator (pn.dev.code-generator-ollama) creates applications by giving a string of your desired features for a Java application, like this: AppSystem.StartCodeGenerator(String appWish)</description>
@@ -49,7 +49,7 @@
4949
<dependency>
5050
<groupId>io.github.amithkoujalgi</groupId>
5151
<artifactId>ollama4j</artifactId>
52-
<version>1.0.72</version>
52+
<version>1.0.73</version>
5353
</dependency>
5454
<!-- https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter-api -->
5555
<dependency>
@@ -75,7 +75,7 @@
7575
<groupId>org.apache.maven.plugins</groupId>
7676
<artifactId>maven-surefire-plugin</artifactId>
7777
<scope>test</scope>
78-
<version>3.1.2</version>
78+
<version>3.3.0</version>
7979
</dependency>
8080
</dependencies>
8181
<build>

cg/CodeGenerator/CodeGenerator/src/main/java/pn/cg/util/PropUtil.java

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,26 +13,19 @@ public class PropUtil {
1313
private static final Logger log = LoggerFactory.getLogger(PropUtil.class);
1414

1515

16+
/**
17+
* Extracts a properties file from the project's resource folder and transforms it into a Properties object
18+
* @param fileName The name of the file that contains properties is in the resource folder.
19+
* @return Properties
20+
*/
1621
public static Properties ReadPropertiesFile(String fileName) throws IOException {
17-
1822
Properties properties = null;
19-
20-
FileInputStream fileInputStream = null;
21-
22-
try {
23-
24-
log.info(System.getProperty("user.dir"));
25-
26-
fileInputStream = new FileInputStream(PathConstants.RESOURCE_PATH + fileName);
23+
try (FileInputStream fileInputStream = new FileInputStream(PathConstants.RESOURCE_PATH + fileName)) {
2724
properties = new Properties();
2825
properties.load(fileInputStream);
2926
} catch (IOException ioException) {
30-
31-
ioException.printStackTrace();
32-
} finally {
33-
if (fileInputStream != null) fileInputStream.close();
27+
log.error("Error on reading props file!");
3428
}
35-
3629
return properties;
3730
}
38-
}
31+
}

0 commit comments

Comments
 (0)