PerformanceLogFile only compiles if using JDK 1.7 or above #5729

juanavelez opened this Issue Jul 17, 2015 · 2 comments


None yet

3 participants


com.hazelcast.internal.monitors.PerformanceLogFile was recently added (7/15). It makes use of InetSocketAddress.getHostString() which is only public in JDK 1.7 and above.

When compiling using JDK 1.6 (per Maven property jdk.version), this raises an error.

     * Returns the hostname, or the String form of the address if it
     * doesn't have a hostname (it was created using a literal).
     * This has the benefit of <b>not</b> attempting a reverse lookup.
     * @return the hostname, or String representation of the address.
     * @since 1.7
    public final String getHostString() {
        return holder.getHostString();
    private String getPathName() {
        Member localMember = hazelcastInstance.getCluster().getLocalMember();
        InetSocketAddress address = localMember.getSocketAddress();
        String addressString = address.getHostString().replace(":", "_") + "#" + address.getPort();
        return "performance-" + addressString + "-" + currentTimeMillis() + "-%03d.log";

Please note that building using maven and JDK 1.7 does not generate the compilation error, only when the JDK 1.6 is used.


@pveentjer: Can you have a look? This seems to be a file from your new Metrics functionality, if I'm not wrong.


I'll have a look at it now.

@pveentjer pveentjer added Type: Defect and removed PENDING labels Jul 18, 2015
@pveentjer pveentjer added this to the 3.6 milestone Jul 18, 2015
@pveentjer pveentjer closed this in #5731 Jul 18, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment