NEW is internal proprietary API

compiler-warnings, java

Solution

Solution found I removed all all imports in the file, and replaced everything with stubs.

That made java report the error in another file.

The other file had a bad and unused import (import com.sun.org.apache.bcel.internal.generic.NEW).

So I'll recommend anyone getting this error to search your entire workspace for NEW

Problem

During build of our project we get a rather unexplained warning: ``` [javac] (...)\SessionKeeper.java:39: warning: NEW is internal proprietary API and may be removed in a future release [javac] private static final int timeOfInactivity = 1000 * 60 * 9; // allowed time of inactivity [javac] ^ ``` Additional info: - Apache Ant(TM) version 1.8.4 compiled on May 22 2012 - Java(TM) SE Runtime Environment (build 1.7.0_25-b16) Can anyone explain why the compiler makes this warning, and what I should change to avoid it? [Edit] Added nearby code ``` private static final String CLASS_NAME = SessionKeeper.class.getName(); private static final int logoutDelaySeconds = 1000 * 60; // logout after 1 min. from the point when dialog was shown to the user private static final int timeOfInactivity = 1000 * 60 * 9; // allowed time of inactivity private boolean isSchedulerStarted = false; // indicates if SessionKeeper was started or not private static SessionKeeper instance; ``` [edit] Since quite a few requested the source I attached it here (expires in 24h): http://pastebin.com/t2M5mgd0 [edit] What have been tried so far: - Inlining the constant -> error goes to the line above - Reactoring SessionKeeper to not extend any class -> same error - Removing CLASS_NAME and logging statements

Original source

Related problems