[jboss-jira] [JBoss JIRA] (AS7-3223) Protect against ArrayIndexOutOfBoundsException when calling InetAddress.getLocalHost

Galder Zamarreño (Created) (JIRA) jira-events at lists.jboss.org
Mon Jan 9 06:03:09 EST 2012


Protect against ArrayIndexOutOfBoundsException when calling InetAddress.getLocalHost
------------------------------------------------------------------------------------

                 Key: AS7-3223
                 URL: https://issues.jboss.org/browse/AS7-3223
             Project: Application Server 7
          Issue Type: Bug
            Reporter: Galder Zamarreño
             Fix For: 7.1.0.Final


Can we please implement the equivalent of JGRP-1404 in AS7?

Otherwise, when you start offline (under some circumstances), you get:

{code}13:40:28,370 ERROR [stderr] java.lang.ArrayIndexOutOfBoundsException: 0
13:40:28,371 ERROR [stderr] 	at java.net.InetAddress.getLocalHost(InetAddress.java:1356)
13:40:28,371 ERROR [stderr] 	at org.jboss.as.server.ServerEnvironment.<init>(ServerEnvironment.java:223)
13:40:28,371 ERROR [stderr] 	at org.jboss.as.server.Main.determineEnvironment(Main.java:219)
13:40:28,371 ERROR [stderr] 	at org.jboss.as.server.Main.main(Main.java:98)
13:40:28,372 ERROR [stderr] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
13:40:28,372 ERROR [stderr] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
13:40:28,372 ERROR [stderr] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
13:40:28,372 ERROR [stderr] 	at java.lang.reflect.Method.invoke(Method.java:597)
13:40:28,372 ERROR [stderr] 	at org.jboss.modules.Module.run(Module.java:272)
13:40:28,373 ERROR [stderr] 	at org.jboss.modules.Main.main(Main.java:313)
{code}

I tried this with 7.0.2, so the lines might be diff in latest but I see ServerEnvironment still uses it:
https://github.com/galderz/jboss-as/blob/master/server/src/main/java/org/jboss/as/server/ServerEnvironment.java#L272

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       



More information about the jboss-jira mailing list