Skip to content

Commit

Permalink
- instead of using log4j, it was replaced with ch.qos.reload4j:reload…
Browse files Browse the repository at this point in the history
…4j and with some other dependecied using it instead of log4j

- AtSwingUtils: when loading resources we use direct class instead of Component one
  • Loading branch information
andy.rozman committed Apr 5, 2024
1 parent 0816b2f commit 9241662
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 6 deletions.
30 changes: 25 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -172,16 +172,29 @@


<!-- Log4j -->
<!-- <dependency>-->
<!-- <groupId>log4j</groupId>-->
<!-- <artifactId>log4j</artifactId>-->
<!-- <version>${log4j.version}</version>-->
<!-- </dependency>-->

<!-- This is drop-in replacement for outdated log4j -->
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>${log4j.version}</version>
<groupId>ch.qos.reload4j</groupId>
<artifactId>reload4j</artifactId>
<version>${log4j-reload.version}</version>
</dependency>

<dependency>
<groupId>log4j</groupId>
<artifactId>apache-log4j-extras</artifactId>
<version>${log4j.version}</version>
<exclusions>
<exclusion>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
Expand Down Expand Up @@ -250,8 +263,14 @@
<!-- slf4j over log4j -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<artifactId>slf4j-reload4j</artifactId> <!-- slf4j-log4j12 -->
<version>${slf4j.version}</version>
<exclusions>
<exclusion>
<groupId>ch.qos.reload4j</groupId>
<artifactId>reload4j</artifactId>
</exclusion>
</exclusions>
</dependency>

<!-- Commons logging over slf4j -->
Expand Down Expand Up @@ -379,6 +398,7 @@

<skinlf.version>6.7</skinlf.version>
<log4j.version>1.2.17</log4j.version>
<log4j-reload.version>1.2.25</log4j-reload.version>
<jasperreports.version>6.20.6</jasperreports.version>
<jfreechart.version>1.0.13</jfreechart.version>
<hibernate.version>3.1.3</hibernate.version>
Expand Down Expand Up @@ -408,7 +428,7 @@
<icepdf-viewer.version>6.2.2</icepdf-viewer.version>
<joda-time.version>2.8.2</joda-time.version>
<commons-collections4.version>4.4</commons-collections4.version> <!-- V: 3.2.1 -->
<slf4j.version>1.7.12</slf4j.version>
<slf4j.version>1.7.36</slf4j.version>
<commons-io.version>2.9.0</commons-io.version> <!-- V: 2.5 -->

<!-- 0.9.xx (GGC 0.7) -->
Expand Down
3 changes: 2 additions & 1 deletion src/com/atech/utils/ATSwingUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,8 @@ public static Image getImage(String filename, Component cmp) {
//System.out.println("Component: " + cmp);
//System.out.println("Filename: " + filename);

InputStream is = cmp.getClass().getResourceAsStream(filename);
//InputStream is = cmp.getClass().getResourceAsStream(filename);
InputStream is = ATSwingUtils.class.getResourceAsStream(filename);

if (is == null) {
System.out.println("Error reading image: " + filename);
Expand Down

0 comments on commit 9241662

Please sign in to comment.