Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not log exception when there is no environment.properties #956

Closed
nykolaslima opened this issue Mar 16, 2015 · 6 comments · Fixed by #957
Closed

Do not log exception when there is no environment.properties #956

nykolaslima opened this issue Mar 16, 2015 · 6 comments · Fixed by #957

Comments

@nykolaslima
Copy link
Contributor

When we don't have a environment.properties file, VRaptor latest version is logging:

WARN [http-bio-8080-exec-1] (DefaultEnvironment.java:103) - Could not find the file environment.properties to load.
java.lang.NullPointerException
    at java.util.Properties$LineReader.readLine(Properties.java:434)
    at java.util.Properties.load0(Properties.java:353)
    at java.util.Properties.load(Properties.java:341)
    at br.com.caelum.vraptor.environment.DefaultEnvironment.loadAndPut(DefaultEnvironment.java:100)
    at br.com.caelum.vraptor.environment.DefaultEnvironment.getProperties(DefaultEnvironment.java:82)
    at br.com.caelum.vraptor.environment.DefaultEnvironment.has(DefaultEnvironment.java:168)
    at br.com.caelum.vraptor.environment.DefaultEnvironment.get(DefaultEnvironment.java:173)

We should only log the warn message and not the exception. This could led users to think that it's a unexpected behaviour.

What do you think guys? @Turini @lucascs

@Turini
Copy link
Member

Turini commented Mar 16, 2015

+1 to keep the warn, removing the exception

@lucascs
Copy link
Member

lucascs commented Mar 16, 2015

+1

On Sun, Mar 15, 2015 at 11:05 PM, Rodrigo Turini notifications@github.com
wrote:

+1 to keep the warn, removing the exception


Reply to this email directly or view it on GitHub
#956 (comment).

@schirrel
Copy link

schirrel commented Apr 4, 2018

@Turini isso ja foi implementado? Esse log fica aparecendo em cada nova requisição. Estou usando o 4.2.0-Final no repositorio mvn

@Turini
Copy link
Member

Turini commented Apr 4, 2018

@codersquirrel foi sim, nesse PR:
#1101
posso fazer um release de uma nova versão do vraptor pra entrar esse até o final de semana
(;

@Turini
Copy link
Member

Turini commented Apr 5, 2018

está feito!
em algumas horas o 4.2.1 já deve estar disponível no repositório do maven

@schirrel
Copy link

schirrel commented Apr 6, 2018

AEWWWWWWWWWWWWWWWWWWWWW brigadão ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants