File: removeDoubleDeprecatedAnnotations

package info (click to toggle)
javaparser 3.16.3-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 17,948 kB
  • sloc: java: 166,335; xml: 1,552; sh: 51; perl: 12; makefile: 2
file content (24 lines) | stat: -rwxr-xr-x 617 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/perl

# We will invoke this script to remove consecutive @Deprecated annotations in
# a generated source file, see Debian bug #1011814.

use strict;
use warnings;

open FILE, "<", "target/generated-sources/javacc/com/github/javaparser/SimpleCharStream.java"
    or die "Cannot open SimpleCharStream.java: $!",

my $lines = '';
$lines = join '', <FILE>;

close FILE;

$lines =~ s|\@Deprecated$(\s*/\*\*)|$1|gm;

open OUTFILE, ">", "target/generated-sources/javacc/com/github/javaparser/SimpleCharStream.java"
    or die "Cannot open SimpleCharStream.java: $!";

printf OUTFILE "%s", $lines;

close OUTFILE;