Skip to content

Commit

Permalink
Use module-friendly bundle methods (#1255)
Browse files Browse the repository at this point in the history
  • Loading branch information
dmlloyd authored Nov 27, 2024
1 parent 029c88e commit ff3c4d3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package io.smallrye.config.inject;

import java.lang.invoke.MethodHandles;
import java.lang.reflect.Constructor;
import java.lang.reflect.Executable;
import java.lang.reflect.Field;
Expand All @@ -21,7 +22,7 @@

@MessageBundle(projectCode = "SRCFG", length = 5)
public interface InjectionMessages {
InjectionMessages msg = Messages.getBundle(InjectionMessages.class);
InjectionMessages msg = Messages.getBundle(MethodHandles.lookup(), InjectionMessages.class);

@Message(id = 2000, value = "Failed to Inject @ConfigProperty for key %s into %s since the config property could not be found in any config source")
ConfigException noConfigValue(@Param @Pos(1) String configPropertyName, @Pos(2) String location);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package io.smallrye.config._private;

import java.io.InvalidObjectException;
import java.lang.invoke.MethodHandles;
import java.lang.reflect.Type;
import java.util.NoSuchElementException;
import java.util.regex.Pattern;
Expand All @@ -13,7 +14,7 @@

@MessageBundle(projectCode = "SRCFG", length = 5)
public interface ConfigMessages {
ConfigMessages msg = Messages.getBundle(ConfigMessages.class);
ConfigMessages msg = Messages.getBundle(MethodHandles.lookup(), ConfigMessages.class);

@Message(id = 0, value = "The file %s was not found")
IllegalStateException fileNotFound(String fileName);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
package io.smallrye.config.source.zookeeper;

import java.lang.invoke.MethodHandles;

import org.jboss.logging.Messages;
import org.jboss.logging.annotations.Message;
import org.jboss.logging.annotations.MessageBundle;

@MessageBundle(projectCode = "SRCFG", length = 5)
interface ZooKeeperMessages {
ZooKeeperMessages msg = Messages.getBundle(ZooKeeperMessages.class);
ZooKeeperMessages msg = Messages.getBundle(MethodHandles.lookup(), ZooKeeperMessages.class);

@Message(id = 4000, value = "Please set properties for \"" +
ZooKeeperConfigSource.ZOOKEEPER_URL_KEY + "\" and \"" +
Expand Down

0 comments on commit ff3c4d3

Please sign in to comment.