Skip to content

Commit

Permalink
Fix: couldn't access private fields
Browse files Browse the repository at this point in the history
  • Loading branch information
voidpointer0x00 committed Mar 29, 2022
1 parent 2cf1515 commit 13d3ba5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public final class PlayerService {
<dependency>
<groupId>com.github.NyanGuyMF</groupId>
<artifactId>dependency-injector</artifactId>
<version>1.0.0</version>
<version>1.0.2</version>
</dependency>
```
### Gradle
Expand All @@ -62,7 +62,7 @@ repositories {
}
dependencies {
implementation 'com.github.NyanGuyMF:dependency-injector:1.0.0'
implementation 'com.github.NyanGuyMF:dependency-injector:1.0.2'
}
```
[DependencyUrl]: https://github.com/NyanGuyMF/dependency-injector/blob/940ceed8fcc17ceaac79a460beb3642fc13835e7/src/main/java/voidpointer/spigot/framework/di/Dependency.java#L24
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

<groupId>voidpointer.spigot.framework</groupId>
<artifactId>void-di</artifactId>
<version>1.0.1</version>
<version>1.0.2</version>

<properties>
<java.version>1.8</java.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ private static Map<String, Object> findDependencies(final JavaPlugin plugin) {

private static Object getFieldValue(final Field field, final Object obj, final Logger logger) {
try {
field.setAccessible(true);
return field.get(obj);
} catch (Exception exception) {
logger.log(Level.WARNING, "Unable to get @Dependency value", exception);
Expand Down

0 comments on commit 13d3ba5

Please sign in to comment.