java-json-tools / msg-simple Goto Github PK
View Code? Open in Web Editor NEWThis project forked from fge/msg-simple
A lightweight, UTF-8 capable, printf() capable alternative to Java's ResourceBundle
License: Other
This project forked from fge/msg-simple
A lightweight, UTF-8 capable, printf() capable alternative to Java's ResourceBundle
License: Other
This runs into https://errorprone.info/bugpattern/FutureReturnValueIgnored errors when being built in Google's monorepo.
LoadingMessageSourceProvider.java:273: error: [FutureReturnValueIgnored] Return value of methods returning Future must be checked. Ignoring returned Futures suppresses exceptions thrown from the code that completes the Future.
scheduled.scheduleAtFixedRate(runnable, duration, duration, unit);
^
Tracked also at private https://issuetracker.google.com/133724564.
Background: A number of our Java servers require operating in a non-blocking fashion, mostly to avoid ever running up against a blocking network call. In addition, our test harness also prefers single-threaded execution to reduce overhead. When we execute code from https://github.com/java-json-tools/json-schema-validator we run into both, as it uses msg-simple to load its error message bundles.
Proposed: We create a single-threaded alternative MessageSourceProvider
that can be selected by configuration for use with PropertiesBundle
that doesn't block.
Hello @huggsboson @Capstan @daveclayton , I'm working with a company and we are looking at using some of your projects as dependencies.
Where it says that these repos are "licensed under both LGPLv3 and ASL 2.0", and in the LICENSE files that they are "dual-licensed," I've interpreted that as meaning that these repos can be used under either LGPLv3 or ASL 2.0.
Can you confirm that that's the intent here? I've received questions about whether it means that downstream projects have to use the code under both LGPLv3 and ASL 2.0. I would really appreciate if you could confirm. Thank you!
As i am currently using json-schema-validator
i came across this problem of unnamed threads (see #27). I observed, that the current version (as of commit 8e46ad4 from #28) already sets the thread names, but it is not yet included to the package on maven.
Is it possible to deploy the current version of the msg-simple
library (including 8e46ad4) to maven? This would really help me.
Thanks in advance
LoadingMessageSourceProvider
creates a ThreadFactory
that creates threads with the default names. Consider setting the name to MsgSimple-%d
using an AtomicLong.getAndIncrement()
so the threads are easily attributable to their code.
Was originally fge#4.
In issue #6, the Google monorepo sees errors due to its internal use of errorprone. Consider adding a plugin to ensure github compilations also check errorprone. e.g., https://github.com/tbroyer/gradle-errorprone-plugin
org.mockito.Matchers
should be replaced with org.mockito.ArgumentMatchers
.
Mockito 2 replacements do not match on null
, so this may require additional changes.
This doesn't repro for me locally, but it does on Travis.
Gradle suite > Gradle test > com.github.fge.msgsimple.bundle.MessageBundleTest.messageFormatWorks[0](At {1,time} on {1,date}, there was {2} on planet {0,number,integer}., [Ljava.lang.Object;@712ed1a6, At 12:30:00 PM on Jul 3, 2053, there was a disturbance in the Force on planet 7.) FAILED
java.lang.AssertionError: expected [At 12:30:00 PM on Jul 3, 2053, there was a disturbance in the Force on planet 7.] but found [At 12:30:00 on 2053 Jul 3, there was a disturbance in the Force on planet 7.]
at org.testng.Assert.fail(Assert.java:94)
at org.testng.Assert.failNotEquals(Assert.java:494)
at org.testng.Assert.assertEquals(Assert.java:123)
at org.testng.Assert.assertEquals(Assert.java:176)
at org.testng.Assert.assertEquals(Assert.java:186)
at com.github.fge.msgsimple.bundle.MessageBundleTest.messageFormatWorks(MessageBundleTest.java:396)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.