use new helper method to avoid duplicate code
This commit is contained in:
parent
3aa99fde8e
commit
0b9d1c616f
|
|
@ -43,10 +43,8 @@ public class LimitImplementationFiles
|
|||
LocalizedMessage[] errors = new LocalizedMessage[1];
|
||||
|
||||
// get the resource bundle to use for the message
|
||||
final String className = getClass().getName();
|
||||
final int pkgEndIndex = className.lastIndexOf('.');
|
||||
final String pkgName = className.substring(0, pkgEndIndex);
|
||||
final String bundle = pkgName + ".messages";
|
||||
// will return "com.mycompany.checks.messages"
|
||||
final String bundle = getMessageBundle();
|
||||
|
||||
// create the message arguments
|
||||
Object[] msgArgs = new Object[]{new Integer(max)};
|
||||
|
|
|
|||
|
|
@ -507,10 +507,8 @@
|
|||
LocalizedMessage[] errors = new LocalizedMessage[1];
|
||||
|
||||
// get the resource bundle to use for the message
|
||||
final String className = getClass().getName();
|
||||
final int pkgEndIndex = className.lastIndexOf('.');
|
||||
final String pkgName = className.substring(0, pkgEndIndex);
|
||||
final String bundle = pkgName + ".messages";
|
||||
// will return "com.mycompany.checks.messages"
|
||||
final String bundle = getMessageBundle();
|
||||
|
||||
// create the message arguments
|
||||
Object[] msgArgs = new Object[]{new Integer(max)};
|
||||
|
|
|
|||
Loading…
Reference in New Issue