Skip to content

Commit

Permalink
move javaassist concern to correct package and remove dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
hcoles committed Sep 4, 2024
1 parent 66a5cd6 commit 7c6a5e7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and limitations under the License.
*/
package org.pitest.coverage.execute;
package org.pitest.mutationtest.mocksupport;

import org.objectweb.asm.ClassReader;
import org.objectweb.asm.ClassWriter;
Expand Down Expand Up @@ -45,13 +45,8 @@ public static InputStream openClassfile(final Object classPath, // NO_UCD
final String name) {

try {
if (isInstrumentedClass(name)) {
final byte[] bs = getOriginalBytes(classPath, name);
return new ByteArrayInputStream(
transformBytes(IsolationUtils.getContextClassLoader(), name, bs));
} else {
return returnNormalBytes(classPath, name);
}
return new ByteArrayInputStream(transformBytes(IsolationUtils.getContextClassLoader(), name, bs));
} catch (final IOException ex) {
throw Unchecked.translateCheckedException(ex);
}
Expand Down Expand Up @@ -98,9 +93,4 @@ private static InputStream returnNormalBytes(final Object classPath,
}
}

private static boolean isInstrumentedClass(final String name) {
return true;
}


}
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package org.pitest.mutationtest.mocksupport;

import org.pitest.coverage.execute.JavassistCoverageInterceptor;
import org.pitest.functional.prelude.Prelude;
import org.pitest.mutationtest.environment.TransformationPlugin;
import org.pitest.util.Glob;
Expand Down

0 comments on commit 7c6a5e7

Please sign in to comment.